MediaWiki:Gadget-OrangeLinks.js: Difference between revisions

No edit summary
 
(One intermediate revision by the same user not shown)
Line 33: Line 33:
for (let link of element.querySelectorAll("a")) {
for (let link of element.querySelectorAll("a")) {
// Check whether the link needs to be processed.
// Check whether the link needs to be processed.
if (!link.href.startsWith("https://en.wiktionary.org/wiki/")) continue;
if (!link.href.startsWith("https://linguifex.com/wiki/")) continue;
if (link.matches(".orange-link, .not-orange-link, .new, .external")) continue;
if (link.matches(".orange-link, .not-orange-link, .new, .external")) continue;


Line 40: Line 40:
if (!linkAnchor || /^[a-z]/.test(linkAnchor)) continue;
if (!linkAnchor || /^[a-z]/.test(linkAnchor)) continue;


if (![0, 100, 118].includes(new mw.Title(linkTitle).namespace)) continue; // Main, Appendix, Reconstruction
if (![0, 120].includes(new mw.Title(linkTitle).namespace)) continue; // Main, Appendix, Reconstruction


pagesToProcess.push(linkTitle);
pagesToProcess.push(linkTitle);