Extensions :  K-Meleon Forum
All about K-Meleon extensions. 
javascriptia UPDATE May-21 (long bookmarklets / javascript / userscripts)
Posted by: siria
Date: August 06, 2010 10:17PM

Sometimes bookmarklets are too long for K-Meleon, which currently only can handle a few lines.
This macro allows to use longer ones, up to max 32kB (hundreds of lines), provided you have them previously saved into a file on disk ;-)

Name and ending don't matter, can be everything.
You can also use this macro to run normal javascript files (like userscripts) that contain line breaks.
You can add notes on top of such a file (e.g. origin and description of a script), if the code in it starts with "javascript:"
If javascript and popups are blocked in the browser, those scripts will ignore the blocks and work anyway.
The last called script file will be remembered in this session, there's an own command for repeating it.

To add more script files, just save them to disk, then click "Bookmark from file" to pick and run one.



.


.

Context menus
= if you right-click on a page, on a selection, or (new in version 02) on an image or a link:
. . .

So far I think it's rather easy, but now it gets a little bit more complicated, sorry. It does work out-of-the box and most people will probably never customize anything, but *IF* you want to customize the menu, especially to configure the presets in the flip out menu, edit the macro file (javascriptia.kmm)
In the macro file there's also more info and advanced CONFIGURATION, like auto-loading a script for certain URL's.

UPDATE 2011-05-21:
DOWNLOAD v2 as .kmm:
http://www.datafilehost.com/download-65455136.html

Allow cookies and referer, open link, then left-click on "Click here".
Tested in KM 1.5.4 and 1.6beta, probably works in other versions too.

This is a pure KM-macro in one kmm-file, it doesn't change or store anything, no prefs etc., no webservices used of any kind. Just save it into your macros folder and it works after a browser restart. Or remove it from the macros folder and it's completely 'uninstalled' ;-)

Just one thing, if you edit it to customize the menu, you may prefer to put it into the USER macro folder in your profile, considering that old prob with writing rights in XP+.

__________________________
Version update:
V2, May-2011: Extended menu, there's now also a line "Inject a Script..." in the context-menu of links and images (if you right-click on them). And added "how to" example for keyboard shortcuts, if you're ready to invent your own key combinations.

Note: The new download file is named "javascriptia_v2.kmm", to avoid accidentally overwriting a possibly customized (modified) old version with it. After updating, it may first look as if your customizations were vanished, or perhaps you get double menus. Then click Edit>Configuration>Macros (or User-Defined Macros) and find your old file in the KM macros folder. You can copy over the parts that you had modified into the new version. V2.kmm only has the beginning and the end changed (the menus), but the middle part with the user stuff can be copied over.



Edited 12 time(s). Last edit at 05/22/2011 03:40AM by siria.

Options: ReplyQuote
Re: javascriptia (long bookmarklets / javascript / userscript from disk)
Posted by: siria
Date: May 21, 2011 05:51AM

Update to version v2 smiling smiley
Nothing major, just menu lines added to the context menus of images and links. And added examples for setting keyboard shortcuts in the macro.

Options: ReplyQuote
Re: javascriptia (long bookmarklets / javascript / userscript from disk)
Posted by: siria
Date: May 22, 2011 02:13AM

Oops... And sorry! Had a little typo in the new version yesterday, which made that the "Help + Configuration" didn't open the macro file, argh *blush*
There was 1 download yesterday, if you read this, please download again from the new link in the first post.



Edited 1 time(s). Last edit at 05/22/2011 02:18AM by siria.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.