User:Ab.er.rant/monobook.js

From Guild Wars Wiki
Jump to navigationJump to search

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)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/**** Sysop automaticPatrol
  * (c) 2008 by Patrick Westerhoff [poke]
  */
addScript( 'User:Poke/GuildWarsWikiTools/automaticPatrol.js' );
hookEvent( 'load', function ()
{ gwwtAutomaticPatrol( true ); } );



// GuildWarsWikiTools - by [[User:Poke]]

/**** Guild Wars Wiki Tools
  * (c) 2007 by Patrick Westerhoff [poke]
  */
var head = document.getElementsByTagName( 'head' )[0];
head.appendChild( document.createElement( 'script' ) );
head.lastChild.src  = '/index.php?title=User:Poke/GuildWarsWikiTools.js&action=raw&ctype=text/javascript';
head.lastChild.type = 'text/javascript';




// installs extra user tabs: Page Moves, Uploads

addOnloadHook(function() {
  if (wgTitle.indexOf("/") != -1 || document.title.indexOf("- History -") != -1)  //no subpages or history
     return;
  if (wgCanonicalNamespace == "User" || wgCanonicalNamespace == "User_talk") {
     var username = encodeURIComponent( wgTitle );
     addPortletLink("p-cactions", "http://wiki.guildwars.com/index.php?title=Special%3ALog&type=move&user=" + username, "Page moves",  "ca-pagemoves", "Page moves by this user");
     addPortletLink("p-cactions", "http://wiki.guildwars.com/index.php?title=Special%3ALog&type=upload&user=" + username, "Uploads",  "ca-uploads", "Files uploaded by this user");
  }
});




// AVT - by [[User:MisterPepe]]

//ImportScript - for all your JS needs

//Start AVT options
//AVTSysop should only be set to 'true' if you are a sysop and wish to use the sysop deletion and blocking functions. If you're not a sysop, the links won't work and may break your installation =P
//AVTCompatibilityMode should be set to 'true' if you wish to use this script with Poke's GWWT, as it gets rid of duplicate tabs. I'm still not entirely sure it'll work, though - the css files may be incompatible (bugger if I know).
//AVTDeltabs should be set to 'true' if you want to use AVT's deletion tagging function. If you'd like to just use those in GWWT or none at all, set this variable to 'false.'

var AVTSysop = true, AVTCompatibilityMode = true, AVTDeltabs = true; //Creates basic configuration. Note that this should be in the installer file

//Start AVT. This script was written by [XoO]MisterPepe and released under the GFDL 1.2+ For patch notes, please see [[User:MisterPepe/AVT]]
//Requires addPortletLink and addLIMenu (js and css), but these will be installed by default when using the installer function

//End installer update

function importScript(page, lang) {
     var url = wgScriptPath + '/index.php?title='
                            + encodeURIComponent(page.replace(' ','_'))
                            + '&action=raw&ctype=text/javascript&dontcountme=s';
     if (lang) url = 'http://' + lang + '.wikipedia.org' + url;
     var s = document.createElement('script');
     s.src = url;
     s.type='text/javascript';
     document.getElementsByTagName('head')[0].appendChild(s);
}

// Installing teh AVT goodness
importScript('User:MisterPepe/AVT/code.js');



// ab.er.rant's stuffs
function addErRant() {
     // adding to personal toolbar
     addPortletLink ('p-personal', '/wiki/Special:MyPage/monobook.js', 'my js', 'errant-js', 'my monobook.js', '', document.getElementById('pt-logout'));
     addPortletLink ('p-personal', '/wiki/Special:MyPage/monobook.css', 'my css', 'errant-css', 'my monobook.css', '', document.getElementById('pt-logout'));

     if ((wgNamespaceNumber == 2 || wgNamespaceNumber == 3)
              && location.href.indexOf('User:Ab.er.rant') >= 0) {
          var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
          addlimenu(tabs, "my space", "errant-space" );
          addPortletLink('errant-space', '/index.php?title=User:Ab.er.rant/Sandbox&action=edit', 'Sandbox', 'errant-sandbox', 'Edit sandbox', '');
          addPortletLink('errant-space', '/index.php?title=User:Ab.er.rant/Characters&action=edit', 'Characters', 'errant-characters', 'Edit characters', '');
          addPortletLink('errant-space', '/index.php?title=User:Ab.er.rant/Characters/Heroes&action=edit', 'Heroes', 'errant-heroes', 'Edit hero equipment', '');
          addPortletLink('errant-space', '/index.php?title=User:Ab.er.rant/Main&action=edit', 'Main details', 'errant-maindetails', 'Edit main details', '');
          addPortletLink('errant-space', '/index.php?title=User:Ab.er.rant/Userboxes&action=edit', 'Userboxes', 'errant-userboxes', 'Edit userboxes', '');
          addPortletLink('errant-space', '/index.php?title=User:Ab.er.rant/Plans&action=edit', 'Plans', 'errant-plans', 'Edit plans', '');
          addPortletLink('errant-space', '/index.php?title=User:Ab.er.rant/Links&action=edit', 'Links', 'errant-links', 'Edit links', '');
          addPortletLink('errant-space', '/index.php?title=User:Ab.er.rant/Navbar&action=edit', 'Navbar', 'errant-navbar', 'Edit navbar', '');
          addPortletLink('errant-space', '/index.php?title=User:Ab.er.rant/Checklists&action=edit', 'Checklists', 'errant-checklists', 'Edit checklists', '');
     }

     // creating portlet content
     var errantPortletContent = document.createElement('div');
     errantPortletContent.className = 'pBody';
     var errantPortletList = document.createElement('ul');
     //errantPortletList.appendChild(document.createElement('li'));
     //errantPortletList.firstChild.appendChild(document.createTextNode('Wahlau'));
     errantPortletContent.appendChild(errantPortletList);

     // assembling the portlet
     var errantPortlet = document.createElement('div');
     errantPortlet.id = 'p-errant';
     errantPortlet.className = 'portlet';
     errantPortlet.appendChild(document.createElement('h5'));
     errantPortlet.appendChild(errantPortletContent);
     errantPortlet.firstChild.appendChild(document.createTextNode('er.rant links'));

     document.getElementById('column-one').insertBefore(errantPortlet, document.getElementById('p-search'));

     addPortletLink ('p-errant', '/wiki/Guild Wars Wiki:List of candidates for deletion', 'Deletion candidates', 'n-deletion-candidates', 'Candidates for deletion');
     addPortletLink ('p-errant', '/wiki/Guild Wars Wiki:Projects/NPC models', 'NPC models project', 'n-npc-models', 'NPC models project');
     addPortletLink ('p-errant', '/wiki/Guild Wars Wiki:Projects/Images needed', 'Images needed project', 'n-images-needed', 'Images needed project');
     addPortletLink ('p-errant', '/wiki/User:Ab.er.rant/Checklists', 'My checklists', 'n-my-checklists', 'My checklists');
}

addOnloadHook(addErRant);




// Guild Wars Wiki Ajaxifier, by [[User:Galil]]
var script = document.createElement('script');
script.src = '/index.php?title=User:Galil/GWW_Ajaxifier/ajaxifier.js&action=raw&ctype=text/javascript';
script.type = 'text/javascript';
document.getElementsByTagName('head')[0].appendChild(script);