See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Benutzer:Stefan Majewsky/monobook.js – Wikipedia

Benutzer:Stefan Majewsky/monobook.js

aus Wikipedia, der freien Enzyklopädie

Hinweis: Leere nach dem Speichern den Browser-Cache, um die Änderungen zu sehen: Mozilla/Firefox: Shift-Strg-R, Internet Explorer: Strg-F5, Opera: F5, Safari: ⌘-R (bzw. Strg-R), Konqueror: Strg-R.

/* <pre><nowiki> Top of Javascript */
 
//Monobook Element Modding. Techniques by Stefan Majewsky (de.wikibooks.org/wiki/Benutzer:Stefan_Majewsky)
//Based on http://commons.wikimedia.org/w/index.php?title=MediaWiki:Extra-tabs.js&oldid=3001654
 
//Creates a new list item.
function createListItem(url, name, id)
{
  var listitem = document.createElement('li');
  listitem.setAttribute('id', id);
  var link = document.createElement('a');
  if (url!='')
  {  
    link.setAttribute('href', url);
  }
  else
  {
    listitem.setAttribute('class','selected');
  }
  link.appendChild(document.createTextNode(name));
  listitem.appendChild(link);
  return listitem;
}
 
//Appends a new tab to the register at the top of a page.
function appendTab(url, name, id)
{
  // Grab the element we want to append the tab and append the tab to it.
  var c1 = document.getElementById('column-one');
  var tabs = c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0];
  tabs.appendChild(createListItem(url, name, id));
}
 
//Appends the into tab near the "Edit" tab.
function appendIntroTab(articlename)
{
  // Grab the element we want to append the tab and append the tab to it.
  var c1 = document.getElementById('column-one');
  var tabs = c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0];
  tabs.insertBefore(createListItem('http://de.wikipedia.org/w/index.php?title=' + articlename + '&action=edit&section=0', 'intro', 'ca-editintro'), tabs.getElementsByTagName('li')[3]);
}
 
//Adds supplementary links to the personal bar at the top right.
function appendPLink(url, name, id)
{
  // Insert the element before the "log out" link.
  var c1 = document.getElementById('column-one');
  var tabs = c1.getElementsByTagName('div')[1].getElementsByTagName('ul')[0];
  tabs.insertBefore(createListItem(url, name, id), document.getElementById('pt-logout'));
}
 
//Adds a supplementary menu at the left navigation. Returns the list where links have to be added.
function appendMenu(title, id)
{
  //initialize the single elements
  var basediv = document.createElement('div');
  basediv.setAttribute('class','portlet');
  basediv.setAttribute('id',id);
  var heading = document.createElement('h5');
  heading.appendChild(document.createTextNode(title));
  var innerdiv = document.createElement('div');
  innerdiv.setAttribute('class','pBody');
  var linklist = document.createElement('ul');
  //ONLY FOR PERSONAL PURPOSE - change the background color of the menu
  innerdiv.setAttribute('style','background-color: #E2E2F9');
  //build menu
  basediv.appendChild(heading);
  basediv.appendChild(innerdiv);
  innerdiv.appendChild(linklist);
  //insert in column-one after p-tb
  document.getElementById('column-one').insertBefore(basediv, document.getElementById('p-tb').nextSibling);
  return linklist;
}
 
//Adds a menu item to a menu.
function addMenuItem(menu, link, text, id)
{
  var listitem = document.createElement('li');
  listitem.setAttribute('id',id);
  var linkitem = document.createElement('a');
  linkitem.setAttribute('href',link);
  //build link
  linkitem.appendChild(document.createTextNode(text));
  listitem.appendChild(linkitem);
  menu.appendChild(listitem);
}
 
//Adds a horizontal separator to a menu.
function addMenuSep(menu)
{
  menu.appendChild(document.createElement('hr'));
}
 
//(On special pages) Change the caption of the tab "Special page".
function changeSpecialPageCaption(newname)
{
  document.getElementById('ca-nstab-special').getElementsByTagName('a')[0].innerHTML = newname;
}
 
//Onload hook. Will be executed after the site has been loaded.
function doMonobookTuningOnload()
{
  //append tabs
  if(wgNamespaceNumber != -1)
  {
    //add extra tabs
    appendTab('http://de.wikipedia.org/wiki/Spezial:Prefixindex/' + wgPageName, 'Unterseiten', 'ca-subpage');
    appendTab('http://de.wikipedia.org/wiki/Spezial:Allpages/' + wgPageName, 'Index durchsuchen', 'ca-searchindex');
    appendTab('http://de.wikipedia.org/w/index.php?title=' + wgPageName + '&action=purge', 'Cache leeren', 'ca-purge');
    appendIntroTab(wgPageName);
  }
  //append personal links
  appendPLink('http://de.wikipedia.org/wiki/Spezial:Mypage/monobook.css','CSS','pt-css');
  appendPLink('http://de.wikipedia.org/wiki/Spezial:Mypage/monobook.js','JS','pt-js');
  //change tab titles - adapted from [[Benutzer:PDD/changeBeschriftungen.js]]
  var cbiid, cbielement;
  var cbliste = {
    "ca-edit":     ["A",  "Edit"],
    "ca-history":  ["A",  "Historie"],
    "ca-unwatch":  ["A",  "Entobachten"]
  };
  for (cbiid in cbliste) {
    if (cbielement = document.getElementById(cbiid)) {
      cbielement.getElementsByTagName(cbliste[cbiid][0])[0].innerHTML = cbliste[cbiid][1];
    }
  }
}
 
//Onload control.
addOnloadHook(doMonobookTuningOnload);
 
//End of Monobook Element Modding.
 
// [[en:User:Lupin/popups.js]] 	 
 
document.write('<script type="text/javascript" src="http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');
 
/* Bottom of Javascript </nowiki></pre> */


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -