Skip to content

Commit

Permalink
closes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
rushilsrivastava committed Dec 13, 2018
1 parent 5998d7b commit c855c37
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
17 changes: 12 additions & 5 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "News Paywall Blocker by OpenNews",
"version": "0.19",
"version": "0.19.1",
"manifest_version": 2,
"description": "Experience a brand new FREE browsing experience bypassing pesky cookie Paywalls!",
"author": "Rushil Srivastava",
Expand All @@ -21,10 +21,17 @@
],
"persistent": true
},
"content_scripts": [{
"matches": ["https://cooking.nytimes.com/*"],
"css": ["src/css/nyt.css"]
}],
"content_scripts": [
{
"matches": ["https://cooking.nytimes.com/*"],
"css": ["src/css/nyt.css"]
},
{
"matches": ["https://www.ft.com/*"],
"css": ["src/css/ft.css"],
"js": ["src/js/ft.js"]
}
],
"content_security_policy": "script-src 'self' https://ssl.google-analytics.com; object-src 'self'",
"permissions": [
"webRequest",
Expand Down
3 changes: 3 additions & 0 deletions src/css/ft.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.n-messaging-slot .cookie-banner .variant-cookieConsentC [data-n-messaging-name="cookieConsentA"], [data-n-messaging-name="cookieConsentB"], [data-n-messaging-name="cookieConsentC"] {
display: none !important;
}
2 changes: 1 addition & 1 deletion src/css/nyt.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ html {
overflow: scroll !important;
}

.nytc---modal-window---windowContainer .nytc---shared---blackBG .nytc---modal-window---isShown #app-container div[role=dialog] {
#appContainer {
display: none !important;
}
6 changes: 6 additions & 0 deletions src/js/ft.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
window.onload = function () {
console.log("Disabling Paywall on FT.com");
var disablePaywall = document.createElement("script");
disablePaywall.innerHTML = "window.FT.flags[\"disablePaywall\"] = true;"
document.head.appendChild(disablePaywall);
}

1 comment on commit c855c37

@rushilsrivastava
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reference: this commit force changes the setting in FT's config to disable paywalls.

Please sign in to comment.