Jump to content

User:PrimeHunter/In MonoBook.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/* Add a "MonoBook" sidebar link to reload the current page in the MonoBook skin.
   Changes in the edit box and elsewhere will be lost.
   Install with this in your [[Special:MyPage/vector.js]] if Vector is your normal skin:

   importScript('User:PrimeHunter/In MonoBook.js'); // Linkback: [[User:PrimeHunter/In MonoBook.js]]
*/

$( document ).ready( function() {
  mw.util.addPortletLink(
    'p-tb',
    location.href.replace( location.hash, '' ) + ( location.search ? '&' : '?' ) + 'useskin=monobook',
    'In MonoBook',
    't-inmonobook',
    'Reload page in MonoBook (discards anything you have entered)'
  );
});