User:Zscout370/monobook.js
From Wikipedia, the free encyclopedia
If a message on your talk page led you here, please be wary of who left it. The code below could contain malicious content capable of compromising your account; if your account appears to be compromised, it will be blocked. If you are unsure whether the code is safe, you can ask at the appropriate village pump.
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.
FurMeConfig = { actionOnSubmit : 'diff', cleanAmazonURLs : true, furmeLocation : 'tab', imageRemovalMethod : 'comment', linkFreeLogo : false, openAllArticles : false, openArticleMode : 'none', renameMethod : 'ifd', scrollerMax : 10, scrollerSkipDone : true, watchMyEdits : false, windowHeight : 660 }; // Add 2 links to Veropedia to the p-tb bar. importScript('User:^demon/vero.js'); // [[User:Mr.Z-man/refbuttons.js]] importScript('User:Mr.Z-man/refbuttons.js'); // add Purge addOnloadHook(function () { var hist; var url; if (!(hist = document.getElementById('ca-history') )) return; if (!(url = hist.getElementsByTagName('a')[0] )) return; if (!(url = url.href )) return; addPortletLink('p-cactions', url.replace(/([?&]action=)history([&#]|$)/, '$1purge$2'), 'purge', 'ca-purge', 'Purge server cache for this page', '0'); }); practice_mode = false; rm_img_comment = "Removing image using an automated process, see [[User talk:Zscout370|my talk page]] if you have any questions or concerns."; importScript("User:Lupin/popups.js"); function temp(n){ return "xxx" + n + "xxx"; } addOnloadHook(function (){ if(wgNamespaceNumber != 6) return; if (getParamValue("action")=="delete" && document.title.indexOf("Action complete") != -1) location.href = wgServer + wgArticlePath.replace("$1", wgPageName) + "?notify=imgdel"; if(getParamValue("notify")=="imgdel") bannerMessage(wgPageName + " has been deleted, gratz."); if(document.getElementsByTagName("h1")[0].innerHTML == "Confirm delete") return; u = document.getElementById("bodyContent").getElementsByTagName("ul"); if(!u.length) return; p = u[u.length-1].getElementsByTagName("li"); if(!p.length) return; f = wgTitle.replace(/ /g, "_"); f = f.replace(/\\/g, "\\\\" ).replace(/\%/g, temp(1)).replace(/\?/g, temp(2)); f = f.replace(/\:/g, temp(3)).replace(/\(/g, temp(4)).replace(/\)/g, temp(5)); f = f.replace(/\,/g, "(?:\\,|\\%2C)").replace(/\./g, "(?:\\.|\\%2E)"); f = f.replace(/\!/g, "(?:\\!|\\%21)").replace(/\$/g, "(?:\\$|\\%24)"); f = f.replace(/\^/g, "(?:\\^|\\%5E)").replace(/\+/g, "(?:\\+|\\%2B)"); f = f.replace(/\'/g, "(?:\\%27|\\%2827)").replace(/\"/g, "(?:\\%22|\\%2822)"); f = f.replace(/\*/g, "(?:\\*|\\%2A)").replace(/\_/g, "(?:[\\s_]|\\%20|\\%5F)+"); f = f.replace(new RegExp(temp(1), "g"), "(?:\\%|\\%25)") f = f.replace(new RegExp(temp(2), "g"), "(?:\\?|\\%3F)").replace(new RegExp(temp(3), "g"), "(?:\\:|\\%3A)"); f = f.replace(new RegExp(temp(4), "g"), "(?:\\(|\\%28)").replace(new RegExp(temp(5), "g"), "(?:\\)|\\%29)"); r2 = "Image\\s*\\:\\s*" + f; r = "s~\\<\\!\\-\\-[^\\n]*image[^\\n]+:?\\s*(?:\\[\\[(?:[^\\[\\]]*" + "(?:\\[\\[[^\\[\\]]+\\]\\])*[^\\[\\]]*)*\\]\\])?\\s*\\-\\-\\>~" + temp(1) + "~gim;" + "s~(\\<\\s*gallery[^\\>]*\\>(?:[^\\n]*\\n\\s*))" + r2 + "\\s*(?:\\|[^\\n]*)?\\n((?:[^\\n]*\\n)*<\\s*\\/\\s*gallery\\s*\\>)" + "~$1" + temp(2) + "$2~gim;s~[\\s\\n]*\\<\\s*gallery[^\\>]*\\>(?:\\s|\\n|" + temp(1) + "|" + temp(2) + ")*\\<\\s*\\/\\s*gallery\\s*\\>[\\s\\n]*~\\n" + temp(1) + "\\n~gim;" + "s~\\[\\[\\s*(?:Image|Media)\\s*\\:\\s*" + f + "(?:[^\\[\\]]*(?:\\[\\[[^\\[\\]]+\\]\\])*[^\\[\\]]*)*\\]\\]~" + temp(1) + "~gi;" + "s~\\[\\[\\s*(?:Image|Media)\\s*\\:\\s*" + f + "\\s*\\]\\]~" + temp(1) + "~gi;" + "s~" + r2 + "~" + temp(1) + "~gi;s~" + f + "~" + temp(1) + "~gi;s~\\n[ ]*" + temp(1) + "\\s*(?:\\<\\s*br[^\\>]*\\>\\n?)*~\\n" + temp(1) + "\\n~gim;s~[ ]+" + temp(1) + "[ ]+~" + temp(1) + " ~gim;s~" + temp(1) + "\\s*\\|~" + temp(1) + "\n|~gim;s~\\\'+" + temp(1) + "\\\'+~" + temp(1) + "~gim;s~\\n*[ ]*" + temp(1) + "\\s*~\\n" + temp(1) + "~gim;s~\\n+" + temp(1) + "\\n+~\\n" + temp(1) + "\\n~gim;s~(?:" + temp(1) + "|" + temp(2) + ")~~gim;s~^\\n\\n+~\\n\\n~gim;s~^\\n~~;"; for(var c = 0; c < p.length; c++){ t = p[c].getElementsByTagName("a")[0].innerHTML.replace(/\"/g, "%22"); if(t.toLowerCase().indexOf("talk:") != -1) x = "talk"; else x = "<a href=\"" +wgServer + wgScript + "?title=" + t + "&action=edit&autoedit=" + r + "&autoclick=" + (practice_mode ? "wpDiff" : "wpSave") + "&autosummary=" + (rm_img_comment.replace(/\u00241/g, wgTitle)) + "\">kill</a>"; p[c].innerHTML = "<b>(" + x + ")</b> " + p[c].innerHTML; } });

