Support for Medium subdomains

This commit is contained in:
shinigami-eyes 2020-12-26 07:14:42 +00:00
parent be906ee77a
commit 64a10cdb19
3 changed files with 6 additions and 2 deletions

View File

@ -396,7 +396,7 @@ function createContextMenu(text: string, id: ContextMenuCommand) {
"*://*.reddit.com/*",
"*://*.twitter.com/*",
"*://*.t.co/*",
"*://medium.com/*",
"*://*.medium.com/*",
"*://disqus.com/*",
"*://*.tumblr.com/*",
"*://*.wikipedia.org/*",

View File

@ -518,6 +518,10 @@ function getIdentifierFromURLImpl(url: URL): string {
} else if (domainIs(host, 'disqus.com') && url.pathname.startsWith('/by/')) {
return 'disqus.com' + getPartialPath(url.pathname, 2);
} else if (domainIs(host, 'medium.com')) {
const hostParts = host.split('.');
if (hostParts.length == 3 && hostParts[0] != 'www') {
return host;
}
return 'medium.com' + getPartialPath(url.pathname.replace('/t/', '/'), 1);
} else if (domainIs(host, 'tumblr.com')) {
if (url.pathname.startsWith('/register/follow/')) {

View File

@ -17,7 +17,7 @@
"*://*.youtube.com/*",
"*://*.reddit.com/*",
"*://*.twitter.com/*",
"*://medium.com/*",
"*://*.medium.com/*",
"*://disqus.com/*",
"*://*.tumblr.com/*",
"*://*.wikipedia.org/*",