Content deleted Content added
use a single selector |
|||
Line 425:
run() {
if (
mw.config.get('wgCanonicalNamespace') === '' ||
mw.config.get('wgCanonicalNamespace') === 'Special'
)▼
) {
return;
}
const disabledUrls = ['action=history'];
// Check for disabled URLs.
const isDisabledUrl =
document.___location.href.includes(disabledUrl)
);
Line 440 ⟶ 442:
return;
}
const wikiPreview = ['action=edit', 'action=submit'];
// Check what ID we should use, to get the page's text.
const hasUniqueUrl = wikiPreview.some((text) =>
document.___location.href.includes(text)
const elementId = hasUniqueUrl ? 'wikiPreview' : 'bodyContent';
this.replaceText(
contentText,
▲ document.querySelector('#mw-content-text'),
/(\d{1,2}):(\d{2}), (\d{1,2}) ([A-Z][a-z]+) (\d{4}) \(UTC\)/
);
|