mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-13 02:14:15 +01:00
Fix-update WSJ (snippet)
This commit is contained in:
parent
2732dd7fe5
commit
4974f8dfea
1 changed files with 10 additions and 3 deletions
|
@ -121,9 +121,16 @@ else if (matchDomain("wsj.com")) {
|
||||||
close_button.click();
|
close_button.click();
|
||||||
}
|
}
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
let wsj_login = document.querySelector('.wsj-snippet-login, .wsjpro-label');
|
let url = window.location.href;
|
||||||
if (wsj_login) {
|
let snippet = document.querySelector('.snippet-promotion');
|
||||||
window.location.href = window.location.href.replace('wsj.com', 'wsj.com/amp');
|
if (snippet) {
|
||||||
|
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', '');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue