Misplaced Pages

User:Kylu/monobook.js: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
< User:Kylu Browse history interactively← Previous editNext edit →Content deleted Content added
Revision as of 04:30, 4 July 2006 view sourceKylu (talk | contribs)9,405 edits disabling dynabars.js← Previous edit Revision as of 05:27, 6 July 2006 view source Kylu (talk | contribs)9,405 edits A few minor changes to monobook. Hopefully it's a bit more efficient.Next edit →
Line 1: Line 1:
/* <pre><code> */ /* <pre><code> */
//
// Hello Wikipedians!
// You're probably here because you're hideously interested
// in the scripts I use on a daily basis. Right?
// "Right, Kylu!"
// See, I knew it.
// Anyway, if you want all the nifty buttons and such, you don't
// really need to be an expert at scripting, HOWEVER, you _do_ need
// to know some simple things:
//
// This function here: Lightdarkness made it to easily include scripts
// elsewhere on the site into someone's monobook. If you're going to use
// stuff from here, YOU NEED TO INCLUDE THIS FUNCTION.
// I'll wait while you read it.
/*** ]'s include function ***/ /*** ]'s include function ***/
function inc (file) { function inc (file) {
Line 6: Line 20:
document.writeln(lt+'script type="text/javascript" src="/search/?title='+file+'&amp;action=raw&amp;ctype=text/javascript&amp;dontcountme=s"'+gt+lt+'/script'+gt); document.writeln(lt+'script type="text/javascript" src="/search/?title='+file+'&amp;action=raw&amp;ctype=text/javascript&amp;dontcountme=s"'+gt+lt+'/script'+gt);
} }
// Good, see? Wasn't painful, right? Oh, stop crying, it's just a little burn...
// Anyway, next we've got some scripting borrowed from our good friend Sam.
// I'm not sure what the heck it does, but in case it's a timer to make your
// computer blow up, best not copy it.

//This bit just adds some extra tabs. You don't need to borrow this if you don't want.
//Stolen from
function EnhancePage() {
var l;
// Put top tabs at the bottom of the page, too
var tabs = document.getElementById('p-cactions').cloneNode(true);
tabs.id = 'mytabs';
l = tabs.getElementsByTagName('li');
for (i = 0; i < l.length; i++) {
if (l.id) {
l.id = 'mytabs-' + l.id;
}
}
document.getElementById('column-content').appendChild(tabs);
}
if (window.addEventListener)
window.addEventListener("load", EnhancePage, false);
else if (window.attachEvent)
window.attachEvent("onload", EnhancePage);
//End of the EnhancePage() stuff.

// Okay, so you've made it this far. Here's where the interesting stuff begins.
// PLEASE REMEMBER you need the inc() script up at the top. Very important. If you
// don't include that, none of this stuff will work.


/*********************************************************************************/ /*********************************************************************************/
Line 16: Line 59:
//inc("User:Kylu/extra.js"); //inc("User:Kylu/extra.js");


// editcount.js just adds an "Edit count" link to the toolbox
// Name me a regular editor who DOESN'T use this...
// You MUST have Tool2 included to use this!
inc("User:Interiot/Tool2/code.js"); inc("User:Interiot/Tool2/code.js");

//editcount.js just adds an "Edit count" link to the toolbox
//You MUST have Tool2 included to use this!
inc("User:Kylu/editcount.js"); inc("User:Kylu/editcount.js");


//Adds "user logs" to the toolbox. // Adds "user logs" to the toolbox.
inc("User:Kylu/userlog.js"); inc("User:Kylu/userlog.js");

// GodMode. Sometimes handy, sometimes not.
//inc("User:Kylu/godmode.js");
// DISABLED!

// Sam Hocevar's godmode.js (if his doesn't work, there's no helping it)
inc("User:Sam_Hocevar/monobook.js");

// Dynabars
//inc("User:Kylu/dynabars.js");
//DISABLED - too much scripting.

// Popups
inc("User:Lupin/popups.js");


// Spellchecker // Spellchecker
Line 49: Line 76:
inc("User:Voice_of_All/UTCclock.js"); inc("User:Voice_of_All/UTCclock.js");


//VoA Tools
//or the VoA monobook (which includes popups)
inc("User:VoA/monobook.js"); inc("User:Voice_of_All/Revert/monobook.js");
inc("User:Voice_of_All/History/monobook.js");
inc("User:Lightdarkness/aiv.js");
inc("User:Kylu/xml.js");

// Sam Hocevar's godmode.js and ubergodmode.js
// These were formerly just loading Sam's local monobook, but
// that cross-site loads scripting from zoy.org, which apparently
// is local to Sam but very, very far from me. In other words,
// it slowed my Wiki down. This is a Bad Thing(tm)!
inc("User:Kylu/godmode.js");
inc("User:Kylu/ubergodmode.js");

// For people who keep an eye on my monobook:
// Sam's got a new snippet of code, "HideToc" which hides the
// table-of-contents on pages.
// See: http://sam.zoy.org/wikipedia/hidetoc.js
// Personally I'm not using it.

// *** Everything after this is all Popups stuff. *** //
// Popups
inc("User:Lupin/popups.js");


// Popups options: // Popups options:
Line 66: Line 114:
popupLiveOptionsExpanded=false; //Starts with the options tab open on popover (annoying) popupLiveOptionsExpanded=false; //Starts with the options tab open on popover (annoying)


//PopUps de-Advertizing
// Everyone knows what PopUps are, why advertize?
// Will happily remove this section if anyone complains.
popupRedlinkSummary='Removing link to empty page ]'; popupRedlinkSummary='Removing link to empty page ]';
popupFixDabsSummary='Disambiguate ] to ]'; popupFixDabsSummary='Disambiguate ] to ]';
Line 78: Line 125:
/* END OF POPUPS STUFF */ /* END OF POPUPS STUFF */


// That's it. No more scripting. really. You can go home now.
/* </code></pre> */ /* </code></pre> */

Revision as of 05:27, 6 July 2006

/* <pre><code> */
//
// Hello Wikipedians!
// You're probably here because you're hideously interested
// in the scripts I use on a daily basis. Right?
// "Right, Kylu!"
// See, I knew it.
// Anyway, if you want all the nifty buttons and such, you don't
// really need to be an expert at scripting, HOWEVER, you _do_ need
// to know some simple things:
//
// This function here: Lightdarkness made it to easily include scripts
// elsewhere on the site into someone's monobook. If you're going to use
// stuff from here, YOU NEED TO INCLUDE THIS FUNCTION.
// I'll wait while you read it.
/*** ]'s include function ***/
function inc (file) {
  var lt = String.fromCharCode(60);
  var gt = String.fromCharCode(62);
  document.writeln(lt+'script type="text/javascript" src="/search/?title='+file+'&amp;action=raw&amp;ctype=text/javascript&amp;dontcountme=s"'+gt+lt+'/script'+gt);
}
// Good, see? Wasn't painful, right? Oh, stop crying, it's just a little burn...
// Anyway, next we've got some scripting borrowed from our good friend Sam.
// I'm not sure what the heck it does, but in case it's a timer to make your 
// computer blow up, best not copy it.

//This bit just adds some extra tabs. You don't need to borrow this if you don't want.
//Stolen from 
function EnhancePage() {
  var l;
  // Put top tabs at the bottom of the page, too
  var tabs = document.getElementById('p-cactions').cloneNode(true);
  tabs.id = 'mytabs';
  l = tabs.getElementsByTagName('li');
  for (i = 0; i < l.length; i++) {
    if (l.id) {
      l.id = 'mytabs-' + l.id;
    }
  }
  document.getElementById('column-content').appendChild(tabs);
}
if (window.addEventListener)
  window.addEventListener("load", EnhancePage, false);
else if (window.attachEvent)
  window.attachEvent("onload", EnhancePage);
//End of the EnhancePage() stuff.

// Okay, so you've made it this far. Here's where the interesting stuff begins.
// PLEASE REMEMBER you need the inc() script up at the top. Very important. If you
// don't include that, none of this stuff will work.

/*********************************************************************************/
// * SCRIPT SECTION: INCLUDED SCRIPTS * //
/*********************************************************************************/

// Some of my extra editing stuff.
// (Currently under development, I keep it commented out so it
// doesn't interfere with vandal-fighting.)
//inc("User:Kylu/extra.js");

// editcount.js just adds an "Edit count" link to the toolbox
// You MUST have Tool2 included to use this! 
inc("User:Interiot/Tool2/code.js");
inc("User:Kylu/editcount.js");

// Adds "user logs" to the toolbox.
inc("User:Kylu/userlog.js");

// Spellchecker
inc("User:Voice_of_All/replacetxt.js");

// Google Tools
inc("User:Voice_of_All/Google/monobook.js");

// UTC Clock
inc("User:Voice_of_All/UTCclock.js");

//VoA Tools
inc("User:Voice_of_All/Revert/monobook.js");
inc("User:Voice_of_All/History/monobook.js");
inc("User:Lightdarkness/aiv.js");
inc("User:Kylu/xml.js");

// Sam Hocevar's godmode.js and ubergodmode.js
// These were formerly just loading Sam's local monobook, but
// that cross-site loads scripting from zoy.org, which apparently
// is local to Sam but very, very far from me. In other words,
// it slowed my Wiki down. This is a Bad Thing(tm)!
inc("User:Kylu/godmode.js");
inc("User:Kylu/ubergodmode.js");

// For people who keep an eye on my monobook:
// Sam's got a new snippet of code, "HideToc" which hides the
// table-of-contents on pages.
// See: http://sam.zoy.org/wikipedia/hidetoc.js
// Personally I'm not using it.

// *** Everything after this is all Popups stuff. *** //
// Popups
inc("User:Lupin/popups.js");

// Popups options:
simplePopups = false;
popupAdminLinks = false;
popupFixRedirs = true;
popupFixDabs = true;
popupDelay = 0.15;
popupSubpopups = false;
popupNavLinkSeparator = ' &bull; ';
popupRedirAutoClick = 'wpPreview';

//Beta!
popupLiveOptions=true;          //Lets you change frequently-changed Popups options while in-use
popupLiveOptionsExpanded=false; //Starts with the options tab open on popover (annoying)

//PopUps de-Advertizing
popupRedlinkSummary='Removing link to empty page ]';
popupFixDabsSummary='Disambiguate ] to ]';
popupFixRedirsSummary='Redirect bypass from ] to ]';
popupExtendedRevertSummary='Revert to revision dated %s by %s, oldid %s';
popupRevertToPreviousSummary='Revert to the revision prior to revision %s';
popupRevertSummary='Revert to revision %s';
popupRmDabLinkSummary='Remove link to dab page ]';

/* END OF POPUPS STUFF */

// That's it. No more scripting. really. You can go home now.
/* </code></pre> */