Mudanças entre as edições de "Usuário:Fenix/monobook.js"

De WikiFenix
Ir para: navegação, pesquisa
 
Linha 1: Linha 1:
/* If you copy this, please include the following line: */
+
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 +
//    |—————————————————————————————————————————————————————————————————————————————————————————————————————————|    //
 +
//    |-| I feel I am not too shabby at JavaScript programming, so feel free to ask me questions about any    |-|    //
 +
//    |-| scripts on this page. Please note that all of these scripts are tested in and developed for Mozilla |-|    //
 +
//    |-| Firefox ONLY!                                                                                      |-|    //
 +
//    |—————————————————————————————————————————————————————————————————————————————————————————————————————————|    //
 +
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
   
 
   
    /* Stolen from [[User:Animum/monobook.css]] */
+
//--------------------------------
 +
// Stuff for everyone
 +
//---------------------------------
 
   
 
   
/* Thank you. */
+
//Alphabetized
 +
importScript('User:Ais523/votesymbols.js');
 +
importScript('User:Animum/ais523editcount.js');
 +
importScript('User:Animum/count.js');
 +
importScript('User:Animum/headers.js');
 +
importScript('User:Animum/liveclock.js');
 +
importScript('User:Animum/moveRV.js');
 +
importScript('User:Animum/reset.js');
 +
importScript('User:Animum/rfavote.js'); //Joke script for laughs.  Don't take it seriously.
 +
importScript('User:Animum/twinklespeedy.js'); //Same as AzaToth's real version, but with modified summaries.
 +
importScript('User:Animum/usergroups.js');
 +
importScript('User:AzaToth/morebits.js');
 +
importScript('User:AzaToth/twinklefluff.js');
 +
importScript('User:AzaToth/twinklewarn.js');
 +
importScript('User:AzaToth/twinklexfd.js');
 +
TwinkleConfig = {
 +
        deletionSummaryAd              :      "",
 +
        protectionSummaryAd            :      "",
 +
        summaryAd                      :      "",
 +
        showSharedIPNotice              :      false,
 +
        orphanBacklinksOnSpeedyDelete  :      false,
 +
};
 +
importScript('User:Gracenotes/amelvand.js');
 +
importScript('User:Lupin/popups.js');
 +
//[[User:Lupin/popups.js]]
 +
popupHideDelay=0.1;
 +
popupDelay=0.7;
 +
popupAdminLinks=true;
 +
popupsFixDabs=true;
 +
importScript('User:Lupin/recent2.js');
 +
importScript('User:Steel359/protection.js');
 +
importScript('User:Tra/sidebartranslate.js');
 +
importScript('User:Voice of All/Addtabs/monobook.js');
 +
importScript('User:Voice of All/replacetxt.js');
 +
importScript('User:Voice of All/Google/monobook.js');
 +
importScript('User:Voice of All/History/monobook.js');
 +
importScript('User:Voice of All/Adminwarnings/monobook.js');
 +
importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu');
 +
importScript('Wikipedia:WikiProject User scripts/Scripts/Add tab');
 +
importScript('Wikipedia:WikiProject User scripts/Scripts/Add toolbox link');
 +
importScript('Wikipedia:WikiProject User scripts/Scripts/Fix lowercase first letter problem');
 +
importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css');
 
   
 
   
/* Orange "You have new messages" changed to use that nice icon of a rotary phone and complimenting colors */
+
addOnloadHook(function() {
.usermessage {
+
if(wgAction=="edit") document.forms["editform"].wpWatchthis.checked = false;
    background-color: transparent;
+
});
    background: url('http://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Exquisite-Modem_cropped.png/32px-Exquisite-Modem_cropped.png') no-repeat left;
 
    color: #444444;
 
    border: none;
 
    font-weight: bold;
 
    margin: 2em 0em 1em 0em;
 
    padding-left: 3.5em;
 
    vertical-align: middle;
 
}
 
 
   
 
   
.usermessage a {
+
// STATUS CHANGER
    color:#444444;
+
addOnloadHook(function (){
}
+
  var subpage = "/Status";
 +
  var scheme = "/StatusTemplate";
 +
  var subpagelink = wgServer + "/wiki/User:" + wgUserName + subpage;
 +
  var logout = document.getElementById( 'pt-logout' );
 +
  //Add the links
 +
  addPortletLink("p-personal", subpagelink + "?action=edit&newstatus=in", "in", "pt-status-in", "I'm in!", "", logout);
 +
  addPortletLink("p-personal", subpagelink + "?action=edit&newstatus=busy", "busy", "pt-status-busy", "I'm busy!", "", logout);
 +
  addPortletLink("p-personal", subpagelink + "?action=edit&newstatus=out", "out", "pt-status-out", "I'm out!", "", logout);
 +
  if (location.href.indexOf("?action=edit&newstatus=") == -1) return; //Are we here to auto-edit the status?
 +
  //Get new status
 +
  var statusRegExp = /\?action=edit&newstatus=(.*)/;
 +
  var status = statusRegExp.exec(location.href)[1];
 +
  //Modify the form
 +
  document.getElementById('wpTextbox1').value = "{{User:"+wgUserName+scheme+"|"+status+"}}";
 +
  document.getElementById('wpSummary').value = "Status: "+status;
 +
  document.getElementById('wpMinoredit').checked = 'checked';
 +
  //Submit it!
 +
  document.getElementById('editform').submit();
 +
});
 
   
 
   
/* "From Wikipedia, the free encyclopedia" modification */
+
//
#siteSub {
 
    font-family:Trebuchet MS;
 
    font-size: 95%;
 
}
 
 
   
 
   
/* Text alignment */
+
addOnloadHook(function() {
body.mediawiki {
+
  if( wgCanonicalNamespace == "Template" && document.getElementById("doc_editlinks") ) {
     text-align: left;
+
     var editsection = document.getElementById("doc_editlinks");
}
+
    editsection.innerHTML = '[<a href="' + wgServer + '/wiki/' + wgPageName + '/doc">view</a>]' + "&nbsp;" + '[<a href="'+ wgServer + wgScript + '?title=' + wgPageName + '/doc&action=edit" title="Edit the template documentation for this page">edit</a>]';
 +
  }
 +
});
 
   
 
   
/* Tab rounding */
+
var subpagename = wgPageName.split( '/' )[1];
#p-cactions ul
 
{
 
        overflow:visible;
 
}
 
 
   
 
   
#p-cactions li
+
addOnloadHook(function() {
{
+
    addToolboxLink('http://en.wikipedia.org/w/index.php?title=' + wgPageName + '&action=purge', "Purge this page", '', '', '', "Purge the cache for this page.");
        border: 2px solid lightgrey;
+
});
        position: relative;
 
        float: left;
 
        -moz-border-radius-topleft: .5em;
 
        -moz-border-radius-topright: .5em;
 
}
 
 
   
 
   
/* Get rid of the border in the page title */
+
addOnloadHook(function() {
.firstHeading {
+
    if(wgNamespaceNumber != 0 && !subpagename) {
    border-bottom:none;
+
      addToolboxLink(wgServer + wgScript + "?title=Special:Prefixindex/" + wgPageName + "/", "Subpages", '', '', '', 'View the <a href="http://en.wikipedia.org/wiki/Wikipedia:Subpages">subpages</a> of this page'); }
}
+
});
 
   
 
   
hr#hrTitleModification {
+
addOnloadHook(function() {
     width:0%;
+
     if((wgNamespaceNumber == "3" || wgNamespaceNumber == "2") && !subpagename) {
}
+
    addToolboxLink("http://en.wikipedia.org/w/index.php?title=Special:DeletedContributions&target=" + wgTitle, 'Deleted Contributions', '', '', ''); }
 +
});
 
   
 
   
/* Replace dotted borders on pre with a solid one. */
+
addOnloadHook(function() {
#bodyContent pre {
+
var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0];
    border: 1px solid #aaa;
+
addlilink(tb, '/wiki/Special:Newpages', 'New pages', 'newpages-ln');
}
+
addlilink(tb, '/wiki/Wikipedia:Usernames_for_administrator_attention', 'Usernames', 'uaa-ln');
 +
addlilink(tb, '/wiki/Wikipedia:List_of_protected pages', 'Protected pages', 'pp-ln');
 +
addlilink(tb, '/wiki/Wikipedia:Administrator_intervention_against_vandalism','Vandalism','aiv-ln');
 +
addlilink(tb, '/wiki/Category:Candidates_for_speedy_deletion','Speedy deletions','speedy-ln');
 +
addlilink(tb, '/wiki/Wikipedia:Requests for page protection','Protection requests','rfpp-ln');
 +
addlilink(tb, '/wiki/Wikipedia:Administrators%27_noticeboard','Noticeboard','AN-ln');  
 +
});
 
   
 
   
/* Miscellaneous Corner-rounding */
+
function PortletMenu( id ) // Taken from [[User:KnowledgeOfSelf/monobook.js]]
div.pBody {
+
{
    -moz-border-radius-topright:0.5em;
+
this.menu = document.getElementById( id );
    -moz-border-radius-bottomright:0.5em;
+
this.list = this.menu.getElementsByTagName( 'ul' )[ 0 ]; // bypass "<h5>Views</h5>", etc.
}
 
 
   
 
   
#content {
+
var LIs = this.list.getElementsByTagName( 'li' );
    -moz-border-radius-topleft: 0.75em;
 
    -moz-border-radius-bottomleft: 0.75em;
 
    border:1px solid #AAAAAA;
 
}
 
 
   
 
   
#footer {
+
for ( var i = 0; i < LIs.length; i++ )
    -moz-border-radius: 6px;
+
{
    border:1px solid #fabd23;
+
this[ LIs[ i ].id ] = LIs[ i ];
}
+
}
 
   
 
   
/* Link customization */
+
this.newItem = function( id, txt, url )
#bodyContent a:active { font-weight: normal; }
+
{ var li = document.createElement( 'li' ); li.id  = id;
#bodyContent a.interwiki, a.external { color: #002bb8; background:none; }}
+
var  a = document.createElement( 'a'  ); a.href = url;
#bodyContent a.text { background: display; }
 
 
   
 
   
/* Some editing screen modifications */
+
  a.appendChild( document.createTextNode( txt ) );
#editpage-copywarn3, #editpage-copywarn2, #editpage-copywarn {
+
li.appendChild( a );
    display: none;
 
}
 
 
   
 
   
input#wpSummary {
+
this[ id ] = li; // watch this!!!
    width: 50%;
 
    margin-top: 12px;
 
}
 
 
   
 
   
.editHelp {
+
return li;
    margin-top:1.25em;
+
}
    margin-bottom:6px;
 
}
 
 
   
 
   
#wpSave, #wpPreview {
+
this.append = function( id, txt, url )
    margin-right:1px;
+
{ this.list.appendChild( this.newItem( id, txt, url ) );
}
+
}
 
   
 
   
#previewnote {
+
this.insertBefore = function( old, id, txt, url )
    text-decoration: blink;
+
{ this.list.insertBefore( this.newItem( id, txt, url ), this[ old ] );
}
+
}
 
   
 
   
#toolbar {
+
this.getText = function( id      ) { return this[ id ].getElementsByTagName( 'a' )[ 0 ].firstChild.data }
    display: none;
+
this.setText = function( id, txt ) {        this[ id ].getElementsByTagName( 'a' )[ 0 ].firstChild.data = txt }
}
 
 
   
 
   
textarea#wpTextbox1 {
+
this.getHref = function( id      ) { return this[ id ].getElementsByTagName( 'a' )[ 0 ].href      }
    background-color: #FFFFFF; /* Kill the horrible new background color for certain pages */
+
this.setHref = function( id, url ) {        this[ id ].getElementsByTagName( 'a' )[ 0 ].href = url }
    border: 1px solid #AAAAAA;
 
}
 
 
   
 
   
#longpagewarning {
+
}
    display:none
 
}
 
 
   
 
   
/* Get RID of that annoying fund raiser advert */
+
addOnloadHook(function() {
#siteNotice {
+
usermenu = new PortletMenu('p-personal');
    display:none
+
  document.getElementById('p-personal').getElementsByTagName('ul')[0].style.textTransform = 'none';
}
+
  usermenu.setText('pt-mytalk', 'talk');
 +
  usermenu.setText('pt-preferences', 'preferences');
 +
  usermenu.setText('pt-watchlist', 'watchlist');
 +
  usermenu.setText('pt-mycontris', 'contribs');
 +
  usermenu.setText('pt-logout', 'logout');
 +
if(document.getElementById('ca-edit')) document.getElementById('ca-edit').firstChild.innerHTML = 'edit';
 +
if(document.getElementById('ca-talk')) document.getElementById('ca-talk').firstChild.innerHTML = 'talk';
 +
});
 
   
 
   
/* Admin tools link fixer */
 
#adminbarlinks a:visited {
 
    color:#002BB8
 
}
 
 
   
 
   
/* Patrolled pages fixer */
+
//--------------------------------
.patrollink {
+
// Sysop-only stuff
    display:none
+
//--------------------------------
}
 
li.not-patrolled {
 
    background-color:transparent
 
}
 
 
   
 
   
/* This bit is stolen from [[User:AzaToth/monobook.css]], which is in turn modified from [[User:Ævar Arnfjörð Bjarmason/monobook.css]] */
+
if(wgUserGroups.indexOf("sysop") != -1) {
+
  importScript('User:Animum/easyblock.js'); //[[User:Animum/easyblock.js]]
/* Nice borders for (almost) all boxes */
+
  ebPrefs = {
input[type="radio"],
+
    displayStatus : false
input[type="checkbox"] { border:none; }
+
  };
input[type="submit"] {
+
  importScript('User:Animum/easyblock.js/parseUsers.js');
    border: 1px solid #aaa !important;
+
  importScript('User:Animum/massdelete.js');
    background-color: #f9f9f9 !important;
+
  importScript('User:Animum/userrights.js');
}
+
  var showTab = false;
/* make round corners for the rest */
+
  importScript('User:Animum/twinkledelimages.js');
input[type="submit"] {
+
  if(wgNamespaceNumber == 14) importScript('User:AzaToth/twinklebatchdelete.js');  
  -moz-border-radius-topleft: 2px !important;  
+
  importScript('User:Voice of All/Deletion/monobook.js');
  -moz-border-radius-topright: 2px !important;
+
  importScript('User:Voice of All/Protection/monobook.js');
  -moz-border-radius-bottomleft: 2px;
+
  importScript('User:Voice of All/Sleeper/monobook.js');
  -moz-border-radius-bottomright: 2px;
+
  importScript('User:Voice of All/Specialadmin/monobook.js');
}
+
  Mvaluejs_class = '';
input[type="submit"] {color: #aaa !important;}
+
  Rvaluejs_class = '';
input[type="submit"]:hover, input[type="submit"]:focus {background-color: #fff !important; color: #000 !important; cursor: pointer !important;}
+
  Uvaluejs_class = '';
+
  importScript('User:Mr.Z-man/closeAFD.js');
/* For use with my monobook */
 
.ns-0 * .tabmenu ul li {
 
    background: white !important;
 
 
}
 
}
 
   
 
   
/* Prettify the headers of the quickbar (left-hand column of boxes) */
 
 
   
 
   
#p-navigation h5, #p-interaction h5, #p-search h5, #p-tb h5, #p-navclone h5, #p-lang h5 {
+
//--------------------------------
    display: inline;
+
// Section for experimentation
    height: 1em;
+
//--------------------------------
    font-size: 85%;
+
addOnloadHook(function() {
    font-weight: normal;
+
     if(document.getElementById("title-override")) {
    white-space: nowrap;
+
        document.getElementById("title-override").style.opacity = "0";
    border-color:#aaa;
+
        if(document.getElementById("title-override").getElementsByTagName("span")[0]) document.getElementById("title-override").getElementsByTagName("span")[0].style.display = "none";
    border-width:1px;
+
        document.getElementsByTagName("h1")[0].innerHTML = document.getElementById("title-override").getElementsByTagName("div")[0].innerHTML;
    border-style: solid solid none solid;
+
     }
    padding: 0 1em 1px 1em;
+
});
    text-transform: lowercase;
 
    background: white;
 
    -moz-border-radius-topright:1em
 
}
 
 
#p-navigation, #p-interaction, #p-search, #p-tb, #p-navclone, #p-lang {
 
     padding-top: 2px;
 
}
 
 
/* Diff screen changes */
 
 
del.diffchange.diffchange-inline, ins.diffchange.diffchange-inline {
 
    border:none;
 
}
 
 
/* Works in conjunction with my monobook.js */
 
 
li#ca-userrights, li#ca-stats6, li#ca-rts {
 
     display:none;
 
}
 
 
   
 
   
/* Space below is for testing */
+
importScript('User:Animum/revdelete.js');

Edição atual tal como às 14h45min de 13 de janeiro de 2009

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//    |—————————————————————————————————————————————————————————————————————————————————————————————————————————|    //
//    |-| I feel I am not too shabby at JavaScript programming, so feel free to ask me questions about any    |-|    //
//    |-| scripts on this page. Please note that all of these scripts are tested in and developed for Mozilla |-|    //
//    |-| Firefox ONLY!                                                                                       |-|    //
//    |—————————————————————————————————————————————————————————————————————————————————————————————————————————|    //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
//--------------------------------
// Stuff for everyone
//---------------------------------
 
//Alphabetized
importScript('User:Ais523/votesymbols.js');
importScript('User:Animum/ais523editcount.js');
importScript('User:Animum/count.js');
importScript('User:Animum/headers.js');
importScript('User:Animum/liveclock.js');
importScript('User:Animum/moveRV.js');
importScript('User:Animum/reset.js');
importScript('User:Animum/rfavote.js'); //Joke script for laughs.  Don't take it seriously.
importScript('User:Animum/twinklespeedy.js'); //Same as AzaToth's real version, but with modified summaries.
importScript('User:Animum/usergroups.js');
importScript('User:AzaToth/morebits.js');
importScript('User:AzaToth/twinklefluff.js');
importScript('User:AzaToth/twinklewarn.js');
importScript('User:AzaToth/twinklexfd.js');
TwinkleConfig = {
        deletionSummaryAd               :       "",
        protectionSummaryAd             :       "",
        summaryAd                       :       "",
        showSharedIPNotice              :       false,
        orphanBacklinksOnSpeedyDelete   :       false,
};
importScript('User:Gracenotes/amelvand.js');
importScript('User:Lupin/popups.js');
//[[User:Lupin/popups.js]]
popupHideDelay=0.1;
popupDelay=0.7;
popupAdminLinks=true;
popupsFixDabs=true;
importScript('User:Lupin/recent2.js');
importScript('User:Steel359/protection.js');
importScript('User:Tra/sidebartranslate.js');
importScript('User:Voice of All/Addtabs/monobook.js');
importScript('User:Voice of All/replacetxt.js');
importScript('User:Voice of All/Google/monobook.js');
importScript('User:Voice of All/History/monobook.js');
importScript('User:Voice of All/Adminwarnings/monobook.js');
importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu'); 
importScript('Wikipedia:WikiProject User scripts/Scripts/Add tab');
importScript('Wikipedia:WikiProject User scripts/Scripts/Add toolbox link');
importScript('Wikipedia:WikiProject User scripts/Scripts/Fix lowercase first letter problem');
importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css');
 
addOnloadHook(function() {
 if(wgAction=="edit") document.forms["editform"].wpWatchthis.checked = false;
});
 
// STATUS CHANGER
addOnloadHook(function (){
  var subpage = "/Status";
  var scheme = "/StatusTemplate";
  var subpagelink = wgServer + "/wiki/User:" + wgUserName + subpage;
  var logout = document.getElementById( 'pt-logout' );
  //Add the links
  addPortletLink("p-personal", subpagelink + "?action=edit&newstatus=in", "in", "pt-status-in", "I'm in!", "", logout);
  addPortletLink("p-personal", subpagelink + "?action=edit&newstatus=busy", "busy", "pt-status-busy", "I'm busy!", "", logout);
  addPortletLink("p-personal", subpagelink + "?action=edit&newstatus=out", "out", "pt-status-out", "I'm out!", "", logout);
  if (location.href.indexOf("?action=edit&newstatus=") == -1) return; //Are we here to auto-edit the status?
  //Get new status
  var statusRegExp = /\?action=edit&newstatus=(.*)/;
  var status = statusRegExp.exec(location.href)[1];
  //Modify the form
  document.getElementById('wpTextbox1').value = "{{User:"+wgUserName+scheme+"|"+status+"}}";
  document.getElementById('wpSummary').value = "Status: "+status;
  document.getElementById('wpMinoredit').checked = 'checked';
  //Submit it!
  document.getElementById('editform').submit();
});
 
//
 
addOnloadHook(function() {
  if( wgCanonicalNamespace == "Template" && document.getElementById("doc_editlinks") ) {
    var editsection = document.getElementById("doc_editlinks");
    editsection.innerHTML = '[<a href="' + wgServer + '/wiki/' + wgPageName + '/doc">view</a>]' + "&nbsp;" + '[<a href="'+ wgServer + wgScript + '?title=' + wgPageName + '/doc&action=edit" title="Edit the template documentation for this page">edit</a>]';
  }
});
 
var subpagename = wgPageName.split( '/' )[1];
 
addOnloadHook(function() {
    addToolboxLink('http://en.wikipedia.org/w/index.php?title=' + wgPageName + '&action=purge', "Purge this page", '', '', '', "Purge the cache for this page.");
});
 
addOnloadHook(function() {
    if(wgNamespaceNumber != 0 && !subpagename) {
      addToolboxLink(wgServer + wgScript + "?title=Special:Prefixindex/" + wgPageName + "/", "Subpages", '', '', '', 'View the <a href="http://en.wikipedia.org/wiki/Wikipedia:Subpages">subpages</a> of this page'); }
});
 
addOnloadHook(function() {
    if((wgNamespaceNumber == "3" || wgNamespaceNumber == "2") && !subpagename) {
    addToolboxLink("http://en.wikipedia.org/w/index.php?title=Special:DeletedContributions&target=" + wgTitle, 'Deleted Contributions', '', '', ''); }
});
 
addOnloadHook(function() {
 var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0];
 addlilink(tb, '/wiki/Special:Newpages', 'New pages', 'newpages-ln');
 addlilink(tb, '/wiki/Wikipedia:Usernames_for_administrator_attention', 'Usernames', 'uaa-ln');
 addlilink(tb, '/wiki/Wikipedia:List_of_protected pages', 'Protected pages', 'pp-ln');
 addlilink(tb, '/wiki/Wikipedia:Administrator_intervention_against_vandalism','Vandalism','aiv-ln');
 addlilink(tb, '/wiki/Category:Candidates_for_speedy_deletion','Speedy deletions','speedy-ln');
 addlilink(tb, '/wiki/Wikipedia:Requests for page protection','Protection requests','rfpp-ln');
 addlilink(tb, '/wiki/Wikipedia:Administrators%27_noticeboard','Noticeboard','AN-ln'); 
});
 
function PortletMenu( id ) // Taken from [[User:KnowledgeOfSelf/monobook.js]]
 {
 this.menu = document.getElementById( id );
 this.list = this.menu.getElementsByTagName( 'ul' )[ 0 ]; // bypass "<h5>Views</h5>", etc.
 
 var LIs = this.list.getElementsByTagName( 'li' );
 
 for ( var i = 0; i < LIs.length; i++ )
 {
 this[ LIs[ i ].id ] = LIs[ i ];
 }
 
 this.newItem = function( id, txt, url )
 { var li = document.createElement( 'li' ); li.id   = id;
 var  a = document.createElement( 'a'  );  a.href = url;
 
  a.appendChild( document.createTextNode( txt ) );
 li.appendChild( a );
 
 this[ id ] = li; // watch this!!!
 
 return li;
 }
 
 this.append = function( id, txt, url )
 { this.list.appendChild( this.newItem( id, txt, url ) );
 }
 
 this.insertBefore = function( old, id, txt, url )
 { this.list.insertBefore( this.newItem( id, txt, url ), this[ old ] );
 }
 
 this.getText = function( id      ) { return this[ id ].getElementsByTagName( 'a' )[ 0 ].firstChild.data }
 this.setText = function( id, txt ) {        this[ id ].getElementsByTagName( 'a' )[ 0 ].firstChild.data = txt }
 
 this.getHref = function( id      ) { return this[ id ].getElementsByTagName( 'a' )[ 0 ].href       }
 this.setHref = function( id, url ) {        this[ id ].getElementsByTagName( 'a' )[ 0 ].href = url }
 
 }
 
addOnloadHook(function() {
 usermenu = new PortletMenu('p-personal');
  document.getElementById('p-personal').getElementsByTagName('ul')[0].style.textTransform = 'none';
  usermenu.setText('pt-mytalk', 'talk');
  usermenu.setText('pt-preferences', 'preferences');
  usermenu.setText('pt-watchlist', 'watchlist');
  usermenu.setText('pt-mycontris', 'contribs');
  usermenu.setText('pt-logout', 'logout');
 if(document.getElementById('ca-edit')) document.getElementById('ca-edit').firstChild.innerHTML = 'edit';
 if(document.getElementById('ca-talk')) document.getElementById('ca-talk').firstChild.innerHTML = 'talk';
});
 
 
//--------------------------------
// Sysop-only stuff
//--------------------------------
 
if(wgUserGroups.indexOf("sysop") != -1) {
  importScript('User:Animum/easyblock.js'); //[[User:Animum/easyblock.js]]
  ebPrefs = {
    displayStatus : false
  };
  importScript('User:Animum/easyblock.js/parseUsers.js');
  importScript('User:Animum/massdelete.js');
  importScript('User:Animum/userrights.js');
  var showTab = false;
  importScript('User:Animum/twinkledelimages.js');
  if(wgNamespaceNumber == 14) importScript('User:AzaToth/twinklebatchdelete.js'); 
  importScript('User:Voice of All/Deletion/monobook.js');
  importScript('User:Voice of All/Protection/monobook.js');
  importScript('User:Voice of All/Sleeper/monobook.js');
  importScript('User:Voice of All/Specialadmin/monobook.js');
  Mvaluejs_class = '';
  Rvaluejs_class = '';
  Uvaluejs_class = '';
  importScript('User:Mr.Z-man/closeAFD.js');
}
 
 
//--------------------------------
// Section for experimentation
//--------------------------------
addOnloadHook(function() {
    if(document.getElementById("title-override")) {
        document.getElementById("title-override").style.opacity = "0";
        if(document.getElementById("title-override").getElementsByTagName("span")[0]) document.getElementById("title-override").getElementsByTagName("span")[0].style.display = "none";
        document.getElementsByTagName("h1")[0].innerHTML = document.getElementById("title-override").getElementsByTagName("div")[0].innerHTML;
    }
});
 
importScript('User:Animum/revdelete.js');