www.fgks.org   »   [go: up one dir, main page]

Jump to content

User:Matt B./monobook.js: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Matt B. (talk | contribs)
Finally got control-z removed. Still missing control-f
m Maintenance: Replacing document.write with mw.loader.load (mw:ResourceLoader/Migration_guide_(users)#Avoid_document.write() - phab:T130879)
 
(One intermediate revision by one other user not shown)
Line 6: Line 6:
if (document.URL.match("http://en.wikipedia.org/wiki/Special:Recentchanges") || document.URL.match("autosummary=Revert") || document.URL.match("Special:Contributions") || document.URL.match("action=history") || document.URL.match("Special:Watchlist") )
if (document.URL.match("http://en.wikipedia.org/wiki/Special:Recentchanges") || document.URL.match("autosummary=Revert") || document.URL.match("Special:Contributions") || document.URL.match("action=history") || document.URL.match("Special:Watchlist") )
{
{
mw.loader.load(
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
+ '&action=raw&ctype=text/javascript&dontcountme=s');
}
}


// disable Wikipedia access keys/keyboard shortcuts
// disable Wikipedia access keys/keyboard shortcuts

ta['pt-userpage'] = new Array('+','My user page');
addOnloadHook(function(){
ta['pt-anonuserpage'] = new Array('+','The user page for the ip you\'re editing as');
var columnOne = document.getElementById('column-one');
ta['pt-mytalk'] = new Array('+','My talk page');
if (!columnOne) return;
ta['pt-anontalk'] = new Array('+','Discussion about edits from this ip address');
removeKeys(columnOne.getElementsByTagName('a'))
ta['pt-preferences'] = new Array('+','My preferences');
removeKeys(document.getElementsByTagName('input'))
ta['pt-watchlist'] = new Array('+','The list of pages you\'re monitoring for changes.');
removeKeys(document.getElementsByTagName('label'))
ta['pt-mycontris'] = new Array('+','List of my contributions');
})
ta['pt-login'] = new Array('+','You are encouraged to log in; however, it is not mandatory.');

ta['pt-anonlogin'] = new Array('+','You are encouraged to log in; however, it is not mandatory.');
function removeKeys(nodeList){
ta['pt-logout'] = new Array('+','Log out');
var el;
ta['ca-talk'] = new Array('+','Discussion about the content page');
for (var i = 0; i < nodeList.length; i++) {
ta['ca-edit'] = new Array('+','You can edit this page. Please use the preview button before saving.');
el = nodeList[i];
ta['ca-addsection'] = new Array('+','Add a comment to this discussion.');
if (!el.accessKey) continue;
ta['ca-viewsource'] = new Array('+','This page is protected. You can view its source.');
if (!window.removeAccessKeys || removeAccessKeys.indexOf(el.accessKey) >= 0) {
ta['ca-history'] = new Array('+','Past versions of this page.');
el.accessKey = ''; //el.setAttribute('accessKey', '');
ta['ca-protect'] = new Array('+','Protect this page');
if (el.title) el.title = el.title.replace(tooltipAccessKeyRegexp, '');
ta['ca-delete'] = new Array('+','Delete this page');
}
ta['ca-undelete'] = new Array('+','Restore the edits done to this page before it was deleted');
}
ta['ca-move'] = new Array('+','Move this page');
}
ta['ca-watch'] = new Array('+','Add this page to your watchlist');

ta['ca-unwatch'] = new Array('+','Remove this page from your watchlist');

ta['search'] = new Array('+','Search this wiki');
ta['p-logo'] = new Array('+','Main Page');
// ta['pt-userpage'] = new Array('+','My user page');
ta['n-mainpage'] = new Array('+','Visit the Main Page');
// ta['pt-anonuserpage'] = new Array('+','The user page for the ip you\'re editing as');
ta["n-Main-page"] = new Array('+','Visit the Main Page');
// ta['pt-mytalk'] = new Array('+','My talk page');
ta['n-portal'] = new Array('+','About the project, what you can do, where to find things');
// ta['pt-anontalk'] = new Array('+','Discussion about edits from this ip address');
ta['n-currentevents'] = new Array('+','Find background information on current events');
// ta['pt-preferences'] = new Array('+','My preferences');
ta['n-recentchanges'] = new Array('+','The list of recent changes in the wiki.');
// ta['pt-watchlist'] = new Array('+','The list of pages you\'re monitoring for changes.');
ta['n-randompage'] = new Array('+','Load a random page');
// ta['pt-mycontris'] = new Array('+','List of my contributions');
ta['n-help'] = new Array('+','The place to find out.');
// ta['pt-login'] = new Array('+','You are encouraged to log in; however, it is not mandatory.');
ta['n-sitesupport'] = new Array('+','Support us');
// ta['pt-anonlogin'] = new Array('+','You are encouraged to log in; however, it is not mandatory.');
ta['n-planet'] = new Array('+','Weblog aggregator of Wikimedia-related posts')
// ta['pt-logout'] = new Array('+','Log out');
ta['t-whatlinkshere'] = new Array('+','List of all wiki pages that link here');
// ta['ca-talk'] = new Array('+','Discussion about the content page');
ta['t-recentchangeslinked'] = new Array('+','Recent changes in pages linked from this page');
// ta['ca-edit'] = new Array('+','You can edit this page. Please use the preview button before saving.');
ta['feed-rss'] = new Array('+','RSS feed for this page');
// ta['ca-addsection'] = new Array('+','Add a comment to this discussion.');
ta['feed-atom'] = new Array('+','Atom feed for this page');
// ta['ca-viewsource'] = new Array('+','This page is protected. You can view its source.');
ta['t-contributions'] = new Array('+','View the list of contributions of this user');
// ta['ca-history'] = new Array('+','Past versions of this page.');
ta['t-emailuser'] = new Array('+','Send a mail to this user');
// ta['ca-protect'] = new Array('+','Protect this page');
ta['t-upload'] = new Array('+','Upload images or media files');
// ta['ca-delete'] = new Array('+','Delete this page');
ta['t-specialpages'] = new Array('+','List of all special pages');
// ta['ca-undelete'] = new Array('+','Restore the edits done to this page before it was deleted');
ta['ca-nstab-main'] = new Array('+','View the content page');
// ta['ca-move'] = new Array('+','Move this page');
ta['ca-nstab-user'] = new Array('+','View the user page');
// ta['ca-watch'] = new Array('+','Add this page to your watchlist');
ta['ca-nstab-media'] = new Array('+','View the media page');
// ta['ca-unwatch'] = new Array('+','Remove this page from your watchlist');
ta['ca-nstab-special'] = new Array('+','This is a special page, you can\'t edit the page itself.');
// ta['search'] = new Array('+','Search this wiki');
ta['ca-nstab-wp'] = new Array('+','View the project page');
// ta['p-logo'] = new Array('+','Main Page');
ta['ca-nstab-image'] = new Array('+','View the image page');
// ta['n-mainpage'] = new Array('+','Visit the Main Page');
ta['ca-nstab-mediawiki'] = new Array('+','View the system message');
// ta["n-Main-page"] = new Array('+','Visit the Main Page');
ta['ca-nstab-template'] = new Array('+','View the template');
// ta['n-portal'] = new Array('+','About the project, what you can do, where to find things');
ta['ca-nstab-help'] = new Array('+','View the help page');
// ta['n-currentevents'] = new Array('+','Find background information on current events');
ta['ca-nstab-category'] = new Array('+','View the category page');
// ta['n-recentchanges'] = new Array('+','The list of recent changes in the wiki.');
// ta['n-randompage'] = new Array('+','Load a random page');
// ta['n-help'] = new Array('+','The place to find out.');
// ta['n-sitesupport'] = new Array('+','Support us');
// ta['n-planet'] = new Array('+','Weblog aggregator of Wikimedia-related posts')
// ta['t-whatlinkshere'] = new Array('+','List of all wiki pages that link here');
// ta['t-recentchangeslinked'] = new Array('+','Recent changes in pages linked from this page');
// ta['feed-rss'] = new Array('+','RSS feed for this page');
// ta['feed-atom'] = new Array('+','Atom feed for this page');
// ta['t-contributions'] = new Array('+','View the list of contributions of this user');
// ta['t-emailuser'] = new Array('+','Send a mail to this user');
// ta['t-upload'] = new Array('+','Upload images or media files');
// ta['t-specialpages'] = new Array('+','List of all special pages');
// ta['ca-nstab-main'] = new Array('+','View the content page');
// ta['ca-nstab-user'] = new Array('+','View the user page');
// ta['ca-nstab-media'] = new Array('+','View the media page');
// ta['ca-nstab-special'] = new Array('+','This is a special page, you can\'t edit the page itself.');
// ta['ca-nstab-wp'] = new Array('+','View the project page');
// ta['ca-nstab-image'] = new Array('+','View the image page');
// ta['ca-nstab-mediawiki'] = new Array('+','View the system message');
// ta['ca-nstab-template'] = new Array('+','View the template');
// ta['ca-nstab-help'] = new Array('+','View the help page');
// ta['ca-nstab-category'] = new Array('+','View the category page');


// </nowiki></pre>
// </nowiki></pre>

Latest revision as of 20:09, 6 February 2021

// <pre><nowiki>



// Use Lupin's popups: [[User:Lupin/popups.js]]
if (document.URL.match("http://en.wikipedia.org/wiki/Special:Recentchanges") || document.URL.match("autosummary=Revert") || document.URL.match("Special:Contributions") || document.URL.match("action=history") || document.URL.match("Special:Watchlist") )
{
mw.loader.load(
             'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
             + '&action=raw&ctype=text/javascript&dontcountme=s');
}

// disable Wikipedia access keys/keyboard shortcuts

addOnloadHook(function(){
 var columnOne = document.getElementById('column-one');
 if (!columnOne) return;
 removeKeys(columnOne.getElementsByTagName('a'))
 removeKeys(document.getElementsByTagName('input'))
 removeKeys(document.getElementsByTagName('label'))
})

function removeKeys(nodeList){
  var el;
        for (var i = 0; i < nodeList.length; i++) {
                el = nodeList[i];
    if (!el.accessKey) continue;
    if (!window.removeAccessKeys || removeAccessKeys.indexOf(el.accessKey) >= 0) {
      el.accessKey = ''; //el.setAttribute('accessKey', ''); 
      if (el.title) el.title = el.title.replace(tooltipAccessKeyRegexp, '');
    }
  }
}


// ta['pt-userpage'] = new Array('+','My user page');
// ta['pt-anonuserpage'] = new Array('+','The user page for the ip you\'re editing as');
// ta['pt-mytalk'] = new Array('+','My talk page');
// ta['pt-anontalk'] = new Array('+','Discussion about edits from this ip address');
// ta['pt-preferences'] = new Array('+','My preferences');
// ta['pt-watchlist'] = new Array('+','The list of pages you\'re monitoring for changes.');
// ta['pt-mycontris'] = new Array('+','List of my contributions');
// ta['pt-login'] = new Array('+','You are encouraged to log in; however, it is not mandatory.');
// ta['pt-anonlogin'] = new Array('+','You are encouraged to log in; however, it is not mandatory.');
// ta['pt-logout'] = new Array('+','Log out');
// ta['ca-talk'] = new Array('+','Discussion about the content page');
// ta['ca-edit'] = new Array('+','You can edit this page. Please use the preview button before saving.');
// ta['ca-addsection'] = new Array('+','Add a comment to this discussion.');
// ta['ca-viewsource'] = new Array('+','This page is protected. You can view its source.');
// ta['ca-history'] = new Array('+','Past versions of this page.');
// ta['ca-protect'] = new Array('+','Protect this page');
// ta['ca-delete'] = new Array('+','Delete this page');
// ta['ca-undelete'] = new Array('+','Restore the edits done to this page before it was deleted');
// ta['ca-move'] = new Array('+','Move this page');
// ta['ca-watch'] = new Array('+','Add this page to your watchlist');
// ta['ca-unwatch'] = new Array('+','Remove this page from your watchlist');
// ta['search'] = new Array('+','Search this wiki');
// ta['p-logo'] = new Array('+','Main Page');
// ta['n-mainpage'] = new Array('+','Visit the Main Page');
// ta["n-Main-page"] = new Array('+','Visit the Main Page');
// ta['n-portal'] = new Array('+','About the project, what you can do, where to find things');
// ta['n-currentevents'] = new Array('+','Find background information on current events');
// ta['n-recentchanges'] = new Array('+','The list of recent changes in the wiki.');
// ta['n-randompage'] = new Array('+','Load a random page');
// ta['n-help'] = new Array('+','The place to find out.');
// ta['n-sitesupport'] = new Array('+','Support us');
// ta['n-planet'] = new Array('+','Weblog aggregator of Wikimedia-related posts')
// ta['t-whatlinkshere'] = new Array('+','List of all wiki pages that link here');
// ta['t-recentchangeslinked'] = new Array('+','Recent changes in pages linked from this page');
// ta['feed-rss'] = new Array('+','RSS feed for this page');
// ta['feed-atom'] = new Array('+','Atom feed for this page');
// ta['t-contributions'] = new Array('+','View the list of contributions of this user');
// ta['t-emailuser'] = new Array('+','Send a mail to this user');
// ta['t-upload'] = new Array('+','Upload images or media files');
// ta['t-specialpages'] = new Array('+','List of all special pages');
// ta['ca-nstab-main'] = new Array('+','View the content page');
// ta['ca-nstab-user'] = new Array('+','View the user page');
// ta['ca-nstab-media'] = new Array('+','View the media page');
// ta['ca-nstab-special'] = new Array('+','This is a special page, you can\'t edit the page itself.');
// ta['ca-nstab-wp'] = new Array('+','View the project page');
// ta['ca-nstab-image'] = new Array('+','View the image page');
// ta['ca-nstab-mediawiki'] = new Array('+','View the system message');
// ta['ca-nstab-template'] = new Array('+','View the template');
// ta['ca-nstab-help'] = new Array('+','View the help page');
// ta['ca-nstab-category'] = new Array('+','View the category page');

// </nowiki></pre>