Quote
smallhagridSince I am still very happy using Rodocop's 75.1 Pro, I would like to be able to use a couple of userscripts now too.
This was what reminded me of this idea:
https://greasyfork.org/en/scripts/10096-general-url-cleaner
So I searched here for what might work and did find Burp's thread - and also the warning that his mod bundles both Greasemonkey and Greasify, so now I ask:
Will someone please tell me what will work to enable my usages of userscripts under 75.1 Pro ??
One of the most direly missed functions in KM (aside from a better adblock-addon), a native userscripts/styles addon, sigh. And in general of course, KM always direly missed anyone who could write any xpi-addons at all
Dorian adjusted NewsFox, which is also included natively, but guess that was about all. Meanwhile the situation hasn't exactly gotten any better in that regard, even almost all forum regulars have now deserted and left the forum
Can't help much with such stuff sorry, far beyond my limited skills.
As far as possible am helping myself with
macros of course, that works for some simpler cases this way:
When a page has finished loading, the macro looks if the URL is matching a rule (but not such supercomplicated rules as in your example script above)
Catch-1: macros can only start acting AFTER a page is already fully loaded
If the URL matches, the macro then either injects a little script already defined in its kmm-file, or it must use "readfile" to get the content of a specific local stored file (js or css or other), and then injects its content into the page.
Catch-2: Unlike FF-addons, KM macros can *not* append just the location of userfiles in the page header, that's forbidden by the engine.
Because if a macro would be allowed to append a
local file, so could the website authors too, and THEY must not. Unfortunately macros get no higher rights as the current website in that regard. I think this is actually controlled by a pref, which could be toggled, but of course only globally for the whole web, not just for macros. That's highly dangerous, so the macro is forced to store the whole (giant?) script contents inside the page source. Oh well. (If really need be, that pref could probably be toggled on/off only for the short duration of executing the macro, but haven't tried yet, toggling a pref back-forth with some JS between is very buggy and accident prone, and not even any chance without showing some useless popup between)
(
Catch-3 for old KM-versions before KM76RC2: file size for "readfile" was limited to 64 or even 32k
So, if you have a nice little script, with a nice little URL-comparison, and if it doesn't matter that it fires only after page loads, then such macros are very nice.
Merely
redirecting URLs is a different matter as injecting userfiles. Actually easier for macros, and there's also a Firefox Redirector "addon" which works great in KM too, and was posted somewhere in the forum awhile back...
But lets keep this topic focussed on
injecting userscripts by an addon like greasemonkey or similar.
As mentioned, have no clue of those personally, but you're quite computer-savvy - you'd be the perfect tester yourself! :cool:
As long as no expert shows up (very unlikely), what I'd suggest is you
just try and look what works. That's all that anyone else here could do too.
For example the greasy addon in the topic you mentioned, would be curious if the 'real' addon works without the additional greasify-stuff included too? Of course that would kill the settings menu, but IMO that can't have any effect anyway, storing completely different pref names. My theory is, if the real addon can work standalone, then the greasify macro could probably be copied and adjusted to write the other pref names. Next major prob: would just changing prefs be noticed by the addon, or does it need to be kicked first? Then it gets complicated again...
Edited 1 time(s). Last edit at 09/23/2019 10:49AM by siria.