User:Az1568/monobook.js: Difference between revisions

From Wikimedia Foundation Governance Wiki
Content deleted Content added
Az1568 (talk | contribs)
try this
 
Az1568 (talk | contribs)
add
Line 1: Line 1:
//<pre><nowiki>
//<pre><nowiki>
// Helper tools
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Addtabs/monobook.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//

if (window.location.href.indexOf('action=edit') != -1 && window.location.href.indexOf('remnoedit=1') != -1) {
if (window.location.href.indexOf('action=edit') != -1 && window.location.href.indexOf('remnoedit=1') != -1) {
function RemoveNoEdit() {
function RemoveNoEdit() {

Revision as of 02:28, 12 July 2008

//<pre><nowiki>
// Helper tools
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Addtabs/monobook.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//

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('wpDiff').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-examplejpgfix", "This is to remove __NOEDITSECTION__ from stuff"); 
  });
}
//</nowiki></pre>