User talk:Tom/Greasemonkey Script

From Homestar Runner Wiki

Jump to: navigation, search

Hm, I would hate to have to reinstall this script every time there's a new toon on In the interest of automation, would it be better to have the Greasemonkey script simply pick up the filename of the page it's sitting on? We've already created redirects such as sbemail1, sbemail2, etc. Why not create redirects from every other filename as well (like ween05, main7, etc.) and just have the Greasemonkey script send people to the wiki page for each filename?

Then the script would be reduced to the following:

// ==UserScript==
// @name		Homestar Runner - Add links.
// @namespace
// @description		Adds links to Homestar Runner Wiki articles from toons, etc.
// @include*.html
// @include*.html

// ==/UserScript==

(function() {
  var file = window.location.pathname;
  var a = document.createElement('a');

    var div = document.createElement("div");
	a.href = "" + file;
	a.appendChild(document.createTextNode('Homestar Runner Wiki article'));
	div.setAttribute("style", "text-align: left; left: 1px; bottom: 1px; background-color: white; padding: 2px 5px; position: absolute; z-index: 100;");
	document.body.insertBefore(div, document.body.firstChild);

Then, instead of having to update the script each time a new toon comes out, we just have to build a new redirect from the filename to the appropriate article. wikisig.gif Joey (talk·edits) 22:01, 31 October 2005 (UTC)

Because that would involve editing the Wiki to make it work. I wouldn't want to do that just so something personal that I use would work easier. -- Tom 02:05, 1 November 2005 (UTC)
Well, why don't we have a redirect for every filename out there? It's at least conceivable that someone would try to search using that. — It's dot com 02:08, 1 November 2005 (UTC)
Personally, I wouldn't want to be the one who went through and did all of that. A bot task maybe? -- Tom 02:13, 1 November 2005 (UTC)
We do have this nearly-complete handy list, for whichever human or bot would like to undertake this project. (And you know if the bot can't do it, an eager user surely will.) — It's dot com 02:16, 1 November 2005 (UTC)
Okay, let's see if User:GrapeNuts is up for it. -- Tom 01:04, 6 November 2005 (UTC)
Okay, GrapeNuts wasn't cooperating, so I added all the toons listed in HR:rando.xml. Now the menus, the secret stuff, and other pages can be added. -- Tom 02:12, 6 November 2005 (UTC)

[edit] Superceded?

Has this script been superceded by User:Phlip/Greasemonkey? If so, should it be noted as such? Qermaq - (T/C) Image:Qermaqsigpic.png 09:07, 24 December 2006 (UTC)

Done, thanks. -- Tom 17:55, 24 December 2006 (UTC)
Personal tools