Vés al contingut

Usuari:Anskar/scripts/títols.js

De la Viquipèdia, l'enciclopèdia lliure

Nota: Després de desar, heu de netejar la memòria cau del navegador per veure els canvis. En la majoria de navegadors amb Windows o Linux, premeu Ctrl+F5 o bé premeu Shift i cliqueu el botó "Actualitza" (Ctrl i "Actualitza" amb Internet Explorer). Vegeu més informació i instruccions per a cada navegador a Viquipèdia:Neteja de la memòria cau.

//<pre><nowiki>
//Personalizada por Axxgreazz, para el [[w:es:User:Axxgreazz/Monobook-Suite]]
//http://es.wikipedia.org/wiki/Usuario:Axxgreazz/Monobook-Suite

//*****************Titulos de articulos******************************/
// Gets the article lemma with the namespace
function get_title()
{
   return wgTitle;
}

// Gets the article lemma, with the namespace but without sub pages.
function get_tidy_title()
{
   var editlk = get_title()
   editlk = editlk.replace(/\/.*$/, ''); //removing subpages from the link
   return editlk;
}
// Gets the subpage lemma, with the namespace but without sub pages.
function get_subpage_title()
{
   var editlk = get_title()
   editlk = editlk.substring(editlk.indexOf('/') + 1); // strip off 
   return editlk;
}

//</nowiki></pre>