Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hover Extension Update #1

Merged
merged 2 commits into from
Aug 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
![Hover](slideshow/hover_logo.png)

### An open-sourced extension that automatically blocks all ads and bypasses paywalls.
### An open-sourced extension that allows you to browse important information with ease and without distractions

# Features
![Hover_1](slideshow/ss8/1.png)
![Hover_2](slideshow/ss8/2.png)
![Hover_3](slideshow/ss8/3.png)

## Paywall / Subscription Wall Bypasser
Gain access to content and articles without having to sign in or upgrade to Premium.

## Undetectable Ad-Blocker
Blocks ads on websites without getting detected.
Browse more content on the internet. Made so you can access important information, on topics like coronavirus and elections, with ease and without ads, blocks, or tracking modules.

# Installation

Expand All @@ -28,8 +26,16 @@ Blocks ads on websites without getting detected.
Fork the repository and improve Hover!
Make edits in src folder, and then run ```npm run build```. This will create the dist folder, which is used by browsers.

Current stable version: 2.2.3
Dev version: 2.2.4
Current stable version: 2.2.7
Dev version: 2.2.8

## Next Steps
Transfer into a Firefox extension.
Transfer into a Firefox extension.

## Notes

-The only permissions/settings the extension utilizes are for webRequest and cookie functionality, and nothing more.
-Methods like using outline.com and simply using Incognito Mode are outdated and no longer work on most sites.

Disclaimer:
Do not use this extension to violate the terms of service/use of any website.
12 changes: 6 additions & 6 deletions dist/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"files": {
"main.css": "/static/css/main.bfd9321d.chunk.css",
"main.js": "/static/js/main.18e5b942.chunk.js",
"main.js": "/static/js/main.d1a4d6d1.chunk.js",
"runtime-main.js": "/static/js/runtime-main.a7c909dd.js",
"static/js/2.2f5ddc2b.chunk.js": "/static/js/2.2f5ddc2b.chunk.js",
"static/js/2.82a4949e.chunk.js": "/static/js/2.82a4949e.chunk.js",
"index.html": "/index.html",
"precache-manifest.1462c08abe0b208b172921f9e1a9589a.js": "/precache-manifest.1462c08abe0b208b172921f9e1a9589a.js",
"precache-manifest.77fbf9493eeba134b1e0c0bce97b5a75.js": "/precache-manifest.77fbf9493eeba134b1e0c0bce97b5a75.js",
"service-worker.js": "/service-worker.js",
"static/js/2.2f5ddc2b.chunk.js.LICENSE.txt": "/static/js/2.2f5ddc2b.chunk.js.LICENSE.txt",
"static/js/2.82a4949e.chunk.js.LICENSE.txt": "/static/js/2.82a4949e.chunk.js.LICENSE.txt",
"static/media/hover_logo.jpg": "/static/media/hover_logo.d2a9c858.jpg"
},
"entrypoints": [
"static/js/runtime-main.a7c909dd.js",
"static/js/2.2f5ddc2b.chunk.js",
"static/js/2.82a4949e.chunk.js",
"static/css/main.bfd9321d.chunk.css",
"static/js/main.18e5b942.chunk.js"
"static/js/main.d1a4d6d1.chunk.js"
]
}
8 changes: 0 additions & 8 deletions dist/bg_scripts/paywall_scripts/outline.js

This file was deleted.

44 changes: 44 additions & 0 deletions dist/bg_scripts/paywall_scripts/paywall_SM.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* paywall_SM.js contains all the functionality for the paywall blacklist for changing
* referer to be from Social Media site
*/

var paywallInSMWhitelist = true;

function addToPaywallSMWhitelist(root) {
chrome.storage.sync.get(["paywallSMWhitelistDict"],
(result) => {
updResult = result.paywallSMWhitelistDict
root = "*://*." + root + "/*"

//Add root to paywallSMWhitelistDict
updResult[root] = '1'

chrome.storage.sync.set({
paywallSMWhitelistDict: updResult
}, function() {
paywallSMWhitelistDict = updResult;
console.log("Added " + root + " To Paywall SMWhitelist!");
chrome.tabs.reload();
});
});
}

function removeFromPaywallSMWhitelist(root) {
chrome.storage.sync.get(["paywallSMWhitelistDict"],
(result) => {
updResult = result.paywallSMWhitelistDict
root = "*://*." + root + "/*"

//Remove root from paywallSMWhitelistDict
delete updResult[root];

chrome.storage.sync.set({
paywallSMWhitelistDict: updResult
}, function() {
paywallSMWhitelistDict = updResult;
console.log("Removed " + root + " From Paywall SMWhitelist!");
chrome.tabs.reload();
});
});
}
23 changes: 12 additions & 11 deletions dist/bg_scripts/paywall_scripts/paywall_bypass.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,18 @@ function bypassPaywalls(details) {

paywallEnabled = true;
//Redirect Referer

details.requestHeaders = details.requestHeaders.filter(function(header) {
if(header.name === "Referer")
return false
return true
})
details.requestHeaders.push({
"name": "Referer",
"value": "https://t.co/"
})
console.log("Changed Header to Twitter")
if (!(rootSearch in paywallSMWhitelistDict)) {
details.requestHeaders = details.requestHeaders.filter(function(header) {
if(header.name === "Referer")
return false
return true
})
details.requestHeaders.push({
"name": "Referer",
"value": "https://t.co/"
})
console.log("Changed Header to Twitter")
}

//Set Cookie Permission as necessary
if (!(rootSearch in paywallCookieWhitelistDict)) {
Expand Down
22 changes: 0 additions & 22 deletions dist/bg_scripts/paywall_scripts/paywall_cookies.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,6 @@

var paywallInCookieWhitelist = true;

function checkPaywallCookieWhitelist(details) {
root = extractRootWebsite(details.url)
rootSearch = "*://*." + root + "/*"
if(root !== "failed")
paywallInCookieWhitelist = (rootSearch in paywallCookieWhitelistDict)
}
chrome.webRequest.onCompleted.addListener(checkPaywallCookieWhitelist,
{
urls: ["<all_urls>"],
types: ["main_frame"],
})

//Set the storage to default site blacklist on install
function setDefaultPaywallCookieWhitelist(details) {
if (details.reason === 'install') {
chrome.storage.sync.set({
paywallCookieWhitelistDict: paywallCookieWhitelistDict
})
}
}
chrome.runtime.onInstalled.addListener(setDefaultPaywallCookieWhitelist);

function addToPaywallCookieWhitelist(root) {
chrome.storage.sync.get(["paywallCookieWhitelistDict"],
(result) => {
Expand Down
36 changes: 36 additions & 0 deletions dist/bg_scripts/paywall_scripts/paywall_lists.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* paywall_lists.js contains functionality for initiating and updating List variables
*/

//Set the storage to default site blacklist on install
function setDefaultPaywallLists(details) {
if (details.reason === 'install') {
chrome.storage.sync.set({
paywallSMWhitelistDict: paywallSMWhitelistDict,
paywallSpoofWhitelistDict: paywallSpoofWhitelistDict,
paywallBlacklistDict: paywallBlacklistDict,
paywallCookieWhitelistDict: paywallCookieWhitelistDict
})
}
}
chrome.runtime.onInstalled.addListener(setDefaultPaywallLists);

function checkPaywallLists(root) {
rootSearch = "*://*." + root + "/*"
if(root !== "failed") {
paywallInSMWhitelist = (rootSearch in paywallSMWhitelistDict)
paywallInSpoofWhitelist = (rootSearch in paywallSpoofWhitelistDict)
paywallInBlacklist = (rootSearch in paywallBlacklistDict)
paywallEnabled = (rootSearch in paywallBlacklistDict)
paywallInCookieWhitelist = (rootSearch in paywallCookieWhitelistDict)
console.log("paywallEnabled: " + paywallEnabled)
}
}

function updatePaywallLists(details) {
getCurrentTabRoot(checkPaywallLists)
}
chrome.webRequest.onCompleted.addListener(updatePaywallLists, {
urls: ["<all_urls>"],
types: ["main_frame"],
})
8 changes: 7 additions & 1 deletion dist/bg_scripts/paywall_scripts/paywall_sites.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ var paywallBlacklistDict = {
"*://*.baltimoresun.com/*": "1",
"*://*.barrons.com/*": "1",
"*://*.bloomberg.com/*": "1",
"*://*.businessinsider.com/*": "1",
"*://*.chicagobusiness.com/*": "1",
"*://*.chicagotribune.com/*": "1",
"*://*.chip.de/*": "1",
Expand Down Expand Up @@ -68,7 +69,11 @@ var paywallBlacklistDict = {
"*://*.washingtonpost.com/*": "1",
"*://*.wired.com/*": "1",
"*://*.wsj.com/*": "1",
"*://*.wsj.net/*": "1"
"*://*.wsj.net/*": "1",

}

var paywallSMWhitelistDict = {
}

var paywallSpoofWhitelistDict = {
Expand All @@ -87,4 +92,5 @@ var paywallCookieWhitelistDict = {
"*://*.newyorker.com/*": "1",
"*://*.theathletic.com/*": "1",
"*://*.theathletic.co.uk/*": "1",
"*://*.businessinsider.com/*": "1"
}
2 changes: 0 additions & 2 deletions dist/bg_scripts/paywall_scripts/paywall_specific_routes.js

This file was deleted.

23 changes: 0 additions & 23 deletions dist/bg_scripts/paywall_scripts/paywall_spoof.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,6 @@

var paywallInSpoofWhitelist = true;

function checkPaywallSpoofWhitelist(details) {
root = extractRootWebsite(details.url)
rootSearch = "*://*." + root + "/*"
if(root !== "failed")
paywallInSpoofWhitelist = (rootSearch in paywallSpoofWhitelistDict)
}

chrome.webRequest.onCompleted.addListener(checkPaywallSpoofWhitelist,
{
urls: ["<all_urls>"],
types: ["main_frame"],
})

//Set the storage to default site blacklist on install
function setDefaultPaywallSpoofWhitelist(details) {
if (details.reason === 'install') {
chrome.storage.sync.set({
paywallSpoofWhitelistDict: paywallSpoofWhitelistDict
})
}
}
chrome.runtime.onInstalled.addListener(setDefaultPaywallSpoofWhitelist);

function addToPaywallSpoofWhitelist(root) {
chrome.storage.sync.get(["paywallSpoofWhitelistDict"],
(result) => {
Expand Down
19 changes: 0 additions & 19 deletions dist/bg_scripts/paywall_scripts/paywall_storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,6 @@

var paywallInBlacklist = false;

function checkPaywallBlackList(root) {
rootSearch = "*://*." + root + "/*"
if(root !== "failed") {
paywallInBlacklist = (rootSearch in paywallBlacklistDict)
paywallEnabled = (rootSearch in paywallBlacklistDict)
console.log("paywallEnabled: " + paywallEnabled)
}
}

function updatePaywallBlackList(details) {
getCurrentTabRoot(checkPaywallBlackList)
}

chrome.webRequest.onCompleted.addListener(updatePaywallBlackList,
{
urls: ["<all_urls>"],
types: ["main_frame"],
})

//Set the storage to default site blacklist on install
function setDefaultPaywallBlacklist(details) {
if (details.reason === 'install') {
Expand Down
13 changes: 6 additions & 7 deletions dist/manifest.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"name": "Hover - Bypass Paywalls & Subscription Walls",
"description": "Hover is an undetectable, lightweight extension that automatically bypasses paywalls and blocks all ads.",
"name": "Hover - Browse Important Content",
"description": "An undetectable, lightweight extension that allows you to browse important information with ease and without distractions.",
"manifest_version": 2,
"version": "2.2.2",
"version": "2.2.7",
"background": {
"scripts": ["bg_scripts/tab_data.js",
"bg_scripts/adblock_scripts/ad_domains.js",
"bg_scripts/paywall_scripts/paywall_specific_routes.js",
"bg_scripts/adblock_scripts/adblock_storage.js",
"bg_scripts/paywall_scripts/paywall_sites.js",
"bg_scripts/adblock_scripts/adblock.js",
"bg_scripts/paywall_scripts/paywall_sites.js",
"bg_scripts/paywall_scripts/paywall_bypass.js",
"bg_scripts/paywall_scripts/paywall_storage.js",
"bg_scripts/paywall_scripts/paywall_cookies.js",
"bg_scripts/paywall_scripts/paywall_spoof.js",
"bg_scripts/paywall_scripts/paywall_SM.js",
"bg_scripts/paywall_scripts/paywall_lists.js",
"bg_scripts/auto_update.js"
]
},
Expand All @@ -25,9 +26,7 @@
"http://*/",
"https://*/",
"storage",
"activeTab",
"background",
"cookies",
"contentSettings"],
"icons": { "16": "logo16.png",
"48": "logo48.png",
Expand Down
2 changes: 1 addition & 1 deletion dist/popup.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous"/><title>React App</title><link href="/static/css/main.bfd9321d.chunk.css" rel="stylesheet"></head><body style="width:315px"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="/static/js/runtime-main.a7c909dd.js"></script><script src="/static/js/2.2f5ddc2b.chunk.js"></script><script src="/static/js/main.18e5b942.chunk.js"></script></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous"/><title>React App</title><link href="/static/css/main.bfd9321d.chunk.css" rel="stylesheet"></head><body style="width:315px"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="/static/js/runtime-main.a7c909dd.js"></script><script src="/static/js/2.82a4949e.chunk.js"></script><script src="/static/js/main.d1a4d6d1.chunk.js"></script></body></html>
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "e5a7eeb3dd455aee9f31c9c241fbcda1",
"revision": "6c07b904ca10708a3151e1654c7de4d2",
"url": "/index.html"
},
{
"revision": "6f130e99a506d3a13d89",
"revision": "43251a04fe0c0f16b127",
"url": "/static/css/main.bfd9321d.chunk.css"
},
{
"revision": "4b0d69e76982a20804ea",
"url": "/static/js/2.2f5ddc2b.chunk.js"
"revision": "89cd6e4105be70fc7911",
"url": "/static/js/2.82a4949e.chunk.js"
},
{
"revision": "5ac48c47bb3912b14c2d8de4f56d5ae8",
"url": "/static/js/2.2f5ddc2b.chunk.js.LICENSE.txt"
"url": "/static/js/2.82a4949e.chunk.js.LICENSE.txt"
},
{
"revision": "6f130e99a506d3a13d89",
"url": "/static/js/main.18e5b942.chunk.js"
"revision": "43251a04fe0c0f16b127",
"url": "/static/js/main.d1a4d6d1.chunk.js"
},
{
"revision": "9dc1355d6503cab5a502",
Expand Down
2 changes: 1 addition & 1 deletion dist/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");

importScripts(
"/precache-manifest.1462c08abe0b208b172921f9e1a9589a.js"
"/precache-manifest.77fbf9493eeba134b1e0c0bce97b5a75.js"
);

self.addEventListener('message', (event) => {
Expand Down

Large diffs are not rendered by default.

Loading