Jump to content

User:IvanLanin/monobook.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
 var pfx1 = '<scr' + 'ipt type="text/javascript" src="http:' + '//'
 var pfx2 = '.wikipedia.org/w/index.php?title='
 var sfx  = '&action=raw&ctype=text/javascript&dontcountme=s"></scr' + 'ipt>'

 // Navigation popup
 document.write( pfx1 + 'en' + pfx2 + 'User:IvanLanin/popups-id.js' + sfx );
 document.write( pfx1 + 'en' + pfx2 + 'User:Lupin/popups.js' + sfx );
 popupDelay = 1;
 popupAdminLinks = true;
 popupOnlyArticleLinks = false;

 // Edit top
 // document.write( pfx1 + 'en' + pfx2 + 'User:Gerbrant/edit/top.js' + sfx );

 // install [[User:Cacycle/wikEd]] in-browser text editor
 // document.write( pfx1 + 'en' + pfx2 + 'User:Cacycle/wikEd.js' + sfx );

 // cactions
 // document.write( pfx1 + 'en' + pfx2 + 'User:Haza-w.debug/cactions.js' + sfx );

 // test [[User:Voice of All/UsefulJS]]
 // document.write( pfx1 + 'en' + pfx2 + 'User:Voice_of_All/Addtabs/monobook.js' + sfx );
 // document.write( pfx1 + 'en' + pfx2 + 'User:Voice_of_All/Deletion/monobook.js' + sfx );
 // document.write( pfx1 + 'en' + pfx2 + 'User:Voice_of_All/History/monobook.js' + sfx );

 function addEdittopPortletLink() {
  if(wgCanonicalNamespace == 'Special') return;
  if(document.getElementById("wikiPreview")) return;
  if(document.getElementById("histlegend‎")) return;
  if(document.getElementById("difference‎")) return;
  if(document.getElementById("watchdetails")) return;
  if ( document.getElementById( "ca-edit" ) ) {
   var sElm = document.getElementById( "ca-addsection" ) ? 'ca-addsection' : 'ca-edit';
   var sText = '↑';
   var sLink = wgScriptPath + "/index.php?title=" + wgPageName +
    "&action=edit&section=0";
   mw.util.addPortletLink( 'p-cactions', sLink, sText, 'ca-edittop',
    'Edit top section of this page', null, document.getElementById( sElm ).nextSibling );
  }
 }
 addOnloadHook( addEdittopPortletLink );