Get our free book on rainwater now - To Catch the Rain.

MediaWiki:Vector.js

From Appropedia
Jump to: navigation, search

Note: After saving, 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: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Clear the cache in Tools → Preferences
/* Any JavaScript here will be loaded for users using the Vector skin */



/**
 * @brief    Move hidden Vector tab from pulldown menu to between visible tabs.
 * @author   [[User:Danny B.]]
 * @date     2012-02-04
 * @since    2012-02-06
 *
 * @param    tab    String  The part of "id" attribute after "ca-" of tab to be moved.
 * @param    after  String  The part of "id" attribute after "ca-" of tab after which the moved goes.
 */
function moveHiddenVectorTab( tab, after ) {
  
  $( "#p-cactions #ca-" + tab )
    .insertAfter( "#p-views #ca-" + after )
    .wrapInner( "<span/>" )
  ;
  
}



/**
 * @brief    List of Vector customizations to be applied.
 * @date     2012-02-04
 * @since    2012-02-06
 */
function customizeAppropediaVectorSkin() {
  
  // Show Move tab after History tab.
  moveHiddenVectorTab( "move", "history" );
  
}



/**
 * @brief    Run the entire Vector customization on load.
 * @warning  Do NOT change this.
 * @date     2012-02-04
 * @since    2012-02-06
 */
$( customizeAppropediaVectorSkin );

// install [[Wikipedia:User:Cacycle/wikEd]] in-browser text editor ONLY FOR A SINGLE PAGE: [[Appropedia:Wikedbox]]
if (wgPageName == 'Appropedia:Wikedbox') {
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js'
+ '&action=raw&ctype=text/javascript"></' + 'script>');
var wikEdConfig = { 'skipScriptTest': true };
 }