mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 06:57:48 +01:00
Merge pull request #341 from cimke/feature/remove-medium-footer
Remove medium sticky footer
This commit is contained in:
commit
dadb9f2e30
1 changed files with 15 additions and 0 deletions
|
@ -99,6 +99,13 @@ if (window.location.href.indexOf("bizjournals.com") !== -1) {
|
|||
}
|
||||
}
|
||||
|
||||
if (window.location.href.indexOf("medium.com") !== -1) {
|
||||
const bottomMessageText = 'Get one more story in your member preview when you sign up. It’s free.';
|
||||
const DOMElementsToTextDiv = pageContains('div', bottomMessageText);
|
||||
|
||||
if (DOMElementsToTextDiv[2]) removeDOMElement(DOMElementsToTextDiv[2]);
|
||||
}
|
||||
|
||||
if (window.location.href.indexOf("bloombergquint.com") !== -1) {
|
||||
const articlesLeftModal = document.getElementsByClassName('paywall-meter-module__story-paywall-container__1UgCE')[0];
|
||||
const paywall = document.getElementById('paywallDmp');
|
||||
|
@ -158,3 +165,11 @@ function removeDOMElement(...elements) {
|
|||
if (element) element.remove();
|
||||
}
|
||||
}
|
||||
|
||||
function pageContains(selector, text) {
|
||||
let elements = document.querySelectorAll(selector);
|
||||
|
||||
return Array.prototype.filter.call(elements, function(element){
|
||||
return RegExp(text).test(element.textContent);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue