MediaWiki:Common.js: Difference between revisions

mNo edit summary
Tag: Manual revert
mNo edit summary
Tag: Reverted
Line 146: Line 146:
   // Remove default link tooltip for citation needed links
   // Remove default link tooltip for citation needed links
   $('.editorial-notation-tooltip a').removeAttr('title');
   $('.editorial-notation-tooltip a').removeAttr('title');
});
/* SET "CONTENT PAGES" AS THE DEFAULT TAB IN SEARCH */
$(function () {
    if (mw.config.get('wgCanonicalSpecialPageName') === 'Search') {
        const urlParams = new URLSearchParams(window.location.search);
        if (!urlParams.has('profile')) {
            urlParams.set('profile', 'default'); // Use Content pages
            window.location.search = urlParams.toString();
        }
    }
});
});