[M2] [M2 Button] More Scripts 1.2.0, updated 7-7-2009

[M2 Button] More Scripts 1.2.0, updated 7-7-2009

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 Notepad 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_addStyle)
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_showModelessDialog) *
MS_registerMenuCommand (GM_registerMenuCommand/PRO_registerMenuCommand) *
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 corresponding 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
Recent ratings
  • carpediem Karma +5 Excellent! 2009-6-29 01:26
  • Script Karma +1 2009-6-23 19:17
  • Dev Karma +5 great 2009-6-23 18:01
Great job as usual, tnx
YOWZA been looking forward to this one

BTW...about the data:image/...:base64 ? It seems IEpro has this built-in...

this is the one thing that makes porting GM/IEPro scripts next to impossible. (unless having a way to extract the images and putting them online)

Plz? Option to specify editor?
Visit the Maxthon Chatroom - Maxthon Talk on the Net
Grazr.com ends hosting option, Maxthon Talk on the Net will go offline somewhere end of August
yey, thanks.
will check it out soon. hope it really is better than the older JS-plugin.
Well, this one I'm afraid of, but I'll give it a try. There seem to be some very interesting scripts at IEscripts, many of which have been asked about in the forum! Thanx abc

edit: Auto pager works on the forum

[ Last edited by ntzphyr at 2009-6-22 17:46 ]
1. XPsp3   |  IE8.0.0.6001    |  M2.5.9.2122 |  WMP 11
2. XPsp3   |  IE8.0.0.6001    |  M1.6.5.18   |  WMP 11
3. XPsp3   |  IE8.0.0.6001    |  M3.0.4.8    |  WMP 11

                                               網隊火災
Good job!
I make russian translate for your plugin (Please add him to pack... )
Thx!
0x0419.rar (488 Bytes)
S-C-R-I-P-T.BLOGSPOT.COM <- my blog.
Great job!


To fix: Some strange code instead of */?

In my transtale I fixed this.

Czech translate: czech.zip (1.51 KB)

Thank You

[ Last edited by Dev at 2009-6-23 01:58 ]
Have uploaded a newer version to addons site. The new version can set the text editor by holding Shift and clicking the "Edit" button.
With the newest version it seems I can't grab the scroll bar or move the page by clicking on scroll bar area.

Clicking edit while holding shift seems to work but I'm entering the wrong path. This is where "text editor" is located: C:\Program Files\TextPad 5. What do I enter as a path? Thanx
1. XPsp3   |  IE8.0.0.6001    |  M2.5.9.2122 |  WMP 11
2. XPsp3   |  IE8.0.0.6001    |  M1.6.5.18   |  WMP 11
3. XPsp3   |  IE8.0.0.6001    |  M3.0.4.8    |  WMP 11

                                               網隊火災

Reply 9# ntzphyr's post

Same here.
Can't grab the scrollbar.

Maxthon 2.5.10.2994 Unicode | IE 8 | Windows XP Home SP3 | E6550 | 4GB ram | M2 Suggestions

Quote:
Original posted by ntzphyr at 2009-6-22 21:29
With the newest version it seems I can't grab the scroll bar or move the page by clicking on scroll bar area.

Does it happen it specific pages or any pages? Try disable all scripts and see if the problem still presents.

Quote:
Clicking edit while holding shift seems to work but I'm entering the wrong path. This is where "text editor" is located: C:\Program Files\TextPad 5. What do I enter as a path? Thanx

Enter the path of the .exe.
Odd, disabled all and it worked   Reanabled all and it worked perfect. Thanx I can now scroll all pages again

Damn it, no I can't after reloading a page. None scroll again. Grrr. Adding them one by one there was no problem, it kept working. I'll try again being a little more methodical

"No blank download tab" is the source!
"Grey visited links" also, separately or combined

[ Last edited by ntzphyr at 2009-6-22 23:33 ]
1. XPsp3   |  IE8.0.0.6001    |  M2.5.9.2122 |  WMP 11
2. XPsp3   |  IE8.0.0.6001    |  M1.6.5.18   |  WMP 11
3. XPsp3   |  IE8.0.0.6001    |  M3.0.4.8    |  WMP 11

                                               網隊火災

Reply 12# ntzphyr's post

Maybe you can try setting it to run not when page starts loading but when page loaded, and see if the problem continues. There seems problem but it doesn't happen in my case.
That worked for a while until the page was completely loaded. As soon as the progress bar disappeared, so did my ability to use the scroll bar.

Edit: On both scripts
1. XPsp3   |  IE8.0.0.6001    |  M2.5.9.2122 |  WMP 11
2. XPsp3   |  IE8.0.0.6001    |  M1.6.5.18   |  WMP 11
3. XPsp3   |  IE8.0.0.6001    |  M3.0.4.8    |  WMP 11

                                               網隊火災
the Generic Auto Pager script is quite buggy, and sometimes it just refreshes the webpage. it doesn't work for me on maxthon forum , lifehacker, youtube and anywhere else that i've tried. when i reach the bottom of a page, it show a weird rectangle that fills up, and when it's full, it just refreshes the page.
EDIT:i've downloaded the newer version of the script. it's a little bit less buggier, and it seems to sometimes work on maxthon forum.

EDIT: this plugin rocks! it has a few bugs when installing and enabling new scripts, but it is really great !

[ Last edited by UFO at 2009-6-23 10:16 ]
French Translation :

Attachment

0x040c.zip (1.62 KB)

2009-6-23 02:02, Downloads: 68

See ya, Ldfa.

Quote:
Original posted by abc@home at 2009-6-23 02:48
Have uploaded a newer version to addons site. The new version can set the text editor by holding Shift and clicking the "Edit" button.

Thank you so much

Quote:
Original posted by ntzphyr at 2009-6-23 04:29
With the newest version it seems I can't grab the scroll bar or move the page by clicking on scroll bar area.

Hmmm...am at the office right now and here I have IE7 underneath. (Still XP) just downloaded the new version, activated the Generic Auto Pager, no Blank Download tab, Gray Visited Links, Softerbackground, YASSE for IE, and got no problems at all using the scrollbar (grab/drag/clicking)
Quote:
Original posted by Script at 2009-6-22 16:48
Good job!
I make russian translate for your plugin (Please add him to pack... )
Thx!
20019


Quote:
Original posted by Dev at 2009-6-22 17:30
Great job!

20020
To fix: Some strange code instead of */?

In my transtale I fixed this.

Czech translate: 20022

Thank You


Quote:
Original posted by Ldfa at 2009-6-23 02:02
French Translation :


Thanks
Quote:
Original posted by JarC at 2009-6-22 14:41
YOWZA been looking forward to this one

BTW...about the data:image/...:base64 ? It seems IEpro has this built-in...

...

I thought IE does not support this but I'm wrong. It looks like there are some limitations in IE though.
Copy to clipboard
Code:
<IMG
   SRC="data:image/gif;base64,R0lGODdhMAAwAPAAAAAAAP///ywAAAAAMAAw
   AAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFz
   ByTB10QgxOR0TqBQejhRNzOfkVJ+5YiUqrXF5Y5lKh/DeuNcP5yLWGsEbtLiOSp
   a/TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJl
   ZeGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uis
   F81M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy/Xl4/f1cf5VWzXyym7PH
   hhx4dbgYKAAA7"
   ALT="Larry">
Copy to clipboard
Code:

<img src="data:image/gif;base64,R0lGODlhFAAUAOYAAP///3jJrvTl4+r38sjp3se0q67i0V2Wd9Xz6gCZZv3+/k2YdgCUX2rDpgCSW3HGqgCZZ2vEpvr9/ACQWf7//v7+/gCWYe/49W7FqPf8+nLGqq3i0Z3YxGPAoVS7mOT07gSXY9Xz62C/oHfJrVG5l02Yde349KXWxI3Ru5XUv4TNtf3z9PT6+QCOVXvLsMayqQCTXt3x6/D59hygcJbVwACVYcrv5HiWfVuUddr17c68tPz+/WrDpQCTXfX8+k6Ydtzx6ur383KSd6/h0uzo5KTayBqicyCmeQCQWK/j0tDs4gCOVvv6+UyXdUyWc5nWwVe8mo/SvAKXYwCWYvX7+eDz7ZHTvWbCo9Hv5tHt5JTVv2rCpJLTvvzy8m3Fp2zEpsbo3VGaeDesgkO0j8fo3fH692WihcLm2gCVX3rKr8Szqdjv6FyWd2m2mPDk4kK0jjethACXZACYZBijdO/59Rykd6aWh1e7mRyebVi8nOr28tHHv9Tu5SSne4TIsAAAACH5BAAAAAAALAAAAAAUABQAAAfygACCg4SFhoIyA4qLjHomFYQZKh08DQ1eD5kYllsRTz6DSh4fCqUZF3QXVKUKZVong2RphBwzdXguhENmK4IEAYQoEzUtV4QGOAK+wINWDAkOEccHygC/hFzPDl/T1dcUginaGILgBtTLAEFQYkdyCXFzcG9AAOfewApRE2gQCRAWkASQYA+dNWYSSMBIwLDHGBaC7qUTtKYPA4BGsgySeJBQERBTpNDoNlHQDhFL8igglIRNNTAjCsW4U6XQBoN8NGBBwBNBCBs5evL0c8ONoApn2jhpsmDBjzBNo5YQYocIoS46XhTYyrWrmj1MDok1FAgAOw==" class="downloadImg">
The second one is indeed found in the Download Video from YouTube script
Quote:
Hmmm...am at the office right now and here I have IE7 underneath. (Still XP) just downloaded the new version, activated the Generic Auto Pager, no Blank Download tab, Gray Visited Links, Softerbackground, YASSE for IE, and got no problems at all using the scrollbar (grab/drag/clicking)

Bah, even if I don't use IE8 rendering, "No blank download tab" and "gray visited links" break the ability to scroll once the page is completely loaded as I stated in post #14. Certainly not a deal breaker though! The other scripts work fine!

[ Last edited by ntzphyr at 2009-6-23 06:11 ]
1. XPsp3   |  IE8.0.0.6001    |  M2.5.9.2122 |  WMP 11
2. XPsp3   |  IE8.0.0.6001    |  M1.6.5.18   |  WMP 11
3. XPsp3   |  IE8.0.0.6001    |  M3.0.4.8    |  WMP 11

                                               網隊火災