User:Babr/common.js
(Redirected from User:Sameerhameedy/common.js)
Note: You may have to bypass your browser’s cache to see the changes. In addition, after saving a sitewide CSS file such as MediaWiki:Common.css, it will take 5-10 minutes before the changes take effect, even if you clear your cache.
- Mozilla / Firefox / Safari: hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (Command-R on a Macintosh);
- Konqueror and Chrome: click Reload or press F5;
- Opera: clear the cache in Tools → Preferences;
- Internet Explorer: hold Ctrl while clicking Refresh, or press Ctrl-F5.
- This script lacks a documentation subpage. You may create it.
- Useful links: root page • root page’s subpages • links • redirects • your own
This JavaScript is executed for Babr on every page load.
// Ajax Edit
importScript("MediaWiki:Gadget-AjaxEdit.js");
// [[User:Surjection/auto-contrast-fixer.js]]
importScript("User:Surjection/auto-contrast-fixer.js");
// [[File:Krinkle_Global_SUL.js]]
mw.loader.load('https://meta.wikimedia.org/w/index.php?title=User:Krinkle/Tools/Global_SUL.js&action=raw&ctype=text/javascript');
// [[User:Ioaxxere/fixTimeoutErrors.js]]
importScript('User:Ioaxxere/fixTimeoutErrors.js');
// AWB
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Joeytje50/JWB.js/load.js&action=raw&ctype=text/javascript');
/********* rollback msg *********/
$('span.mw-rollback-link a').each(function () { if (-~this.href.indexOf('&action=rollback&') && this.href.indexOf('summary=') < 0) this.href += '&summary=Reverted%20edits%20by%20%5B%5BSpecial%3AContributions%2F%242%7C%242%5D%5D.%20If%20you%20think%20this%20rollback%20is%20in%20error%2C%20please%20leave%20a%20message%20on%20my%20%5B%5BUser%20talk%3ABabr%7Ctalk%20page%5D%5D.' });
/********* silent rb *********/
$('#p-tb ul').append('<li id="babr-t-rb-lta"><a href="javascript:void(0)" id="babr-t-rb-lta-link">Hide RB msgs</a></li>');
$('#babr-t-rb-lta-link').click(function () {
$('span.mw-rollback-link a').each(function () {
if (-~this.href.indexOf('&action=rollback&')) {
if (this.href.indexOf('summary=') >= 0)
this.href = this.href.split('&summary=')[0];
this.href += '&summary=rv%2Fv';
}
});
alert("ok");
});