Jump to content

User:PrimeHunter/English interface.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.
/* This script adds a toolbox link saying "English interface" to display the current page with
   the interface seen by users with the default English language at [[Special:Preferences]].
   Many interface messages at the English Wikipedia have been customized, for example linking
   to help pages, guidelines and tools, but this is nearly always only done for English.
   To use the script, add the following line to [[Special:MyPage/common.js]]:
 
importScript('User:PrimeHunter/English_interface.js'); // Linkback: [[User:PrimeHunter/English interface.js]]
 
*/

$( document ).ready( function() {
  mw.util.addPortletLink(
    'p-tb',
    location.href.replace( location.hash, '' ) + ( location.search ? '&' : '?' ) + 'uselang=en',
    'English interface',
    't-englishinterface',
    'Display the current page with English interface'
  );
});