Jump to content

User:Xaradnam/monobook.js: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Xaradnam (talk | contribs)
m Redirect links
Xaradnam (talk | contribs)
m Tweak
Line 17: Line 17:
'redirect=no" title="' +
'redirect=no" title="' +
(this.title || this.href) +
(this.title || this.href) +
' (no redirect)"><sup>(⇨)</sup></a>';
' (no redirect)"><span style="color:#6aebd9"><sup>я</sup></span></a>';
});
});
});
});

Revision as of 20:45, 16 September 2021

// Section subscribe
CurNSnum=mw.config.get('wgNamespaceNumber');
if (CurNSnum%2==1||CurNSnum==4)
	{mw.util.addPortletLink(
		'p-tb',
		mw.config.get('wgScript')+'?title='+mw.config.get('wgPageName')+'&dtenable=1',
		'Section subscribe'
		);}

// Add unredirected link next to redirects; from [[User:BrandonXLF/NoRedirect.js]]
$(function() {
	$('#mw-content-text .mw-redirect').after(function() {
		return this.href.indexOf('redirect=no') !== -1 || this.href.indexOf('action=') !== -1  || this.href.indexOf('diff=') !== -1 ? ''
			: '<a href="' +
			this.href +
			(this.href.includes('?') ? '&' : '?') +
			'redirect=no" title="' +
			(this.title || this.href) +
			' (no redirect)"><span style="color:#6aebd9"><sup>я</sup></span></a>';
	});
});