Image 01 Image 02

Neopets Quicklink Userscript

Posted on 11th July 2008 by Sebastian
3

As you may know, I’m quite fond of making userscripts for Greasemonkey, so naturally when I was bored tonight and my brother was browsing Neopets I thought to myself:

It’s a bit annoying having to go to PPT just for the quicklinks, isn’t it?

And thus it came to be that I decided to make a quick userscript to insert the quicklinks — painstakingly ripped from PPT by my brother while I was coding, I might add! — into the left sidebar on any Neopets page!

So, without further ado, I bring to you:

Install this script

Neopets Sidebar Quicklinks

Screenshot:

Neopets sidebar screenshot



3
Responses to.. Neopets Quicklink Userscript

1
inglebert posted on November 16th 2009

Success is not the result of spontaneous combustion. You must set yourself on fire.



2
joyharry posted on March 8th 2010

ok i installed the script and tried using it. at first it worked fine. then when i edited the links adding/removing it stopped working. now it doesnt show when i goto neopets. the code now looks like:

// ==UserScript==
// @name Neopets Sidebar Quicklinks
// @namespace http://www.mathemaniac.org
// @include http://www.neopets.com/*
// @include http://neopets.com/*
// ==/UserScript==

// Thanks to PinkPT.com for the quicklinks. :)

var quicklinks = new Array(
['Free Jelly','http://www.neopets.com/jelly/jelly.phtml'],
['Giant Omelette','http://www.neopets.com/prehistoric/omelette.phtml'],
['Bank','http://www.neopets.com/bank.phtml'],
['Shop of offers','http://www.neopets.com/shop_of_offers.phtml?slorg_payout=yes'],
['Weltrude's Toy Chest','http://www.neopets.com/petpetpark/daily.phtml'],
['                 .-=^=-.',''], //separator 1
['Altador Prizes','http://www.neopets.com/altador/hallofheroes.phtml'],
['Monthly freebies','http://www.neopets.com/freebies/index.phtml'],
['                 .-=^=-.',''], //separator 1
['Tombola','http://www.neopets.com/island/tombola.phtml'],
['Fruit Machine','http://www.neopets.com/desert/fruitmachine.phtml'],
['Coltzan's Shrine','http://www.neopets.com/desert/shrine.phtml'],
['Deposit Scarab','http://ncmall.neopets.com/mall/shop.phtml?page=giveaway'],
['',''], //separator 2
['Kreludor Meteor','http://www.neopets.com/moon/meteor.phtml'],
['Healing Springs','http://www.neopets.com/faerieland/springs.phtml'],
['Potato Counter','http://www.neopets.com/medieval/potatocounter.phtml'],
['tdmbgpop','http://www.neopets.com/faerieland/tdmbgpop.phtml'],
['Faerie Crossword','http://www.neopets.com/games/crossword/index.phtml'],
['Daily Puzzle','http://www.neopets.com/petcentral.phtml'],
['Symol Hole','http://www.neopets.com/medieval/symolhole.phtml'],
['Hide n Seek',http://www.neopets.com/games/hidenseek.phtml'],
['',''], //separator 2
['Quickstock','http://www.neopets.com/quickstock.phtml'],
['Safety Deposit','http://www.neopets.com/safetydeposit.phtml'],
['Newest 20 Trades','http://www.neopets.com/island/tradingpost.phtml?type=browse&criteria=20'],
['My Shop','http://www.neopets.com/market.phtml?type=your'],
['Shop Wizard','http://www.neopets.com/market.phtml?type=wizard'],
['',''], //separator 2
['Stockmarket portfolio','http://www.neopets.com/stockmarket.phtml?type=portfolio'],
['Shop Ads Board','http://www.neopets.com/neoboards/boardlist.phtml?board=11'],
['Trading/Auctions Board','http://www.neopets.com/neoboards/boardlist.phtml?board=6'],
['Keyquest','http://www.neopets.com/keyquest/redeem.phtml'],
['-=-=-=-=-=-=-',''], //separator 3
['Wishing Well','http://www.neopets.com/wishing.phtml'],
['Employment Agency','http://www.neopets.com/faerieland/employ/employment.phtml'],
['Auction House','http://www.neopets.com/auctions.phtml'],
['Neomail','http://www.neopets.com/neomessages.phtml'],
['-=-=-=-=-=-=-',''], //separator 3
['Wheel of Excitement','http://www.neopets.com/faerieland/wheel.phtml'],
['Wheel of Knowledge','http://www.neopets.com/medieval/knowledge.phtml'],
['Wheel of Mediocrity','http://www.neopets.com/prehistoric/mediocrity.phtml'],
['Wheel of Misfortune','http://www.neopets.com/halloween/wheel/index.phtml'],
['Wheel of Monotony','http://www.neopets.com/prehistoric/monotony/monotony.phtml'],
['Wheel of Slime','http://www.neopets.com/games/play.phtml?game_id=807'],
['Underwater Fishing','http://www.neopets.com/water/fishing.phtml'],
['Wise Old King','http://www.neopets.com/medieval/wiseking.phtml'],
['Grumpy Old King','http://www.neopets.com/medieval/grumpyking.phtml'],
['Advent Calendar','http://neopets.com/winter/adventcalendar.phtml'],
['Adver-Video','http://www.neopets.com/games/play.phtml?game_id=683'],
['Deserted Tomb','http://www.neopets.com/worlds/geraptiku/tomb.phtml']
['                 .-=^=-.',''], //separator 1
['',''], //separator 2
['-=-=-=-=-=-=-',''], //separator 3
['End Game','http://www.neopets.com/logout.phtml'] //End Game
);

var nfbox = document.evaluate('//div[contains(@class,"sidebarModule") and descendant::a[contains(@href,"neofriends")]]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;

if (nfbox) {
var qlbox = document.createElement('div');
qlbox.className = 'sidebarModule';
var qlboxtable = document.createElement('table');
qlboxtable.cellpadding = 2;
qlboxtable.cellspacing = 0;
qlboxtable.border = 0;
qlboxtable.className = 'sidebarTable';
qlboxtable.setAttribute('width',158);
var headertr = document.createElement('tr');
var headertd = document.createElement('td');
headertd.className = 'sidebarHeader medText';
headertd.appendChild(document.createTextNode('Quicklinks'));
headertr.appendChild(headertd);
qlboxtable.appendChild(headertr);
var bodytr = document.createElement('tr');
var bodytd = document.createElement('td');
bodytd.className = 'activePet sf';
for each (var qlink in quicklinks) {
var linka = document.createElement('a');
linka.setAttribute('style','font-weight: bold');
linka.href = qlink[1];
linka.appendChild(document.createTextNode(qlink[0]));

linka.target = "_blank"; //minor edit

bodytd.appendChild(linka);
bodytd.appendChild(document.createElement('br'));
}
bodytr.appendChild(bodytd);
qlboxtable.appendChild(bodytr);
qlbox.appendChild(qlboxtable);

nfbox.parentNode.insertBefore(qlbox,nfbox.nextSibling);
}

wat did i do wrong? i dont understand why it stopped working. u can reply via userscripts (dot) org cuz i commented there 2



3

You forgot a few escapes, a ‘ and a ,: http://pastebin.com/diff.php?i=EhtptfkA

I can recommend using an editor with syntax highlighting, such as Notepad++ when editing code. 🙂



Leave a reply...