Jump to content

User:AzaToth/twinkle.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by TheDJ (talk | contribs) at 01:47, 6 April 2010 (make sure the menu is created before it is used/added.). 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.
/* Some elements for the Twinkle menu in vector
*/
var pTwinkle = 'p-cactions';
 
if( skin == 'vector' && typeof $j != 'undefined' ) {
  var newmenu = newVectorMenu( "p-twinkle", "TW" );
  pTwinkle = 'p-twinkle';
  appendCSS( "div.extraMenu { background-position: 90% 50%;} div.extraMenu h5 a { padding-left: 0.4em; padding-right: 0.4em; width:auto; } div.extraMenu h5 a span {display:inline-block; font-size:0.8em; height:2.5em; font-weight: normal; padding-top: 1.25em; margin-right:14px; }" );

  $j(document).ready(function() {
    newmenu.insertBefore( $j('#p-search') );
  });
}
 
function newVectorMenu( ID, title ) {
  if( ! ID ) return;
 
  var div = $j('<div id="' + ID + '" class="vectorMenu extraMenu emptyPortlet" ></div>');
  var h5 = $j('<h5></h5>')
  var a = $j('<a href="#"></a>');
  if( title ) a.append( $j('<span>' + title + '</span>') );
  h5.append( a ); div.append( h5 );
 
  $j('<div class="menu"><ul lang="en" xml:lang="en"></ul></div>').appendTo(div);
  return div;
}

importScript('User:AzaToth/morebits.js');
importScript('User:AzaToth/twinklefluff.js');
importScript('User:AzaToth/twinklewarn.js');
importScript('User:AzaToth/twinklearv.js');
importScript('User:AzaToth/twinklespeedy.js');
importScript('User:AzaToth/twinklediff.js');
importScript('User:AzaToth/twinkleprotect.js');
importScript('User:AzaToth/twinkleprod.js');
importScript('User:AzaToth/twinklexfd.js');
importScript('User:AzaToth/twinkleimage.js');
importScript('User:AzaToth/twinkleunlink.js');
importScript('User:AzaToth/twinkledelimages.js');
importScript('User:AzaToth/twinkledeprod.js');
importScript('User:AzaToth/twinklebatchdelete.js');
importScript('User:AzaToth/twinklebatchprotect.js');
importScript('User:AzaToth/twinkleimagetraverse.js');
importScript('User:AzaToth/twinklebatchundelete.js');