Skip to content

Instantly share code, notes, and snippets.

@teramako
Created February 3, 2011 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teramako/809658 to your computer and use it in GitHub Desktop.
Save teramako/809658 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name GM_test_01
// @description GM test 01
// @include *
// ==/UserScript==
window.FOO = "BAR";
if (this.sharedObject)
sharedObject.FOO = "SHARED BAR";
// ==UserScript==
// @name GM_test_02
// @description GM test 02
// @include *
// ==/UserScript==
window.setTimeout(function(self) {
console.log("window.FOO == 'BAR' ? : " + window.FOO);
if (self.sharedObject)
console.log("sharedObject.FOO == 'SHARED BAR' ? : " + sharedObject.FOO);
}, 1000, this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment