diff --git a/extension/background.js b/extension/background.js index 2d0b50b..fc089d9 100644 --- a/extension/background.js +++ b/extension/background.js @@ -82,7 +82,10 @@ function createContextMenu(text, id) { "*://*.twitter.com/*", "*://medium.com/*", "*://disqus.com/*", - "*://*.tumblr.com/*" + "*://*.tumblr.com/*", + "*://*.wikipedia.org/*", + "*://*.rationalwiki.org/*", + "*://*.google.com/*", ] }); } diff --git a/extension/content.js b/extension/content.js index de87982..a58af75 100644 --- a/extension/content.js +++ b/extension/content.js @@ -50,6 +50,15 @@ function fixupSiteStyles() { `; document.head.appendChild(style); } + if(hostname.indexOf('wiki') != -1){ + var style = document.createElement('style'); + style.textContent = ` + .assigned-label-transphobic { outline: 1px solid #991515 !important; } + .assigned-label-t-friendly { outline: 1px solid #77B91E !important; } + + `; + document.head.appendChild(style); + } if (hostname == 'twitter.com') { myself = document.querySelector('.DashUserDropdown-userInfo a'); @@ -418,6 +427,11 @@ function getIdentifierInternal(urlstr) { } return null; } + if (isHostedOn(host, 'wikipedia.org') || isHostedOn(host, 'rationalwiki.org')) { + if (url.hash) return null; + if (url.pathname.startsWith('/wiki/')) return 'wikipedia.org' + takeFirstPathComponents(url.pathname, 2); + else return null; + } if (host.indexOf('.blogspot.') != -1) { var m = captureRegex(host, /([a-zA-Z0-9\-]*)\.blogspot/); if (m) return m.toLowerCase() + '.blogspot.com';