mirror of
https://github.com/iamadamdev/bypass-paywalls-chrome
synced 2025-04-30 22:14:26 +02:00
Fix WSJ
This commit is contained in:
parent
326b910182
commit
67b59dc8ae
@ -80,9 +80,15 @@ if (matchDomain('rep.repubblica.it')) {
|
|||||||
if (closeButton) { closeButton.click(); }
|
if (closeButton) { closeButton.click(); }
|
||||||
}
|
}
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
const wsjLogin = document.querySelector('.wsj-snippet-login, .wsjpro-label');
|
const url = window.location.href;
|
||||||
if (wsjLogin) {
|
const snippet = document.querySelector('.snippet-promotion');
|
||||||
window.location.href = window.location.href.replace('wsj.com', 'wsj.com/amp');
|
const wsjPro = document.querySelector('meta[name="page.site"][content="wsjpro"]');
|
||||||
|
if (snippet || wsjPro) {
|
||||||
|
if (!window.location.hash) {
|
||||||
|
if (url.includes('?')) {
|
||||||
|
window.location.href = url.replace('?', '#refreshed?');
|
||||||
|
} else { window.location.href = url + '#refreshed'; }
|
||||||
|
} else { window.location.href = window.location.href.replace('wsj.com', 'wsj.com/amp').replace('#refreshed', ''); }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (matchDomain('sloanreview.mit.edu')) {
|
} else if (matchDomain('sloanreview.mit.edu')) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user