Support for wiki redlinks
This commit is contained in:
parent
97222f0b03
commit
6b474eaf8a
@ -536,6 +536,12 @@ function getIdentifierFromURLImpl(url: URL): string {
|
||||
} else if (domainIs(host, 'wikipedia.org') || domainIs(host, 'rationalwiki.org')) {
|
||||
const pathname = url.pathname;
|
||||
if (url.hash) return null;
|
||||
if (pathname == '/w/index.php' && searchParams.get('action') == 'edit') {
|
||||
const title = searchParams.get('title');
|
||||
if (title && title.startsWith('User:')) {
|
||||
return 'wikipedia.org/wiki/' + title;
|
||||
}
|
||||
}
|
||||
if (pathname.startsWith('/wiki/Special:Contributions/') && url.href == window.location.href)
|
||||
return 'wikipedia.org/wiki/User:' + pathArray[3];
|
||||
if (pathname.startsWith('/wiki/User:'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user