Support for Wikipedia and RationalWiki
This commit is contained in:
parent
1895fec3cf
commit
d68309363c
@ -82,7 +82,10 @@ function createContextMenu(text, id) {
|
|||||||
"*://*.twitter.com/*",
|
"*://*.twitter.com/*",
|
||||||
"*://medium.com/*",
|
"*://medium.com/*",
|
||||||
"*://disqus.com/*",
|
"*://disqus.com/*",
|
||||||
"*://*.tumblr.com/*"
|
"*://*.tumblr.com/*",
|
||||||
|
"*://*.wikipedia.org/*",
|
||||||
|
"*://*.rationalwiki.org/*",
|
||||||
|
"*://*.google.com/*",
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,15 @@ function fixupSiteStyles() {
|
|||||||
`;
|
`;
|
||||||
document.head.appendChild(style);
|
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') {
|
if (hostname == 'twitter.com') {
|
||||||
myself = document.querySelector('.DashUserDropdown-userInfo a');
|
myself = document.querySelector('.DashUserDropdown-userInfo a');
|
||||||
|
|
||||||
@ -418,6 +427,11 @@ function getIdentifierInternal(urlstr) {
|
|||||||
}
|
}
|
||||||
return null;
|
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) {
|
if (host.indexOf('.blogspot.') != -1) {
|
||||||
var m = captureRegex(host, /([a-zA-Z0-9\-]*)\.blogspot/);
|
var m = captureRegex(host, /([a-zA-Z0-9\-]*)\.blogspot/);
|
||||||
if (m) return m.toLowerCase() + '.blogspot.com';
|
if (m) return m.toLowerCase() + '.blogspot.com';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user