User:OsamaK/badgif.js
Jump to navigation
Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
![]() | Documentation for this user script can be added at User:OsamaK/badgif. |
- Report page listing warnings and errors.
// {{BadGIF}} tagger
function BadGIF() {
if (document.editform) {
document.editform.wpTextbox1.value += "\n{{BadGIF}}";
document.editform.wpSummary.value = "{{[[Template:BadGIF|BadGIF]]}}";
document.editform.wpWatchthis.checked = false;
document.editform.submit();
} else
document.location = mw.config.get('wgServer') + mw.config.get('wgScript') + "?title=" + wgPageName + "&action=edit&BadGIF=1";
}
function addBadGIF(){
if (wgNamespaceNumber == 6)
mw.util.addPortletLink("p-cactions", "javascript:BadGIF()", "{{BadGIF}}", "");
if (document.location.href.indexOf("BadGIF=1") > 0)
BadGIF();
}
addOnloadHook(addBadGIF);