Extensions :  K-Meleon Web Browser Forum
All about K-Meleon extensions. 
StyleonMini for ultralong userscripts (javascript, bookmarklets) + userstyles (css)
Posted by: siria
Date: September 08, 2014 03:05AM

A mini alternative to my long monster macro javascriptia/stylescriptia, might later be included in it.
For now this as a tiny standalone macro, for userstyles (.css) and usercripts (.js)
No autoloading or other gimmicks, but it can use LONG files over 32kB, that means without size limit!



UPDATE: Version 2 (see attachment)

Attention, the price for it is lesser security for LONG files, the website must get reading access to your local computer for a short moment! Don't know any other way. The macro toggles the prefs to allow this first, and afterwards toggles them back again to normal security.
SHORTER Files (up to 32kcool smiley are executed the usual KM way, more secure.

Menu is in Bookmarks/Favorites/Hotlist => "User Style: File (js/css)..."
If you only want it in one if it, simply add comment signs # to the other setmenu-lines in the kmm-file.

=> To REPEAT the last used style easier (JS or CSS), you can put an empty file named "0_STYLEON_REPEAT" in your scripts/styles folder (or use the other file attached in this post). If this NAME is picked, this file will be ignored and instead the last used file gets executed.

If you want to create a shortcut, read comments inside the kmm file (simple text file).

INSTALLATION as usual, unzip the attached 7z-file and put the contained kmm-file into your macros folder, then restart browser.

Please report if it works for you, and in which KM-version?

__________________________
Getting scripts (*.js)
- From userscripts.org or similar, right-click on their "INSTALL"-button, then "Save Target As" into your scripts folder.
- From somewhere on a webpage as visible code: Copy the script, open a notepad, paste the script into it and save as a file with ending "*.js" and option "all files" (must NOT have a hidden "*.js.txt" ending).
- From bookmarklets archives: I'd rather use it as normal bookmarklet it if works, that's handier. It seems KM74 can now hold a size about 60kB in a single bookmarklet, while older versions only could 256 characters. But if you want to store a bookmarklet-link as a file, right-click on the link that starts with "javascript:...", and "Copy Link Target". Then paste it into an empty file, and save it in your scripts folder, give it the ending "*.js" (optional default folder is K-Meleon/scripts)

Getting styles (*.css)
- Same as above, only the file ending must be *.css. Optional default folder is K-Meleon/styles, or wherever you prefer.
Where "userstyles.org" are hiding access to their files or code I'm not sure, must be directly above their "feedback" title, but somehow hidden. If the style is also available as a "userscript", you can alternatively use the install link in their right upper corner and keep ending *.js But in general using the css-version is safer and recommended.



Edited 6 time(s). Last edit at 09/09/2014 07:19AM by siria.

Attachments: StyleonMini.kmm (7.2 KB)   0_STYLEON_REPEAT (409 bytes)  
Options: ReplyQuote
Re: StyleonMini (ultralong bookmarklets / javascript / userscripts)
Posted by: siria
Date: September 08, 2014 10:19PM

And already a little update to version-2, see above.
Fixed a syntax error, and added possibility to call the macro together with a fix file, in that case it can run silently without asking for a file first. Can be used in shortcuts etc. Explanation inside the kmm-file (=text file).
Note: If short javascripts don't run in KM1.7, also look inside the kmm how to fix it.

Attachments: StyleonMini_screen.png (17.1 KB)  
Options: ReplyQuote


K-Meleon forum is powered by Phorum.