This
plugin runs and manages user
scripts like greasemonkey. The
Plugin Manager can also run userscripts but it was mainly for managing Maxthon plugins and did not refer to the specific format of userscripts. It is also not compatible with
Maxthon 2.x.
This one is made specifically for userscripts. It is much more advanced and efficient. It has also overcome a limitation of IE and is able to run scripts after page refresh.
Features
- overcome IE limitation and able to run after refresh (hold shift to temporary bypass running)
- can run
when webpage starts
loading (for scripts operating "document" and "
window" object)
- can set order of scripts execution to solve possible conflict between scripts
- supports multi languages script description (save in unicode to avoid encoding
problems)
- support most ie7pro userscripts and some greasemonkey userscripts
- support most ie7pro and greasemonkey userscript API for script development
- convenient userscripts installation
Details
1. The list of available scripts. Scripts checked are run from top to bottom. To check/uncheck all scripts hold Shift when click on a
check box. Double click a script will open in the script in Note
pad or custom editor.
2. Find and list matched scripts as typed.
3. Move script up/down (execution order) by 1, or 10 when the Shift key is held.
4. Open the highlighted user script in Notepad or custom editor. Hold Shift and click to set custom editor.
5. Delete the script. Note that script is deleted immediately (with confirmation). ie Script is deleted even if you close More Scripts
dialog with Cancel.
6. URLs where script is run, one line for each url, supports */?, cannot be empty. User script author can specify the urls in the script by adding one or more include headers @include xxx (same as greasemonkey/ie7pro/chrome).
7. URLs where script is not run, also one line each, supports */?, but can be empty and has higher priority. User script author can specify the urls in the script by adding one or more exclude headers @include xxx (same as greasemonkey/ie7pro/chrome).
8. Run the script when webpage starts to load. Note that scripts can only operate the window and document object at this moment, as other objects are not yet
created. To operate other objects scripts should be run when page is loaded (default). Yet it is be possible to operate other objects before page is loaded in some cases. eg. No Blank
Download Tab instead of enumerates and change links when page is loaded, it attaches a window mousedown event to trace the clicked link. User script author can specify the script to run when page starts to load by adding run-at header @run-at document-start (same as chrome).
9. Run the script in all frames. Note that if a script is set to run in all frames, it should not loop frames itself to avoid duplication. Also the script must not create frame/iframe as this would cause indefinite loop. User script author can specify the script to run in all frames by adding injectframes header @injectframes 1 (same as ie7pro).
10. Test run the highlighted script in the current webpage
Included Scripts
No Script Error - block all script
errors, should be the first script to run to be effective
Auto Reload - reload webpage every minute, mostly for demonstrating that script can run after reload
Softer Background - change maxthon forum background color, mostly for demonstrating page start timing
Gray Visited Links - change visited links (also drag drop links) to light gray
No Blank Download Tab - do not open blank tab when download file or open
file in other applications
Reload Broken Images - reload broken images and hide the red x
Reload Broken Page - reload webpage not opened every 30 secondes
Google Auto Pager 2008 - ie7pro script, insert next page content when
scroll to bottom in
google search
Generic Auto Pager - ie7pro script, open next page when scroll to bottom, but not too accurate
Download Video from
YouTube - ie7pro script, add
video download link in youtube
Google Image Search Inline Loader - ie7pro script, in google images show big image in layer on the current page
Google Images Viewer - ie7pro script, show the big image link and source webpage link
YouTube Highest Possible Video Quality - ie7pro script, auto load the highest quality chip in youtube
YetAnotherSmoothScrolling for IE - scroll page smoothly, the script which the Smooth Scroll plugin based
Userscript Resources
1.
ie7pro - there are many scripts and most can be used here. Click "Install Script" or "Download Script" to install.
2.
greasemonkey - huge amount of scripts but most may not be compatible with IE and may not be useable here. Click "Install" to install.
3.
js-plugin - the userscript format of js-plugin is a bit different but they can be used here.
Userscript Installation
1. click user script links (xxx.user.js or xxx.ieuser.js), or
2. drag and drop user script to More Scripts dialog, or
3. copy user script to Maxthon\Plugin\MoreScripts\Scripts\ folder, or
4. select userscript on webpage and click the plugin
button
API
All Maxthon
Script Button Plugin Commands can be used by referencing "More Scripts" as the plugin. In addition the following API are added to improve
compatibility with greasemonkey and ie7pro userscripts (GM_ and PRO_ commands can only be used in userscript, so do MS_ commands with asterisk):
MS_xmlhttpRequest2 (GM_xmlhttpRequest) *
MS_xmlhttpRequest (PRO_xmlhttpRequest) *
MS_addStyle (GM_addStyle/PRO_add
Style)
MS_setValue (GM_setValue/PRO_setValue) *
MS_getValue (GM_getValue/PRO_getValue) *
MS_deleteValue (GM_deleteValue) *
MS_listValues (GM_listValues) *
MS_openInTab (GM_openInTab/PRO_openInTab) *
MS_showModelessDialog (PRO_show
ModelessDialog) *
MS_registerMenuCommand (GM_registerMenuCommand/PRO_register
MenuCommand) *
MS_getLang (PRO_getLang)
MS_log (GM_log/PRO_log)
User script author can use the above GM_ or PRO_ API
directly or use the corresponding MS_ in the same way, except MS_setValue, MS_getValue, MS_deleteValue, MS_listValues and MS_log. These 5 require the script name as extra argument. When reading user scripts, the plugin will automatically add this argument to the cor
responding GM_ and PRO_. eg GM_setValue(key, value) will become MS_setValue(script, key, value).
Note: In order to support the above APIs, an additional plugin "More Scripts Helper" is made and included. It is necessary for Maxthon 2.5.x or later and must also be enabled.
Base 64
Images can be encoded to Base 64 data format for inclusion in user scripts. IE8 supports certain base 64 data. For IE6/7 and unsupported data in
IE8, the plugin will decode the base 64 data to local images in maxthon's temp folder, and substitute the base 64 data in user script with the file path of decoded images. The plugin also provides a function to encode images to Base 64 data. At the moment .gif (image/gif), .png (image/png), .bmp (image/bmp), .jpg (image/jpeg), .ico (image/x-
icon), .cur (image/x-cursor), and .ani (image/x-animated-
cursor) are supported.
Known Issues
- may not work if "Multi-tab thread" option is not enabled in maxthon 2.1.5 or before
Version History
1.2.0
- added support for XX_registerMenuCommand (accelerator not supported at the moment)
- added dynamic plugin menu which also shows entries added by XX_registerMenuCommand
- added base64 support for .ico, .cur, .ani (image/x-icon, x-cursor, x-animated-cursor)
- added "Test" button in Manage Scripts dialog to test script on current page
- added "View Log" command in plugin menu to view data logged by XX_log
- moved "Encode" button to plugin menu
-
fixed problem that scripts may not run on new tab opened by links with target = "_blank"
- fixed security issue that use of unsafe API are not restricted to userscript
1.1.2
- fix a problem comparing the include/exclude data
- the "Run when page start loading" option is
disabled if @run-at document-start is not specified in user script
1.1.1
- fix problem that multi line include/exclude ignored
- fix problem that large include/exclude data truncated
1.1.0
- can select userscript on webpage and click plugin button to install
- supports base 64 encoded images in IE6/7
- added a base 64 image encode function
- fixed problem when running certain script when document-starts
Note
- before update to new version, please disable the plugin and restart maxthon
Download
http://addons.maxthon.com/en/post/2715