bypass-paywalls-firefox-clean/contentScript.js

24 lines
716 B
JavaScript
Raw Normal View History

window.localStorage.clear();
2018-07-07 22:11:09 +00:00
if (window.location.href.indexOf("bizjournals.com") !== -1) {
2018-06-30 19:48:40 +00:00
const hiddenStory = document.getElementsByClassName(
"js-pre-chunks__story-body"
);
2018-06-30 19:53:50 +00:00
if (hiddenStory && hiddenStory.length>0) {
2018-06-30 19:48:40 +00:00
hiddenStory[0].style.display = "block";
}
2018-06-30 19:53:50 +00:00
const payWallMessage = document.getElementsByClassName(
"chunk chunk--flex@lg chunk--paywall"
);
if (payWallMessage && payWallMessage.length>0 ) {
2018-06-30 19:48:40 +00:00
payWallMessage[0].style.display = "none";
}
2018-07-07 22:11:09 +00:00
} else if (window.location.href.indexOf("businessinsider.com") !== -1) {
const paywall = document.getElementsByClassName(
"tp-modal"
);
while (paywall.length > 0) {
paywall[0].parentNode.removeChild(paywall[0]);
}
2018-06-30 19:48:40 +00:00
}