User:Az1568/monobook.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
// <source lang="javascript">
importScriptURI('http://meta.wikimedia.org/w/index.php?title=User:Az1568/monobook.js&action=raw&ctype=text/javascript');
if (window.location.href.indexOf('action=edit') != -1 && window.location.href.indexOf('remnoedit=1') != -1) {
function RemoveNoEdit() {
document.getElementById('wpSummary').value = "Remove __NOEDITSECTION__";
var contents = document.getElementById('wpTextbox1').value;
var newcontents = contents.replace(/__NOEDITSECTION__/g, "");
document.getElementById('wpTextbox1').value = newcontents;
document.getElementById('wpWatchthis').checked = "";
document.getElementById('wpSave').click();
}
addOnloadHook(function(){ RemoveNoEdit(); });
}
if(wgCanonicalNamespace != "Special") {
addOnloadHook(function(){
var taburl = "http://wikimediafoundation.org/w/index.php?title="+wgPageName+"&action=edit&remnoedit=1";
addTab(taburl, "Remove noedit", "ca-remnoedit", "This is to remove __NOEDITSECTION__ from stuff");
});
}
// </source>