Difference between revisions of "User:Wottem/common.js"

From Wazeopedia
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
// install User:Cacycle/wikEd in-browser text editor
+
// install [[:Wikipedia:User:Cacycle/wikEd]] in-browser text editor
( function () { var script = document.createElement( 'script' ); script.src = '//en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js&action=raw&ctype=text/javascript'; script.async = true; document.getElementsByTagName( 'head' )[ 0 ].appendChild( script ); } ) ();
+
(function (){
 +
var toAdd = ['left-navigation','p-cactions','p-namespaces'];
 +
for(var i=0 ; i < toAdd.length ; i++ ){
 +
if( !$('#' + toAdd[i]).length ){
 +
$('body').append('<div style="display:none" id="' + toAdd[i] + '"></div>') ;
 +
}
 +
}
 +
mw.loader.load( 'https://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js&action=raw&ctype=text/javascript' ) ;
 +
 
 +
}
 +
) ();

Latest revision as of 10:25, 28 August 2018

// install [[:Wikipedia:User:Cacycle/wikEd]] in-browser text editor
(function (){
var toAdd = ['left-navigation','p-cactions','p-namespaces'];
for(var i=0 ; i < toAdd.length ; i++ ){
if( !$('#' + toAdd[i]).length ){
$('body').append('<div style="display:none" id="' + toAdd[i] + '"></div>') ;
}
}
mw.loader.load( 'https://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js&action=raw&ctype=text/javascript' ) ;

 }
) ();