mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-13 02:14:15 +01:00
Fix-update WSJ (amp for pro/login)
This commit is contained in:
parent
29ae9db483
commit
710ac16453
2 changed files with 7 additions and 11 deletions
|
@ -197,7 +197,8 @@ var blockedRegexes = {
|
||||||
'thecourier.com.au': /.+cdn-au\.piano\.io\/api\/tinypass.+\.js/,
|
'thecourier.com.au': /.+cdn-au\.piano\.io\/api\/tinypass.+\.js/,
|
||||||
'thedailybeast.com': /.+\.tinypass\.com\/.+/,
|
'thedailybeast.com': /.+\.tinypass\.com\/.+/,
|
||||||
'thenation.com': /.+\.tinypass\.com\/.+/,
|
'thenation.com': /.+\.tinypass\.com\/.+/,
|
||||||
'valeursactuelles.com': /.+\.poool\.fr\/.+/
|
'valeursactuelles.com': /.+\.poool\.fr\/.+/,
|
||||||
|
'wsj.com': /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/
|
||||||
};
|
};
|
||||||
|
|
||||||
const userAgentDesktop = "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
|
const userAgentDesktop = "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
|
||||||
|
|
|
@ -121,22 +121,17 @@ 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');
|
let wsj_login = document.querySelector('.wsj-snippet-login, .wsjpro-label');
|
||||||
if (wsj_login && !window.location.hash) {
|
if (wsj_login) {
|
||||||
let url = window.location.href;
|
window.location.href = window.location.href.replace('wsj.com', 'wsj.com/amp');
|
||||||
if (url.includes('?')) {
|
|
||||||
window.location.href = url.replace('?', '#refreshed?');
|
|
||||||
} else {
|
|
||||||
window.location.href = url + '#refreshed';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (matchDomain("sloanreview.mit.edu")) {
|
else if (matchDomain("sloanreview.mit.edu")) {
|
||||||
const read_more = document.querySelector('.btn-read-more');
|
const read_more = document.querySelector('.btn-read-more');
|
||||||
if(read_more)
|
if (read_more)
|
||||||
read_more.click();
|
read_more.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (matchDomain("mexiconewsdaily.com")) {
|
else if (matchDomain("mexiconewsdaily.com")) {
|
||||||
|
|
Loading…
Reference in a new issue