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.
importScript('User:Alex 21/script-functions.js');
importScript('User:Alex 21/script-redlinks.js');
// Copied from [[:w:zh:MediaWiki:Gadget-variant-link-fix.js]]
try {
    var ref, loc;
    try {
        ref = new mw.Uri( document.referrer );
    } catch ( e ) {
        ref = new mw.Uri( document.referrer + '/' );
    }
    loc = new mw.Uri( location.href );
    if (/\.google\./.test(ref.host) && loc.host == 'zh.m.wikipedia.org') {
        loc.host = 'zh.wikipedia.org';
        loc.path = loc.path.replace(/^\/zh(-[^/]+)?\//, "/wiki/");
        location.replace(loc.toString());
    }
} catch ( e ) {
}
mw.loader.load( '/w/index.php?title=User:Joeytje50/JWB/feed.js&action=raw&ctype=text/javascript' ); // Backlink: [[User:Joeytje50/JWB/feed.js]]
importScript('User:RedWarn/.js'); // Backlink: [[User:RedWarn/.js]]