User:OsamaK/badgif.js

// tagger function BadGIF { if (document.editform) { document.editform.wpTextbox1.value += "\n"; document.editform.wpSummary.value = ""; document.editform.wpWatchthis.checked = false; document.editform.wpMinoredit.checked = true; document.editform.submit; } else document.location = mw.config.get('wgServer') + mw.config.get('wgScript') + "?title=" + wgPageName + "&action=edit&BadGIF=1"; } function addBadGIF{ if (wgCanonicalNamespace == "Image") mw.util.addPortletLink("p-cactions", "javascript:BadGIF", "", ""); if (document.location.href.indexOf("BadGIF=1") > 0) BadGIF; } $(addBadGIF);