Fix Globe and Mail (update)
Clear in-memory cache for Webrequest to work correctly (block or not block specific G&B-Javascript).
This commit is contained in:
parent
00c8d8e2e7
commit
f4f8f0e034
@ -171,11 +171,11 @@ Usually premium articles cannot be bypassed as they are behind a hard paywall. P
|
||||
* This extension works best alongside [uBlock Origin](https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm).
|
||||
* If a site doesn't work, try turning off uBlock and refreshing. Also try reinstalling the extension.
|
||||
* Make sure the site is checked under Options (on macOS sometimes the sites are unselected).
|
||||
* Make sure you're running the last version of Bypass Paywalls.
|
||||
* Make sure you're running the last version of Bypass Paywalls.
|
||||
* If none of these work, you can submit an issue [here](https://github.com/iamadamdev/bypass-paywalls-chrome/issues).
|
||||
|
||||
### Changelog
|
||||
Visit the [releases page](https://github.com/iamadamdev/bypass-paywalls-chrome/releases).
|
||||
* Visit the [releases page](https://github.com/iamadamdev/bypass-paywalls-chrome/releases).
|
||||
|
||||
### Pull Requests
|
||||
* PRs are welcome.
|
||||
@ -184,4 +184,4 @@ Visit the [releases page](https://github.com/iamadamdev/bypass-paywalls-chrome/r
|
||||
* I am not asking for donations or anything like that, all I ask is that you star this repo.
|
||||
|
||||
### License
|
||||
Bypass Paywalls is [MIT-licensed](https://github.com/iamadamdev/bypass-paywalls-chrome/blob/master/LICENSE).
|
||||
* Bypass Paywalls is [MIT-licensed](https://github.com/iamadamdev/bypass-paywalls-chrome/blob/master/LICENSE).
|
||||
|
@ -211,7 +211,7 @@ chrome.webRequest.onBeforeRequest.addListener(function (details) {
|
||||
["blocking"]
|
||||
);
|
||||
**/
|
||||
|
||||
|
||||
// Disable javascript for these sites/general paywall-scripts
|
||||
chrome.webRequest.onBeforeRequest.addListener(function(details) {
|
||||
if (!isSiteEnabled(details)) {
|
||||
@ -255,6 +255,9 @@ chrome.webRequest.onBeforeSendHeaders.addListener(function(details) {
|
||||
if (details.url.indexOf('meter.bostonglobe.com/js/') !== -1 && (header_referer === 'https://www.bostonglobe.com/'
|
||||
|| header_referer.indexOf('/?p1=BGHeader_') !== -1 || header_referer.indexOf('/?p1=BGMenu_') !== -1)) {
|
||||
break;
|
||||
} else if (header_referer.indexOf('theglobeandmail.com') !== -1 && !(header_referer.indexOf('/article-') !== -1)) {
|
||||
chrome.webRequest.handlerBehaviorChanged(function () {});
|
||||
break;
|
||||
}
|
||||
return { cancel: true };
|
||||
}
|
||||
@ -408,4 +411,4 @@ function getParameterByName(name, url) {
|
||||
|
||||
function stripQueryStringAndHashFromPath(url) {
|
||||
return url.split("?")[0].split("#")[0];
|
||||
}
|
||||
}
|
||||
|
@ -334,10 +334,13 @@ if (window.location.href.indexOf("theglobeandmail.com") !== -1) {
|
||||
const hidden_image = document.querySelectorAll('img');
|
||||
for (let i = 0; i < hidden_image.length; i++) {
|
||||
var src = hidden_image[i].src;
|
||||
if ('src: ' + src.indexOf("image/gif") !== -1) {
|
||||
if (src.indexOf("data:image/gif") !== -1) {
|
||||
var data_src = hidden_image[i].getAttribute("data-src");
|
||||
if (data_src)
|
||||
hidden_image[i].setAttribute('src', data_src);
|
||||
var data_bg = hidden_image[i].getAttribute("data-bg");
|
||||
if (data_bg)
|
||||
hidden_image[i].setAttribute('src', data_bg);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user