diff --git a/extension/background.ts b/extension/background.ts index d5f61ec..61b4eec 100644 --- a/extension/background.ts +++ b/extension/background.ts @@ -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/*", diff --git a/extension/content.ts b/extension/content.ts index 46ea367..5978ac2 100644 --- a/extension/content.ts +++ b/extension/content.ts @@ -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/')) { diff --git a/extension/manifest.json b/extension/manifest.json index 217fcd5..82f55f1 100644 --- a/extension/manifest.json +++ b/extension/manifest.json @@ -17,7 +17,7 @@ "*://*.youtube.com/*", "*://*.reddit.com/*", "*://*.twitter.com/*", - "*://medium.com/*", + "*://*.medium.com/*", "*://disqus.com/*", "*://*.tumblr.com/*", "*://*.wikipedia.org/*",