User:Tom/Greasemonkey Script
From Homestar Runner Wiki
I've been developing the following Greasemonkey script to allow one to have links to Wiki articles from Homestar Runner toons. It's pretty cool. Feel free to help out by adding toons, etc. in the same format. I started with the Strong Bad Emails, since they just go nicely along in order.
Code recommendations are also welcome, but everything works just fine as of right now.
// ==UserScript== // @name Homestar Runner - Add hrwiki.org links. // @namespace http://www.hrwiki.org/index.php/User:Tom/Greasemonkey_Script // @description Adds links to Homestar Runner Wiki articles from homestarrunner.com toons, etc. // @include http://www.homestarrunner.com/*.html // @include http://homestarrunner.com/*.html
// ==/UserScript==
(function() {
var file = window.location.pathname;
var a = document.createElement('a');
var wikiPage;
if (file == 'answer1.html') {
wikiPage = 'Marzipan\'s_Answering_Machine_Version_1'; }
if (file == '/answer2.html') {
wikiPage = 'Marzipan\'s_Answering_Machine_Version_2'; }
if (file == '/answer3.html') {
wikiPage = 'Marzipan\'s_Answering_Machine_Version_3'; }
if (file == '/answer4.html') {
wikiPage = 'Marzipan\'s_Answering_Machine_Version_4'; }
if (file == '/answer5.html') {
wikiPage = 'Marzipan\'s_Answering_Machine_Version_5'; }
if (file == '/answer6.html') {
wikiPage = 'Marzipan\'s_Answering_Machine_Version_6'; }
if (file == '/answer7.html') {
wikiPage = 'Marzipan\'s_Answering_Machine_Version_7'; }
if (file == '/answer8.html') {
wikiPage = 'Marzipan\'s_Answering_Machine_Version_8'; }
if (file == '/answer9.html') {
wikiPage = 'Marzipan\'s_Answering_Machine_Version_9'; }
if (file == '/answer10.html') {
wikiPage = 'Marzipan\'s_Answering_Machine_Version_10'; }
if (file == '/answer11.html') {
wikiPage = 'Marzipan\'s_Answering_Machine_Version_11'; }
if (file == '/answer12.html') {
wikiPage = 'Marzipan\'s_Answering_Machine_Version_12'; }
if (file == '/sickday.html') {
wikiPage = 'Sick_Day'; }
if (file == '/trogdorcon.html') {
wikiPage = 'TrogdorCon_\'97'; }
if (file == '/lilbrudder.html') {
wikiPage = 'The_Li\'l_Brudder_Show'; }
if (file == '/filmstyle.html') {
wikiPage = 'Peasant\'s_Quest_Movie_Trailer'; }
if (file == '/pqtrailer.html') {
wikiPage = 'Peasant\'s_Quest_Preview'; }
if (file == '/expfilm.html') {
wikiPage = 'Experimental_Film'; }
if (file == '/senormortgage.html') {
wikiPage = 'Senor_Mortgage'; }
if (file == '/cheatcereal.html') {
wikiPage = 'Cheat_Commandos...O\'s'; }
if (file == '/cheatar.html') {
wikiPage = 'The_Cheatar'; }
if (file == '/cheatcommando.html') {
wikiPage = 'Cheat_Commandos'; }
if (file == '/mrshmallow.html') {
wikiPage = 'Mr._Shmallow'; }
if (file == '/sneakvideo.html') {
wikiPage = 'Ballad_of_the_Sneak'; }
if (file == '/whatsinthebag.html') {
wikiPage = 'Lookin_at_a_Thing_in_a_Bag'; }
if (file == '/arcadegame.html') {
wikiPage = 'Arcade_Game'; }
if (file == '/20x6vs1936.html') {
wikiPage = '20X6_vs._1936'; }
if (file == '/systemisdown.html') {
wikiPage = 'The_System_is_Down'; }
if (file == '/marshie.html') {
wikiPage = 'Meet_Marshie'; }
if (file == '/interview.html') {
wikiPage = 'The_Interview'; }
if (file == '/fluffypuff2.html') {
wikiPage = 'Fluffy_Puff_Commercial'; }
if (file == '/video.html') {
wikiPage = 'Theme_Song_Video'; }
if (file == '/old.html') {
wikiPage = 'Kick_The_Can'; }
if (file == '/sbsings.html') {
wikiPage = 'Strong_Bad_Sings'; }
if (file == '/dumpingtontoon.html') {
wikiPage = 'A_Folky_Tale'; }
if (file == '/coolthings.html') {
wikiPage = 'Cool_Things'; }
if (file == '/buginmouth.html') {
wikiPage = 'Bug_in_Mouth_Disease'; }
if (file == '/commandos3.html') {
wikiPage = 'Shopping_for_Danger'; }
if (file == '/jailcartoon.html') {
wikiPage = 'Strong_Bad_is_in_Jail_Cartoon'; }
if (file == '/parsnips.html') {
wikiPage = 'Parsnips_A-Plenty'; }
if (file == '/whereis.html') {
wikiPage = 'Where\'s_The_Cheat?'; }
if (file == '/luau2.html') {
wikiPage = 'The_Luau'; }
if (file == '/cantsayjob.html') {
wikiPage = 'A_Jorb_Well_Done'; }
if (file == '/radish.html') {
wikiPage = 'The_Reddest_Radish'; }
if (file == '/yellodellomenu.html') {
wikiPage = 'In_Search_of_the_Yello_Dello'; }
if (file == '/kingmenu.html') {
wikiPage = 'The_King_of_Town'; }
if (file == '/fireworks.html') {
wikiPage = 'Happy_Fireworks'; }
if (file == '/senorialday.html') {
wikiPage = 'Senorial_Day'; }
if (file == '/payplus.html') {
wikiPage = 'HomestarRunner.com_PAY_PLUS!'; }
if (file == 'xmas04.html') {
wikiPage = 'Homestar_Presents_Presents'; }
if (file == 'xmas04_pq.html') {
wikiPage = 'Snowglobe'; }
if (file == '/ween04.html') {
wikiPage = 'Halloween_Fairstival'; }
if (file == '/oldtimeyween.html') {
wikiPage = 'That_A_Ghost'; }
if (file == '/dween_kidsbook.html') {
wikiPage = 'That_Time_of_Year'; }
if (file == '/dween_cakes.html') {
wikiPage = 'Decemberween_Sweet_Cuppin\'_Cakes'; }
if (file == '/dween_tgs.html') {
wikiPage = 'Decemberween_Teen_Girl_Squad'; }
if (file == '/seasonalsweaters.html') {
wikiPage = 'Seasonal_Sweaters'; }
if (file == '/underconstruction.html') {
wikiPage = 'Under_Construction'; }
if (file == '/ween03.html') {
wikiPage = '3_Times_Halloween_Funjob'; }
if (file == '/costumes.html') {
wikiPage = 'Fan_Costume_Commentary'; }
if (file == '/malloween.html') {
wikiPage = 'Malloween_Commercial'; }
if (file == '/superbowl.html') {
wikiPage = 'Superbowl_Dealie'; }
if (file == '/xmas2002.html') {
wikiPage = 'A_Decemberween_Pageant'; }
if (file == '/halloween2002.html') {
wikiPage = 'Pumpkin_Carve-nival'; }
if (file == '/xmas2001.html') {
wikiPage = 'The_Best_Decemberween_Ever'; }
if (file == '/turkey.html') {
wikiPage = 'Some_Stupid_Turkey'; }
if (file == '/halloween2001.html') {
wikiPage = 'The_House_That_Gave_Sucky_Treats'; }
if (file == '/mother.html') {
wikiPage = 'A_Mother\'s_Day_Message'; }
if (file == '/xmas.html') {
wikiPage = 'A_Holiday_Greeting'; }
if (file == '/homestarloween.html') {
wikiPage = 'Homestarloween_Party'; }
if (file == '/bizcasfri3.html') {
wikiPage = 'Biz_Cas_Fri_3'; }
if (file == '/bizcasfri2.html') {
wikiPage = 'Biz_Cas_Fri_2'; }
if (file == '/bizcasfri1.html') {
wikiPage = 'Biz_Cas_Fri_1'; }
if (file == '/sbvslilgirl.html') {
wikiPage = 'Strong_Bad_vs._Little_Girl!'; }
if (file == '/puppetween.html') {
wikiPage = 'Homestar_vs._Little_Girl_2'; }
if (file == '/laborday.html') {
wikiPage = 'Labor_Dabor'; }
if (file == '/puppetjam4.html') {
wikiPage = 'Puppet_Jam_Mission_Control'; }
if (file == '/puppetjam3.html') {
wikiPage = 'Puppet_Jam_Vitamins/Celebrities'; }
if (file == '/puppetjam2.html') {
wikiPage = 'Puppet_Jam_Tropical_Lazor_Beams'; }
if (file == '/puppetjam1.html') {
wikiPage = 'Puppet_Jam_Bad_Jokes'; }
if (file == '/puppettime.html') {
wikiPage = 'Puppet_Time'; }
if (file == '/puppets.html') {
wikiPage = 'Everybody_Knows_It'; }
if (file == '/dween_puppet2.html') {
wikiPage = 'Homestar_vs._Little_Girl'; }
if (file == '/dween_puppet1.html') {
wikiPage = 'Decemberween_Puppet_Style'; }
if (file == '/newboots.html') {
wikiPage = 'New_Boots'; }
if (file == '/crazycartoon.html') {
wikiPage = 'Crazy_Cartoon'; }
if (file == '/fhqwhgads.html') {
wikiPage = 'Everybody_to_the_Limit'; }
if (file == '/cheatvideo.html') {
wikiPage = 'The_Cheat_Theme_Song'; }
if (file == '/sbemail1.html') {
wikiPage = 'some_kinda_robot'; }
if (file == '/sbemail2.html') {
wikiPage = 'homsar'; }
if (file == '/sbemail3.html') {
wikiPage = 'butt_IQ'; }
if (file == '/sbemail4.html') {
wikiPage = 'homestar_hair'; }
if (file == '/sbemail5.html') {
wikiPage = 'making_out'; }
if (file == '/sbemail6.html') {
wikiPage = 'depressio'; }
if (file == '/sbemail7.html') {
wikiPage = 'halloweener'; }
if (file == '/sbemail8.html') {
wikiPage = 'brianrietta'; }
if (file == '/sbemail9.html') {
wikiPage = 'i_love_you'; }
if (file == '/sbemail10.html') {
wikiPage = 'trevor_the_vampire'; }
if (file == '/sbemail11.html') {
wikiPage = 'i_rule'; }
if (file == '/sbemail12.html') {
wikiPage = 'credit_card'; }
if (file == '/sbemail13.html') {
wikiPage = 'i_she_be'; }
if (file == '/sbemail14.html') {
wikiPage = 'duck_pond'; }
if (file == '/sbemail15.html') {
wikiPage = 'the_basics'; }
if (file == '/sbemail16.html') {
wikiPage = 'band_names'; }
if (file == '/sbemail17.html') {
wikiPage = 'studying'; }
if (file == '/sbemail18.html') {
wikiPage = 'stand-up'; }
if (file == '/sbemail19.html') {
wikiPage = 'tape-leg'; }
if (file == '/sbemail20.html') {
wikiPage = 'spring_cleaning'; }
if (file == '/sbemail21.html') {
wikiPage = 'cartoon'; }
if (file == '/sbemail22.html') {
wikiPage = 'sb_email_22'; }
if (file == '/sbemail23.html') {
wikiPage = 'little_animal'; }
if (file == '/sbemail24.html') {
wikiPage = 'the_bird'; }
if (file == '/sbemail25.html') {
wikiPage = 'super_powers'; }
if (file == '/sbemail26.html') {
wikiPage = 'CGNU'; }
if (file == '/sbemail27.html') {
wikiPage = '3_Wishes'; }
if (file == '/sbemail28.html') {
wikiPage = '1_step_ahead'; }
if (file == '/sbemail29.html') {
wikiPage = 'superhero_name'; }
if (file == '/sbemail30.html') {
wikiPage = '12:00'; }
if (file == '/sbemail31.html') {
wikiPage = 'sugarbob'; }
if (file == '/sbemail32.html') {
wikiPage = 'flag_day'; }
if (file == '/sbemail33.html') {
wikiPage = 'gimmicks'; }
if (file == '/sbemail34.html') {
wikiPage = 'weird_dream'; }
if (file == '/sbemail35.html') {
wikiPage = 'sisters'; }
if (file == '/sbemail36.html') {
wikiPage = 'guitar'; }
if (file == '/sbemail37.html') {
wikiPage = 'dullard'; }
if (file == '/sbemail38.html') {
wikiPage = 'helium'; }
if (file == '/sbemail39.html') {
wikiPage = 'property_of_ones'; }
if (file == '/sbemail40.html') {
wikiPage = 'vacation'; }
if (file == '/sbemail41.html') {
wikiPage = 'invisibility'; }
if (file == '/sbemail42.html') {
wikiPage = 'action_figure'; }
if (file == '/sbemail43.html') {
wikiPage = 'little_questions'; }
if (file == '/sbemail44.html') {
wikiPage = 'lures_&_jigs'; }
if (file == '/sbemail45.html') {
wikiPage = 'techno'; }
if (file == '/sbemail46.html') {
wikiPage = 'your_friends'; }
if (file == '/sbemail47.html') {
wikiPage = 'new_hands'; }
if (file == '/sbemail48.html') {
wikiPage = 'ghosts'; }
if (file == '/sbemail49.html') {
wikiPage = 'theme_party'; }
if (file == '/sbemail50.html') {
wikiPage = '50_emails'; }
if (file == '/sbemail51.html') {
wikiPage = 'website'; }
if (file == '/sbemail52.html') {
wikiPage = 'island'; }
if (file == '/sbemail53.html') {
wikiPage = 'comic'; }
if (file == '/sbemail54.html') {
wikiPage = 'morning_routine'; }
if (file == '/sbemail55.html') {
wikiPage = 'cheat_talk'; }
if (file == '/sbemail56.html') {
wikiPage = 'current_status'; }
if (file == '/sbemail57.html') {
wikiPage = 'japanese_cartoon'; }
if (file == '/sbemail58.html') {
wikiPage = 'dragon'; }
if (file == '/sbemail59.html') {
wikiPage = 'marzipan'; }
if (file == '/sbemail60.html') {
wikiPage = 'huttah!'; }
if (file == '/sbemail61.html') {
wikiPage = 'monster_truck'; }
if (file == '/sbemail62.html') {
wikiPage = 'interview'; }
if (file == '/sbemail63.html') {
wikiPage = 'fingers'; }
if (file == '/sbemail64.html') {
wikiPage = 'english_paper'; }
if (file == '/sbemail65.html') {
wikiPage = 'unused_emails'; }
if (file == '/sbemail66.html') {
wikiPage = 'the_show'; }
if (file == '/sbemail67.html') {
wikiPage = 'autobiography'; }
if (file == '/sbemail68.html') {
wikiPage = 'caper'; }
if (file == '/sbemail69.html') {
wikiPage = 'personal_favorites'; }
if (file == '/sbemail70.html') {
wikiPage = 'big_white_face'; }
if (file == '/sbemail71.html') {
wikiPage = '2_emails'; }
if (file == '/sbemail72.html') {
wikiPage = 'crazy_cartoon'; }
if (file == '/sbemail73.html') {
wikiPage = 'mascot'; }
if (file == '/sbemail74.html') {
wikiPage = 'privileges'; }
if (file == '/sbemail75.html') {
wikiPage = 'funny'; }
if (file == '/sbemail76.html') {
wikiPage = 'sibbie'; }
if (file == '/sbemail77.html') {
wikiPage = 'suntan'; }
if (file == '/sbemail78.html') {
wikiPage = 'anything'; }
if (file == '/sbemail79.html') {
wikiPage = 'the_process'; }
if (file == '/sbemail80.html') {
wikiPage = 'stunt_double'; }
if (file == '/sbemail81.html') {
wikiPage = 'date'; }
if (file == '/sbemail82.html') {
wikiPage = 'impression'; }
if (file == '/sbemail83.html') {
wikiPage = 'labor_day'; }
if (file == '/sbemail84.html') {
wikiPage = 'kids\'_book'; }
if (file == '/sbemail85.html') {
wikiPage = '2_years'; }
if (file == '/sbemail86.html') {
wikiPage = 'no_loafing'; }
if (file == '/sbemail87.html') {
wikiPage = 'mile'; }
if (file == '/sbemail88.html') {
wikiPage = 'couch_patch'; }
if (file == '/sbemail89.html') {
wikiPage = 'local_news'; }
if (file == '/sbemail90.html') {
wikiPage = 'colonization'; }
if (file == '/sbemail91.html') {
wikiPage = 'caffeine'; }
if (file == '/sbemail92.html') {
wikiPage = 'kind_of_cool'; }
if (file == '/sbemail93.html') {
wikiPage = 'army'; }
if (file == '/sbemail94.html') {
wikiPage = 'video_games'; }
if (file == '/sbemail95.html') {
wikiPage = 'the_bet'; }
if (file == '/sbemail96.html') {
wikiPage = 'lackey'; }
if (file == '/sbemail97.html') {
wikiPage = 'monument'; }
if (file == '/sbemail98.html') {
wikiPage = 'stupid_stuff'; }
if (file == '/sbemail99.html') {
wikiPage = 'different_town'; }
if (file == '/sbemailahundred.html') {
wikiPage = 'flashback'; }
if (file == '/sbemail101.html') {
wikiPage = 'car'; }
if (file == '/sbemail102.html') {
wikiPage = 'lunch_special'; }
if (file == '/sbemail103.html') {
wikiPage = 'haircut'; }
if (file == '/sbemail104.html') {
wikiPage = 'theme_park'; }
if (file == '/sbemail105.html') {
wikiPage = 'replacement'; }
if (file == '/sbemail106.html') {
wikiPage = 'dangeresque_3'; }
if (file == '/sbemail107.html') {
wikiPage = 'cheatday'; }
if (file == '/sbemail108.html') {
wikiPage = 'pom_pom'; }
if (file == '/sbemail109.html') {
wikiPage = 'crying'; }
if (file == '/sbemail110.html') {
wikiPage = 'for_kids'; }
if (file == '/sbemail111.html') {
wikiPage = 'other_days'; }
if (file == '/sbemail112.html') {
wikiPage = 'old_comics'; }
if (file == '/sbemail113.html') {
wikiPage = 'pizzaz'; }
if (file == '/sbemail114.html') {
wikiPage = 'the_facts'; }
if (file == '/sbemail115.html') {
wikiPage = 'time_capsule'; }
if (file == '/sbemail116.html') {
wikiPage = 'extra_plug'; }
if (file == '/sbemail117.html') {
wikiPage = 'montage'; }
if (file == '/sbemail118.html') {
wikiPage = 'virus'; }
if (file == '/sbemail119.html') {
wikiPage = 'animal'; }
if (file == '/sbemail120.html') {
wikiPage = 'radio'; }
if (file == '/sbemail121.html') {
wikiPage = 'part-time_job'; }
if (file == '/sbemail122.html') {
wikiPage = 'dreamail'; }
if (file == '/sbemail123.html') {
wikiPage = 'origins'; }
if (file == '/sbemail124.html') {
wikiPage = 'secret_recipes'; }
if (file == '/sbemail125.html') {
wikiPage = 'rock_opera'; }
if (file == '/sbemail126.html') {
wikiPage = 'best_thing'; }
if (file == '/sbemail127.html') {
wikiPage = 'long_pants'; }
if (file == '/sbemail128.html') {
wikiPage = 'rampage'; }
if (file == '/sbemail129.html') {
wikiPage = 'garage_sale'; }
if (file == '/sbemail130.html') {
wikiPage = 'do_over'; }
if (file == '/sbemail131.html') {
wikiPage = 'boring_(really)'; }
if (file == '/sbemail132.html') {
wikiPage = 'modeling'; }
if (file == '/sbemail133.html') {
wikiPage = 'bottom_10'; }
if (file == '/sbemail134.html') {
wikiPage = 'record_book'; }
if (file == '/sbemail135.html') {
wikiPage = 'lady...ing'; }
if (file == '/sbemail136.html') {
wikiPage = 'geddup_noise'; }
if (file == '/sbemail137.html') {
wikiPage = 'bedtime_story'; }
var div = document.createElement("div");
a.href = "http://www.hrwiki.org/index.php/" + wikiPage; a.appendChild(document.createTextNode('HRWiki article')); div.appendChild(a); 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);
}
)();
