On Mon, Jul 25, 2011 at 03:18, LWChris@LyricWiki <[email protected]> wrote:
>
> Hi, this is well meant but I'm afraid it won't work. Wikia does not have the
> "Vector" skin, is uses its own skin called "Oasis". Id's, layout, function
> names and CSS won't match. Furthermore, not only Wikia is different from
> Wikipedia, but also LyricWiki from common wikis: more than 95% of the
> content is either in templates, a special tag, headlines or numbered lists.
> Most of the edit userscripts are useless. LyricWiki has many special pages
> just for LyricWiki, and special rules to capitalization and stuff. To put it
> in a nutshell: understanding and adapting all the scripts to work with
> LyricWiki takes longer than writing them how I need and want them. And last
> but not least I don't learn anything from C&P, and it isn't that fun because
> you can't be proud like "yay it works" :D
>

Other trick is to
1. inject a script
2. let the script get the variables in content window and store them
in localStorage.
3. get the localStorage from your user script

Example (for Wikia):

let script = 
document.querySelector("head").appendChild(document.createElement("script"));
script.type = "text/javascript";
script.textContent = "localStorage['unique-string'] =
JSON.stringify({'name':wgUserName,'groups':wgUserGroups})";
let status = JSON.parse(localStorage["unique-string"]);
GM_log("Your username is " + status.name + " and you are a " + status.groups);

-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to