(safely / securely, or relatively so)
You received this message because you are subscribed to the Google Groups "greasemonkey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to greasemonkey-us...@googlegroups.com.
To post to this group, send email to greasemon...@googlegroups.com.
Visit this group at http://groups.google.com/group/greasemonkey-users.
For more options, visit https://groups.google.com/d/optout.
On Dec 3, 2014, at 9:18 PM, GmUser <pop...@p-t-b.com> wrote:
-- Klaus Johannes Rusch klaus...@atmedia.net http://klausrusch.atmedia.net/
I FINALLY found a solution to my problem. It's kind of "stupid", because, although you are limited in what URL
you can use to inject a script into certain CSP-protected documents,
you can insert ANY text DIRECTLY into the document. (now watch them
take that away from us, too) Of course, there is (still?) usually
some limit to the size of a saved bookmarklet, but I (needed to)
get around that. (plus the "squishing" and such needed in bookmarklets) The solution is fairly simple using a Greasemonkey userscript.
I don't know why people who supposedly know how the "new" stuff
file (which is loaded as a SNAPSHOT into the Gm directory that
holds the userscript upon installation -- there are some issues
with that and modifications/reload to the referenced source file --
so I directly edit the snapshot file), get the contents of it,
and directly insert that .JS file document text using the script object
.text property instead of the .src property. I also didn't want to load the library into every page, so I made
the bookmarklet "communicate" with the userscript and let it know
that it wants the library loaded, and then it executes the library
bookmarklet function after 1/5th of a second. This is the script I use to load my bookmarklets library now:
the function I want to call in the library. I kept the "communication" between the userscript and the
bookmarklet simple. So far it has worked. Although one time
it may not have, so you might want to either decrease the
"check for request time" to 50 and/or increase the
"execute bookmarklet function" time to 250.
I haven't noticed any noticeable lag time because it's
only about 1/5th of a second. So far it works great. I can now execute my bookmarklets
from Twitter, Facebook, Google, and anywhere else and
and https:// "secure" website.
So I suppose this will work until someone does something
else to screw us over. btw -- I am using Pale Moon now ("old-style Firefox"),
so I don't know if there are any differences in Firefox, Chrome, etc.