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 "Safe mode" sidebar link to reload the current page with safemode=1 added.
   This disables user js, css and gadgets per https://phabricator.wikimedia.org/T152169.
   Changes in the edit box and elsewhere will be lost.
   Install with this in your [[Special:MyPage/common.js]]:

   importScript('User:PrimeHunter/Safe mode.js'); // Linkback: [[User:PrimeHunter/Safe mode.js]]
*/

$( document ).ready( function() {
  mw.util.addPortletLink(
    'p-tb',
    location.href.replace( location.hash, '' ) + ( location.search ? '&' : '?' ) + 'safemode=1',
    'Safe mode',
    't-safemode',
    'Reload page without user js, css and gadgets (discards anything you have entered)'
  );
});