User:Vildricianus/toolbox.js

//

// links to toolbox $(function {  // add onload handler using code from wikibits.js

var pagetitleRe=/[^:]*:\/\/en\.wiktionary\.org\/(wiki\/|w\/index\.php\?title=)([^&?#]*)/; ptitle = pagetitleRe.exec(decodeURI(location.href))[2].split('_').join(' ');

var title; if (!(title = document.getElementById('t-whatlinkshere') )) return; if (!(title = title.getElementsByTagName('a')[0] )) return; if (!(title = title.href )) return; if (!(title = title.replace(/^.*title=Special:Whatlinkshere&target=/, '') )) return; if (!(title = title.replace(/^(Talk|User|Wiktionary|Image|MediaWiki|Template|Help|Category|Appendix|Concordance|Rhymes|Transwiki|Index|WT|Wikisaurus)(_talk)?:/, '') )) return; if (!(title = title.replace(/("|%22)/g, '') )) return;   if (!(title = title.replace(/_/g, '%20') )) return;

// yea, I wrote this myself! // liar var user; if( (window.location.href.indexOf("User:") != -1) || (window.location.href.indexOf("User_talk:") != -1) ) { regDropSubpages = /[User|User_talk]:([^&?\/]*)[\/]?.*/; user = regDropSubpages.exec(ptitle)[1]; }

// KJV addLink('p-tb', 'http://etext.virginia.edu/etcbin/kjv2www?specfile=%2Ftexts%2Fenglish%2Freligion%2Fkjv%2Fkjv-pub.o2w&query='+title+'&docs=text&sample=1-100&grouping=work',           'KJV', 't-kjv', 'Search the KJV for "'+decodeURIComponent(title)+'"', '', null); // Gutenberg addLink('p-tb', 'http://www.google.com/search?&hl=en&q=%22'+title+'%22+site:www.gutenberg.org&btnG=Search',           'Gutenberg', 't-gutenberg', 'Search Project Gutenberg for "'+decodeURIComponent(title)+'"', '', null); // Google addLink('p-tb', 'http://www.google.com/search?hl=en&q=%22'+title+'%22',           'Google search', 't-googlesearch', 'Search Google for "'+decodeURIComponent(title)+'"', '', null); // Google Books addLink('p-tb', 'http://books.google.com/books?q=%22'+title+'%22&hl=en',           'Google books', 't-googlebooks', 'Search Google books for "'+decodeURIComponent(title)+'"', '', null); // Onelook addLink('p-tb', 'http://www.onelook.com/?w='+title,           'Onelook', 't-onelook', 'Search Onelook for "'+decodeURIComponent(title)+'"', '', null); // Webster addLink('p-tb', 'http://machaut.uchicago.edu/?resource=Webster%27s&word='+title+'&use1913=on&use1828=on',           'Webster', 't-webster', 'Search Webster\'s for "'+decodeURIComponent(title)+'"', '', null); // Century addLink('p-tb', 'http://www.leoyan.com/century-dictionary.com/nph-chw.php?query='+title+'&type=dicts',           'Century', 't-century', 'Search the Century Dictionary for "'+decodeURIComponent(title)+'"', '', null); // Thesaurus.com addLink('p-tb', 'http://thesaurus.reference.com/search?q='+title,           'Thesaurus.com', 't-thesaurus', 'Search Thesaurus.com for "'+decodeURIComponent(title)+'"', '', null); // Allpages addLink('p-tb', '/wiki/Special:Allpages/'+title,           'All pages', 't-allpages', 'Display all pages from "'+decodeURIComponent(title)+'"', '', null);

// ARIN addLink('p-tb', 'http://ws.arin.net/whois/?queryinput='+user,           'ARIN', 't-arin', 'Look up ARIN data for "'+decodeURIComponent(user)+'"', '', null); // DNS addLink('p-tb', 'http://www.dnsstuff.com/tools/whois.ch?ip='+user,           'DNS', 't-dns', 'Look up DNS data for "'+decodeURIComponent(user)+'"', '', null); // RIPE addLink('p-tb', 'http://www.ripe.net/fcgi-bin/whois?searchtext='+user,           'RIPE', 't-ripe', 'Look up RIPE data for "'+decodeURIComponent(user)+'"', '', null); // Block log addLink('p-tb', '/w/index.php?title=Special:Log/block&page=User:'+user,           'Block log', 't-blocklog', 'Look up in the block log for "'+decodeURIComponent(user)+'"', '', null); // IPblock addLink('p-tb', '/wiki/Special:Ipblocklist?action=search&ip='+user,           'Ipblocklist', 't-ipblock', 'Look up the ipblocklist for "'+decodeURIComponent(user)+'"', '', null); // List users addLink('p-tb', '/w/index.php?title=Special:Listusers&username='+user,           'Listusers', 't-listusers', 'Look up the userlist for "'+decodeURIComponent(user)+'"', '', null); });

//