-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Firefox: Update CSS, remove JS, don't modify cookies, use JPM
- Loading branch information
Showing
9 changed files
with
66 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
#epbar, #pmocntr2 { | ||
#epbar, | ||
#pmocntr2, | ||
#cnsh, /* Privacy hint on Google homepage */ | ||
#cnso /* Privacy hint ontop of search results */ | ||
{ | ||
display: none !important; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,37 @@ | ||
//import custom modules | ||
let observer = require("observer"); | ||
let cook = require("cookie"); | ||
let urls = require("urls"); | ||
// Import custom modules | ||
let observer = require("./observer"); | ||
let urls = require("./urls"); | ||
|
||
//create observer | ||
// Create observer | ||
observer.createObserver(observe); | ||
|
||
//observe http modify request | ||
// Observe HTTP modify request | ||
function observe(httpChannel) { | ||
var url = httpChannel.URI; | ||
|
||
//check blacklist | ||
if(!urls.isBlacklisted(url)) { | ||
return; | ||
} | ||
var url = httpChannel.URI.spec; | ||
|
||
//check whitelist | ||
if(urls.isWhitelisted(url)) { | ||
// Check if Google search URL | ||
if(!urls.isSearchUrl(url)) { | ||
return; | ||
} | ||
|
||
//set cleaned cookie | ||
try { | ||
var cookie = httpChannel.getRequestHeader("Cookie"); | ||
} catch(e) {} | ||
if(cookie != undefined) { | ||
cookie = cook.cleanCookie(cookie); | ||
httpChannel.setRequestHeader("Cookie", cookie, false); | ||
} | ||
// Remove cookie from headers | ||
httpChannel.setRequestHeader("Cookie", "", false); | ||
} | ||
|
||
//load | ||
// Addon load | ||
exports.main = function() { | ||
observer.register(); | ||
}; | ||
|
||
//unload | ||
// Addon unload | ||
exports.onUnload = function() { | ||
observer.unregister(); | ||
} | ||
|
||
//get rid of page decoration and change country name to anonymous | ||
// Remove cookie/privacy hints that would popup on every page visit otherwise | ||
let data = require("sdk/self").data; | ||
require("sdk/page-mod").PageMod({ | ||
include: /^https?:\/\/((www|encrypted)\.)?google\..*/, | ||
contentScriptWhen: "ready", | ||
contentStyleFile: data.url("google.css"), | ||
contentScriptFile: data.url("google.js") | ||
}); | ||
contentStyleFile: data.url("google.css") | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
{ | ||
"name": "searchonymous", | ||
"title": "Searchonymous", | ||
"id": "jid1-WF1v8esuNM9pRg", | ||
"description": "Search anonymously on Google, while keeping your search preferences and stay logged in on services such as Youtube, Gmail, etc.", | ||
"id": "jid1-WF1v8esuNM9pRg@jetpack", | ||
"description": "Search anonymously on Google while staying logged in on services such as Youtube, Gmail, etc.", | ||
"author": "MorbZ", | ||
"license": "MPL 2.0", | ||
"version": "1.0.3" | ||
"version": "1.0.5", | ||
"main": "lib/main.js" | ||
} |
This file was deleted.
Oops, something went wrong.