User:Davidgothberg/vector.js

This is an old revision of this page, as edited by Davidgothberg (talk | contribs) at 10:16, 22 February 2011 (Configuring the navigation popups like I had them in Monobook.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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.
/* A JavaScript file loaded from my local web server for testing. */
importScriptURI( 'http://localhost:8080/wikipediatest.js' );


/****** Changing the user interface *************************/


/*******************************************************
   Note! The DavidClock has been moved to 
   [[User:Davidgothberg/clock.js]]. See code and usage
   explanation there.
********************************************************/
window.davidClock = 300;    //Static + ticking clock, every 5 minutes.
importScript( "User:Davidgothberg/clock.js" );


/* New messages history */
importScript( "User:Davidgothberg/newmessageshistory.js" );


// [[Wikipedia:Tools/Navigation popups]]
// Loaded through "my preferences - Gadgets - Navigation popups".

// When true prevents loading of preview data for the popup.
simplePopups=true;

// When false makes it so the "actions" menu instead
// goes under the page link instead of as a separate menu.
popupActionsMenu=false;



/****** End, changing the user interface *************************/
/****** Start, experimenting *************************************/


/* Changes the drop-down menu in Vector into tabs. 
   Works but the tabs overlap due to my low screen resolution. */
// importScript( "User:Svick/DropDownToTabs.js" );


// Changes the drop-down menu in Vector into tabs.
// This modified version of Svick's script didn't work.
/*
function fixTab(item) {
  var node = item.firstChild.firstChild;
  if (node.nodeType != 1 || node.tagName.toLowerCase() != 'span')
    item.firstChild.innerHTML = "<span>" + item.firstChild.innerHTML + "</span>";
}

addOnloadHook( function() {
  // document.getElementById('p-cactions').className = 'vectorTabs';
  var elems = document.getElementById('p-cactions').getElementsByTagName('li');
  for (var i = 0; i < elems.length; i++)
    fixTab(elems[i]);
} )
*/