User:Stephen Burnett/monobook.js
From Wikipedia, the free encyclopedia
If a message on your talk page led you here, please be wary of who left it. Code that you insert on this page could contain malicious content capable of compromising your account. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. If this is a .js page, the code will be executed when previewing the page.
Note: After saving, you have to bypass your browser's cache to see the changes. In Internet Explorer and Firefox, hold down the Ctrl key and click the Refresh or Reload button. Opera users have to clear their caches through Tools→Preferences, see the instructions for Opera. Konqueror and Safari users can just click the Reload button.
// <pre><nowiki> //This code will change ISBN links to point to the url of your choice, //instead of Special:Book_sources. // //How to use it: // //First, you must copy this code to your user javascript page. This is //at User:<your username>/monobook.js . My username is Lunchboxhero so //my javascript page is User:Lunchboxhero/monobook.js . You must be logged //in to edit your javascript page. // //Once you have copied the code and saved the page, you need to refresh your //browser's cache. For Mozilla/Safari/Konqueror: hold down Shift while clicking //Reload (or press Ctrl-Shift-R), IE: press Ctrl-F5, Opera: press F5. // //The code should now work, as long as you are logged in. // //You can change the destination url by simply modifying the quoted url that //follows document.links[i].href= // //Good luck, and if you have any questions, leave me a comment on the discussion //page of User:Lunchboxhero/monobook.js . // //(Every line that starts with "//" is a comment and can be discarded.) function externISBN() { for (var i = 0; i < document.links.length; i++) { var ln = document.links[i].href.match(/isbn=(.*)/); if (ln) { document.links[i].href='http://www.amazon.com/exec/obidos/ASIN/'+RegExp.$1; } } } addOnloadHook(externISBN); //************************************************************************************************* // // POPUPS STUFF // //************************************************************************************************* // From [[User:Lupin/popups.js]] document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // (options from User:Tra/monobook.js) popupFixDabs=true; popupWatchDisambiggedPages=true; popupOnlyArticleLinks=false; popupOnEditSelection=false; popupDragHandle='popupTopLinks'; //this appears not to transfer the text to the edit summary //popupRevertSummaryPrompt=true; // Edit tools for the vandal whack-a-mole game // [[User:Kbh3rd/whackamole.js]] - please include this line // document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Kbh3rd/whackamole.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); //************************************************************************************************* // // TWINKLE // //************************************************************************************************* //Twinkle temp disable //importScript('User:AzaToth/twinkle.js'); //temp replace broken version importScript('User:Timotab/twinklefix.js'); //more selective ... //importScript('User:AzaToth/morebits.js'); //importScript('User:AzaToth/twinklefluff.js'); //importScript('User:AzaToth/twinklediff.js'); //importScript('User:AzaToth/twinkleprod.js'); //importScript('[[Wikipedia:WikiProject User scripts/Scripts/Add LI menu]]'); //importStylesheet('[[Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css]]'); //importScript('[[User:AzaToth/twinklewarn.js]]'); TwinkleConfig = { revertMaxRevisions : 50, userTalkPageMode : 'window', showSharedIPNotice : true, openTalkPage : [ 'agf', 'norm', 'vand' ], openTalkPageOnAutoRevert : false, openAOLAnonTalkPage : false, summaryAd : " using [[WP:TWINKLE|TW]]", deletionSummaryAd : " using [[WP:TWINKLE|TW]]", protectionSummaryAd : " using [[WP:TWINKLE|TW]]", summaryAd : "", deletionSummaryAd : "", protectionSummaryAd : "", watchSpeedyPages : [ 'g3', 'g5', 'g10', 'g11', 'g12' ], watchProdPages : true, openUserTalkPageOnSpeedyDelete : [ 'g1', 'g2', 'g10', 'g11', 'g12', 'a1', 'a7', 'i3', 'i4', 'i5', 'i6', 'i7', 'u3', 't1' ], watchRevertedPages : [ 'agf', 'norm', 'vand', 'torev' ], markRevertedPagesAsMinor : [ 'agf', 'norm', 'vand', 'torev' ], deleteTalkPageOnDelete : false, markWarningsAsMinor : true, markAIVReportAsMinor : true, markSpeedyPagesAsMinor : true, markProdPagesAsMinor : true, confirmUsernameToAIV : true, toolboxButtons : [ ] }; //************************************************************************************************* // // wikEd // //************************************************************************************************* // // install [[User:Cacycle/wikEd]] in-browser text editor document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js' + '&action=raw&ctype=text/javascript"></' + 'script>'); //************************************************************************************************* //END OF PAGE // </nowiki></pre>