MediaWiki:Gadget-Redirects.js: Difference between revisions

Want an adless experience? Log in or Create an account.
m
update deprecated wg variables to mw.config
(addPortletLink -> mw.util.addPortletLink)
m (update deprecated wg variables to mw.config)
 
Line 3: Line 3:
// adds a tab to the top of pages, when clicked it highlights all links on the page that are redirects.
// adds a tab to the top of pages, when clicked it highlights all links on the page that are redirects.
// --------------------------------------------------------
// --------------------------------------------------------
if (wgCanonicalNamespace != 'Special' && wgAction != 'history' && wgAction != 'delete' && wgAction != 'watch' && wgAction
var action = mw.config.get('wgAction');
!= 'unwatch' && wgAction != 'protect' && wgAction != 'markpatrolled' && wgAction != 'rollback' && document.URL.indexOf('diff=') <= 0)
if (mw.config.get('wgCanonicalNamespace') != 'Special' && action != 'history' && action != 'delete' && action != 'watch' && action
!= 'unwatch' && action != 'protect' && action != 'markpatrolled' && action != 'rollback' && document.URL.indexOf('diff=') <= 0)
{
{
var highlightRedirects = {
var highlightRedirects = {