

PS: The wrapping cruft I omitted is stuff that you almost never need in a GM/TM script. The beauty of Tampermonkey is, that its backward. These extensions are only as only as secure as the extensions you install. If you suspect keylogging or location logging, you can monitor network traffic and see that tampermonkey isn't really making many external calls with this data. Tampermonkey originated from Greasemonkey and is a Browser-Addon that allows you to run UserScripts. Tampermonkey source is technically available in your extension folder. Los scripts de usuario son pequeos programas de computadora que cambian el diseo de una pgina, agregan o eliminan nuevas funciones y contenido, o automatizan acciones. These extensions are only as only as secure as the extensions you install. Tampermonkey se utiliza para ejecutar los llamados scripts de usuario (a veces tambin llamados scripts de Greasemonkey) en sitios web.

If that's true, you don't need to try and store a jQuery object. Tampermonkey source is technically available in your extension folder. The question shows you are apparently just cloning HTML. Nowadays, JSON.stringify will just omit all the problematic properties, leaving you without the stuff you need the most.) (Once upon a time the attempt would throw a JS error. BUT your object is a complex jQuery object and these cannot be JSON encoded. Now for simple objects, you can GM_setValue them by first JSON encoding them. GM_setValue() only works on: strings, (some) integers and booleans. file:///C:/david/sandbox/jquery/index.htmlĪs you can see - Tampermonkey (I also tried this with Greasemonkey) appears to be stripping the jQuery out of the jQuery object.

Here's an HTML page to test the script on: Īnd here's the corresponding Tampermonkey/Greasemonkey script: // =UserScript= clone(), but when I set it as a value in Tampermonkey, it changes the value of the saved variable. I've created an example where I can do this in normal jQuery using. I'm trying to select DOM elements into a Tampermonkey variable using GM_setValue, for later injection on different pages.
