User talk:Phlip/Greasemonkey

From Homestar Runner Wiki

Jump to: navigation, search

Release notes

Version 1.0 (8 Mar, 2006)

  • First released version.
  • Had the fullscreen, seek bar, prev/next and wiki link features.
  • Worked only on the main site.

Version 2.0 (26 May, 2006)

  • Added the preferences menu.
  • Added support for Videlectrix and the HRWiki mirror.
  • Added "outside the frame", April Fools and plain HTML navbar options.

Version 2.1 (8 Aug, 2006)

  • Tooltips in the preferences box.
  • The "more better" rando link is now always on... the less better version was just ugly, so I removed it.
  • You can set what types of toon are included in the rando selection.
  • You have the option to make it check if the next sbemail/whatever actually exists before putting the "next" link (so there's no "next" link on the latest email).
    • The only reason this wasn't there before is that it means an extra hit to the H*R servers... but now that I have the preferences things set up, so you can turn it on or off, I think that's fine.

Version 3.0 (29 Aug, 2006)

  • Added subtitling functionality.
  • Updating no longer requires uninstalling the previous version.

Version 3.1 (27 Sep, 2006)

  • Whether to show the names next to subtitles is now a distinct setting from the one for colours - you can have neither, either or both.
  • There is a button that will purge the local cache for all subtitles-related files downloaded from the wiki and reload the page, for when the cache is out of date.
  • The ability to update the test subtitles without refreshing the page for every change (NB: disabled by default, see below).
  • Rewind and fast forward buttons on the seek bar to go to the first/last frame, respectively.
  • Flash loading progress bar on the seek bar (see how much it's loaded).

Version 3.2 (25 Sep, 2007)

  • Add option to automatically check for script updates (on by default).

Contents


Suggestion

Would it make sense to change line 272 to

		addHRWikiLink("Index_Page");

Then I suppose line 261 could be removed. By the way, amazing work Phlip. -- Tom 17:25, 7 March 2006 (UTC)

I suggest that the games on videlectrix.com should be added, such as

http://www.videlectrix.com/duckguard1.html
http://videlectrix.com/duckguard1.html
http://www.videlectrix.com/racewalk.html
http://videlectrix.com/racewalk.html
http://www.videlectrix.com/hallrunner.html
http://videlectrix.com/hallrunner.html
http://www.videlectrix.com/lcd_game.html
http://videlectrix.com/lcd_game.html
http://www.videlectrix.com/thydungeonman2.html
http://videlectrix.com/thydungeonman2.html

And yeah, you rock. Libertyernie 16:32, 8 April 2006 (UTC)

Hmm, that's a good point... I'll get on that sometime (probably tomorrow). --phlip TC 16:37, 8 April 2006 (UTC)
The reason I thought of this was because I realized the Pause button on the seekbar can be used for skipping a level in Duck Guardian. Libertyernie 21:47, 12 April 2006 (UTC)

Homestar-Fullon Edit

Using the user script I was getting a scrollbar on every page, so I edited line 411 from

var dh = window.innerHeight - 10;

to

var dh = window.innerHeight - 20;

This kept all the content in the window, but I didn't have to scroll down to see the navbar at the bottom. Did this happen to anyone else? Consonance 08:39, 23 June 2006 (UTC)

Not me. Works perfectly for me. --Y2K (15px-Crystal_Clear_app_xchat.png15px-Crystal_Clear_app_kedit.png15px-Crystal_Clear_app_email.png) 03:04, 14 July 2006 (UTC)

Eventual to-do list

(in no particular order)

  • Done General cleanup of the code.
  • Done Work on Videlectrix.
  • Done Work on the mirrors (kitkorp (not needed with Tom working on completing the HRWiki mirror) and HRWiki).
  • Done Some way of turning various features on and off maybe?
  • Done replace the navbar with text links (this is more for me than for you guys).
  • Done resize the seek bar when the toon resizes (if you resize the window)
  • Done show outside-the-frame stuff

Feel free to add suggestions. --phlip TC 21:38, 9 April 2006 (UTC)

I've got one. You could try "flipping the whole page upside down". You know, using the flipped navbar, too. And putting the navbar above the flipped toon/game.
Also, you could try adding A-B repeat to the seek bar, if you know enough to do that. Preferably make it a seperate sub-option in the prefs, too.
Totally not getting old, Y2K (15px-Crystal_Clear_app_xchat.png15px-Crystal_Clear_app_kedit.png15px-Crystal_Clear_app_email.png) 22:57, 5 June 2006 (UTC)

Errors in installing

I keep getting this error:

Error installing user script:

[Exception... "Compoment returned failure code: 0x804b000a [nsIIOService.newChannel]" nsresult: "0x804b000a (<unknown>)" location: "JS frame :: chrome://strongbademailsprevnext/content/browser.xul :: getContents :: line 20" data: no]

Any suggestions? —NFITC1talk 07:56, 16 August 2006 (UTC)

"strongbademailsprevnext"? I'm guessing you have this extension installed? You might want to uninstall that... this script does that stuff too. --phlip TC 08:01, 16 August 2006 (UTC)
Nope. I only have the script that allows it to be viewed 'full-screen'. —NFITC1talk 22:34, 16 August 2006 (UTC)
Nevermind. Turns out that they were both conflicting and I was misinterpreting the second error message. Thanks! —NFITC1talk 22:40, 16 August 2006 (UTC)

Just as a side-note for people who run into the same problem I did: if you use a program that blends its own Javascript functions into every page you load (mainly found in ad-munching software, like Ad Muncher), make sure you disable it BEFORE installing the Greasemonkey script. Otherwise the extra code might break it, requiring you to clear your cache and install it again with the filters disabled. MNGoldenEagle 14:24, 28 September 2006 (UTC)

HOW THE HECK!?!?!?!?!

HOW DID YOU MAKE THIS!?!?! TheThin 00:36, 18 September 2006 (UTC)

Phlip has studied necromancy and sorcery for many years now. Other than that, it's a good diet, exercise, and a modicum of good fortune. Qermaq - (T/C) Image:Qermaqsigpic.png 00:44, 18 September 2006 (UTC)
Phlip has access to both a monkey and a typewriter, so it really was only a matter of time. — It's dot com 00:46, 18 September 2006 (UTC)
No, no, no... I sold my soul to Haxxina, ancient Greek goddess of programming and ruler of the underworld. In return She gave me the ability to write this script as my superpower. Just don't make me say my name backwards minus the first 'P' and we should be fine. --phlip TC 00:52, 18 September 2006 (UTC)
We'll be out a free lunch special? Qermaq - (T/C) Image:Qermaqsigpic.png 00:58, 18 September 2006 (UTC)

Refresh Subtitles

OK, this feature will need some explaining... First, go Tools→Manage User Scripts, click on "Homestar All-in-one" and click "Edit". If it asks you to choose a text editor, just pick Notepad unless you have something better. It'll look ugly in Notepad (it doesn't recognise the line endings) but it'll work. Now search for if (settings.testsubs && false) and change it to if (settings.testsubs && true). Now you can use the feature. First you have to turn on "Test subtitles" and hit "Save and apply" as usual, but the next time after the page loads there'll be a "Refresh Subtitles" button below the text area, that re-parses the subtitles without reloading the page - invaluable to subtitle authors.

The reasons the option's not avaliable by default are:

  • The interface is clumsy... sometimes the button's there, sometimes it's not there... depending on whether the test subtitles were already enabled before the page loaded... given it's something that's supposed to update stuff without a page load it can be confusing.
  • It's not exhaustively tested, and has some weird side-effects (it calls savesettings, so if you, say, turn off the seekbar and hit "Reload Subtitles" the seekbar will remain, but it'll save that you want the seekbar turned off)...
  • It's not permanent... Version 4.0 will hopefully make it so that all settings work like this, and clicking "Save and Apply" won't have to reload the page.

So it's there if you want it, but it's not cluttering up the settings boxes of people that don't want it.

Anyways, enjoy! --phlip TC 03:30, 27 September 2006 (UTC)

Greasemonkey install method

GM's changed the way it installs scripts by link. A single-click on the link will offer to install the script, the option isn't even on the right click menu anymore. --AndrewNeo 17:20, 31 October 2006 (UTC)

Just the seek bar

Maybe for use on other sites, you could individually release the code for the seekbar. (And, if possible, include the preferences from the whole script, plus maybe external CSS skin support.) --Y2K (15px-Crystal_Clear_app_xchat.png15px-Crystal_Clear_app_kedit.png15px-Crystal_Clear_app_email.png) 04:00, 16 January 2007 (UTC)

spellcheck

"Homestar" is misspelled in the warning section of the heap-o-comments at the beginning. Page is locked or I'd fix it myself. — User:ACupOfCoffee@ 07:08, 22 February 2007 (UTC)

Uniformity matters... again

Since "podcast" was added recently to the navbar, can you please update that? --Addict 2006 20:55, 2 March 2007 (UTC)

Done. --phlip TC 10:54, 4 March 2007 (UTC)

Is it just me or is this broken?

One day the fullon part stopped working for me. And the Subtitles. And the seek bar. The corner buttons are still there. --68.55.198.213 11:57, 13 June 2007 (UTC)

It's still working fine for me. What did you do the day that it broke? Did you install any other extensions, or scripts, or upgrade anything? --phlip TC 12:03, 13 June 2007 (UTC)
So It's just me. That's good to know. I poked around in the system, and determined an update to flashblock borked it. I normally don't unblock flash (even for homestarrunner.com). Adding it to the whitelist fixed the problem. Before that update, they both worked together. Thanks, and I hope this info helps someone.--68.55.198.213 13:11, 21 June 2007 (UTC)

Not working in nightly build =(

In the nightly build of Firefox (Dubbed Minefield), the script has limited functionality. The subtitle language selector doesn't work, as there are no options. I will try to clean up to make it work..right.

onekopaka 02:14, 5 July 2007 (UTC)

By design, if subtitles are turned off, the script doesn't contact the wiki at all. When you turn the subtitles on, it tries to download the list of supported languages then. The list is empty until that finishes (I suppose I should put a "Loading..." message in there...). So wait a bit, see if it turns up. Failing that, it is a nightly build after all, you should expect some things to be broken... the name "Minefield" isn't just for show... chances are, it's a problem with either GM_xmlhttpRequest or DOMParser... and if so, then it's either a Firefox issue or a GreaseMonkey issue, and there's little I can do about it. --phlip TC 03:15, 5 July 2007 (UTC)
After looking in a Debug Console, the blame goes to..... Greasemonkey! onekopaka 06:40, 17 November 2007 (UTC)
Firefox 3's document.getElementById is changed so that it returns the first object. If you're using it, you might want to read up on MDC (http://developer.mozilla.org/) --24.17.113.45 06:50, 9 May 2008 (UTC)

Typo...

You mispelled automatically. Don't press that button. 10:08, 20 July 2007 (UTC)

I somehow think that's intentional. DEI DAT VMdatvm center\super contra 11:05, 20 July 2007 (UTC)
If you're referring to "automagically", then yes, that's intentional. --phlip TC 04:24, 21 July 2007 (UTC)

Podcast/Podstar

	addnavbarlink(newnavbar, "http://www.homestarrunner.com/toons.html", "Toons");
	addnavbarlink(newnavbar, "http://www.homestarrunner.com/games.html", "Games");
	addnavbarlink(newnavbar, "http://www.homestarrunner.com/characters2.html", "Characters");
	addnavbarlink(newnavbar, "http://www.homestarrunner.com/downloads.html", "Downloads");
	addnavbarlink(newnavbar, "http://homestarrunner.stores.yahoo.net/", "Store");
	addnavbarlink(newnavbar, "http://www.homestarrunner.com/sbemail.html", "SB Emails");
	addnavbarlink(newnavbar, "http://www.homestarrunner.com/email.html", "Contact");
	addnavbarlink(newnavbar, "http://podstar.homestarrunner.com/", "Podstar");
	addnavbarlink(newnavbar, "http://www.homestarrunner.com/legal.html", "Legal");
	randolink = addnavbarlink(newnavbar, "javascript:alert('rando.xml not loaded yet... be patient')", "Rando");


Where it says Podstar, it should say Podcast. On main_nav.swf, it says podcast. Here, is says Podstar. Incorrect. --The Goblin!! 19:00, 29 July 2007 (UTC)

The feature is called Podstar Runner, though. --DorianGray 19:48, 29 July 2007 (UTC)
My bad. Fixed. --phlip TC 00:41, 30 July 2007 (UTC)
Yes, but if the purpose is to simulate the real main_mav bar, then it should be podcast. --The Goblin!! 01:24, 30 July 2007 (UTC)
Yes. That's why I fixed it. --phlip TC 01:26, 30 July 2007 (UTC)
Ah. You posted while I was still posting. --The Goblin!! 22:31, 31 July 2007 (UTC)

Just a question...

Are you ever going to put this in the Greasemonkey Script Repository? Just wondering... --Mario2.PNG Super Martyo boing! 18:54, 6 August 2007 (UTC)

Actually, that's the old Greasemonkey script place thing. The new one is at userscripts.org. Bluebry 19:00, 6 August 2007 (UTC)

not working

i installed greasemonkey but there isnt anything under tools. you do mean tools that is above the adress bar, right? Slipknot6477 22:57, 7 December 2007 (UTC)

Tablet stuff

Hey, this is a really neat script. Anyway, I use a tablet computer, and I've noticed that, when viewing a toon in portrait (tall) mode, the toon will cover up the top two buttons ("settings" and "wiki") if the script is set to scale the toon to full size. This is, I imagine, because the script expects the screen to be wider than it is tall, as most computer screens are... so when that is not the case, the toon sticks around the top of the page and covers up those key buttons. This doesn't happen in normal, "landscape" mode because the toon is horizontally centered across a wide screen. If the toon were vertically centered as well, or at least nudged sixteen pixels downward when on a tall screen, those buttons and their inherent usefulness would be unveiled for all. ("Landscape" mode is, of course, the better option for viewing Homestar Runner, but I think this would be a pretty good fix nonetheless.)

There are some other things: in Firefox 3.0 beta 4, the seek bar extends too far to the right, visually (covering up the buttons to its right), and does not seem to work for changing your place in the toon. Also, the script never seems to be able to load subtitles, perpetually leaving "loading" in place of subtitle options in the pulldown menu. Oh, and the "settings" bar has most of its scrollbar obscured by the toon, oddly, though it still works.

I hope this helps in working out any kinks. If nobody else can reproduce these errors, I can provide more details. Anyway, thanks!24.22.64.228 05:18, 2 April 2008 (UTC)

30 Frames fix?

For some reason, with the SBCG4AP "ad," the seek bar doesn't work at all. It counts the frame, but all the buttons (besides the zoom) doesn't work. --76.210.181.251 21:08, 10 April 2008 (UTC)

This has nothing to do with the high framerate (which is 24 anyway, not 30), and everything to do with the fact that the HTML file is on homestarrunner.com, but the flash file is on Telltale's servers... Flash's security gets in the way, and there's nothing that can be done about it. Best I can do is make it so that the seekbar is disabled on that toon (or, at least, make it more obvious that it's informative only, and you can't use it to control the playback). Which I'm working on. --phlip TC 04:53, 12 April 2008 (UTC)

3.2.3 broken in FF 2?

I can't get the subtitles if I upgrade to 3.2.3. I'm using FF 2. I see that it was changed for tweaks for Firefox 3...did you notice that it breaks it in FF 2? I don't think a version that breaks it in the current version of Firefox should be released to the update. --Mini-Geek 16:36, 9 June 2008 (UTC)

Oops... I didn't think to regression-test the changes in Fx 2... yeah, that doesn't work. The deal is that, in an earlier version of GreaseMonkey, DOMParser wasn't available for GM scripts to use... and you had to use some workaround to get at it. That workaround didn't work in Fx 3, but the site I got it from listed another option that did. Turns out that other option doesn't work in Fx 2. It also turns out that the workaround isn't necessary at all any more. It's gone now, and the script works in both Fx 2 and 3 (it should auto-update again in the next day or so). --phlip TC 08:55, 10 June 2008 (UTC)
Thanks, it works now. --Mini-Geek 14:26, 10 June 2008 (UTC)

Trouble dragging in FF3

If you try to drag the seek bar, but are already moving the mouse when you start dragging (move it faster if it doesn't do it for you), it messes up. By messes up, I mean it flashes the cursor between a circular crossout symbol and the normal cursor as you hold it down (still moving the movie as you move), then when you release, it keeps following your mouse until you click on it again. --Mini-Geek 20:04, 18 June 2008 (UTC)

Huh. That's... bizzare. I get a similar thing, but instead of the cursor-flashing thing you're saying, it actually starts dragging around a slightly-shrunk picture of the seekbar, and sometimes some of the surrounding buttons. I'll look into it (which I guess means I'll need to figure out how the drag-and-drop stuff in the seekbar actually works, since I didn't write that... that'll be "fun"). In the meantime: Don't do that. --phlip TC 08:55, 20 June 2008 (UTC)
"In the meantime: Don't do that." lol yeah...It's just that I do it accidentally pretty often now, and it's annoying. I'll try to avoid it in the meantime, though. Thanks for looking into it. --Mini-Geek 14:27, 20 June 2008 (UTC)
OK, this is fixed, I think. I never found a way to reproduce it reliably, but I think I could get it about one try in 3 or 4... and I tried about 20 times now, and I can't get it to happen... let me know if it still happens for you. --phlip TC 13:38, 25 June 2008 (UTC)
It seems to work now. It hasn't happened since I updated. The random button now shows the correct tooltip. --Mini-Geek 21:35, 26 June 2008 (UTC)

Plain HTML Rando Not Working in FF3?

I am finding if I used the plain HTML navbar with the script, it is not working and I get a dialog box saying "rando.xml has not loaded yet. Be Patient." from homestarrunner.com. Is this an issue with the official site, or did something in FF3 break it?— Bassbone (TALK Strong Mad Has a Posse CONT) 22:20, 22 June 2008 (UTC)

It works for me, but shows the wrong URL when I roll over it. --Mini-Geek 16:52, 23 June 2008 (UTC)
The wrong-URL thing should be fixed now. Things were happening in the wrong order... the tooltip and the page it would send you to if you clicked matched, but the URL in the status bar was from the previous selection... I tweaked the timing a bit, so this doesn't happen any more. I couldn't reproduce the infinite "has not loaded yet" thing... try clicking the "Clear Subtitles Cache" button in the preferences screen... the same button will clear the rando.xml cache, forcing it to really try again to download it from the server. --phlip TC 13:38, 25 June 2008 (UTC)
Personal tools