Jump to content

User:Dodoïste/vector.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Dodoïste (talk | contribs) at 09:00, 27 May 2012 (removing WYSIFTW). 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.
importScript('User:Cacycle/navbox.js');

importScript('User:Dodoïste/navmenu.js');

/* jQuery section Begin */ jQuery(document).ready(function($){
 
$(':header').each(
  function(){
    $(this)
    .append(' ')
    .append(
      $(this).children('span.editsection')
      .css('display','inline')
      .css('float','none')
      .css('font-size','small')
      .css('margin-left','5px')
      .css('line-height','90%').hide()
    )
    .hover(
      function(){$(this).children('span.editsection').show()},
      function(){$(this).children('span.editsection').hide()}
    )
  }
);
 
/* Auto-hide TOC like that in Baidu Baike */
 
if ($('table#toc.toc').size()>0){
 if ($('table#toc.toc').position().left==0){
  $('li.toclevel-1>ul').hide()
  $('table#toc.toc')
  .css('position','absolute')
  .css('float','left')
  .css('margin-right','1em')
  .hover(
    function(){$('li.toclevel-1>ul').attr('style','display:none').show('slow')},
    function(){$('li.toclevel-1>ul').stop(true,false).hide('slow')}
  )
  .after(
    $('<div/>')
    .css('height',$('table#toc.toc').height())
    .css('padding','8px')
  )
 }
}
 
/* jQuery section End */ });

/* 
* OptimizedNavigAdmin
* 
* Liens utiles à l'administration
* 
* Auteur : Dake
* Contributeur : Tieno
* Dernière révision : 12 novembre 2006
* [[Catégorie:MediaWiki:Fonction Monobook en JavaScript]]
*/
 
function OptimizedNavigAdmin()
{
var a = document.getElementById("p-tb");
if (a)
{
b = a.getElementsByTagName("ul");
if(b.length > 0)
{
b[0].innerHTML = b[0].innerHTML
+ '<li><span id="vtrk.js" title="User:Dodoïste/vector.js">'
+ '<a href="/wiki/User:Dodoïste/vector.js">js</a>'
+ '</span>'
+ ', '
+ '<span id="vtrk.css" title="User:Dodoïste/vector.css">'
+ '<a href="/wiki/User:Dodoïste/vector.css">css</a>'
+ '</span></li>'
}
}
}
 
addOnloadHook(OptimizedNavigAdmin);

function showSkipLinks() {
  var jump_to_nav = document.getElementById('jump-to-nav');
  if( !jump_to_nav ) return;
  var skip_links = jump_to_nav.getElementsByTagName('A')[0];
  jump_to_nav.className='jump_to_nav_hidden';
  skip_links.onfocus=function() {
    jump_to_nav.className='';
  }
}
addOnloadHook(showSkipLinks);