-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
189 additions
and
24 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
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 was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,19 +1,27 @@ | |||
{ | { | ||
|
|
||
"description": "Adding Whistle Blowing toolbar button", | "description": "WhistleBlowing Menu", | ||
"manifest_version": 2, | "manifest_version": 2, | ||
"name": "Whistle Blowing", | "name": "Kore Whistle Blowing", | ||
"version": "1.0", | "version": "1.1", | ||
|
|||
"background": { | |||
"scripts": ["background.js"] | |||
}, | |||
|
|
||
"browser_action": { | "browser_action": { | ||
"browser_style": true, | |||
"default_popup": "popup/choose_page.html", | |||
"default_icon": { | "default_icon": { | ||
"16": "icons/whistle-16.png", | "16": "icons/whistle-16.png", | ||
"32": "icons/whistle-32.png" | "32": "icons/whistle-32.png" | ||
} | } | ||
} | }, | ||
|
|
||
"permissions": [ | |||
"browsingData", | |||
"history", | |||
"cookies", | |||
"webNavigation", | |||
"webRequest", | |||
"webRequestBlocking", | |||
"<all_urls>" | |||
] | |||
} | } | ||
|
93 changes: 93 additions & 0 deletions
93
share/tor-browser-conf/addon-whistle/popup/choose_page.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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,93 @@ | |||
html, body { | |||
font-family: Arial, Helvetica, sans-serif; | |||
} | |||
|
|||
|
|||
/* define a fixed width for the entire menu */ | |||
.navigation { | |||
width: 200px; | |||
} | |||
|
|||
/* reset our lists to remove bullet points and padding */ | |||
.mainmenu, .submenu { | |||
list-style: none; | |||
padding: 0; | |||
margin: 0; | |||
} | |||
|
|||
/* make ALL links (main and submenu) have padding and background color */ | |||
.mainmenu a { | |||
display: block; | |||
background-color: white; | |||
text-decoration: none; | |||
padding-left: 30px; | |||
padding-top: 10px; | |||
padding-right: 10px; | |||
padding-bottom: 10px; | |||
color: #000; | |||
} | |||
|
|||
|
|||
/* add hover behaviour */ | |||
.mainmenu a:hover { | |||
background-color: #e9e9e9; | |||
} | |||
|
|||
|
|||
/* when hovering over a .mainmenu item, | |||
display the submenu inside it. | |||
we're changing the submenu's max-height from 0 to 200px; | |||
*/ | |||
|
|||
.mainmenu li:hover .submenu { | |||
display: block; | |||
max-height: 200px; | |||
} | |||
|
|||
/* | |||
we now overwrite the background-color for .submenu links only. | |||
CSS reads down the page, so code at the bottom will overwrite the code at the top. | |||
*/ | |||
|
|||
.submenu a { | |||
padding-left: 50px; | |||
} | |||
|
|||
|
|||
/* hover behaviour for links inside .submenu */ | |||
.submenu a:hover { | |||
background-color: #bbb; | |||
} | |||
|
|||
/* this is the initial state of all submenus. | |||
we set it to max-height: 0, and hide the overflowed content. | |||
*/ | |||
/* | |||
.submenu { | |||
overflow: hidden; | |||
max-height: 0; | |||
-webkit-transition: all 0.5s ease-out; | |||
} | |||
*/ | |||
|
|||
.separator { | |||
border-bottom: 1px solid #ccc; | |||
} | |||
|
|||
/* Menus Identification for icons */ | |||
.mainmenu li #wikileaks { | |||
|
|||
background-image: url("../icons/whistle-16.png"); | |||
background-position: 5px 7px; | |||
background-repeat: no-repeat; | |||
} | |||
|
|||
.mainmenu li #tools { | |||
|
|||
background-image: url("../icons/tools.png"); | |||
background-size: 16px; | |||
background-position: 5px 10px; | |||
background-repeat: no-repeat; | |||
|
|||
} |
29 changes: 29 additions & 0 deletions
29
share/tor-browser-conf/addon-whistle/popup/choose_page.html
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,29 @@ | |||
<!DOCTYPE html> | |||
|
|||
<html> | |||
<head> | |||
<meta charset="utf-8"> | |||
<link rel="stylesheet" href="choose_page.css"/> | |||
</head> | |||
|
|||
<body> | |||
<nav class="navigation"> | |||
<ul class="mainmenu"> | |||
<li><a href="" id="wikileaks">Research</a> | |||
<ul class="submenu"> | |||
<li><a href="https://wikileaks.org/#submit_help_tips"> WikiLeaks</a></li> | |||
<li><a href="https://whisper.exposefacts.org"> Whisper</a></li> | |||
</ul> | |||
</li> | |||
<li><a href="" id="tools">Tools</a> | |||
<ul class="submenu"> | |||
<li><a href="" class="clear_cookies">Clear Cookies</a></li> | |||
<li><a href="" class="clear_history">Clear History</a></li> | |||
</ul> | |||
</li> | |||
</ul> | |||
</nav> | |||
<script src="choose_page.js"></script> | |||
</body> | |||
|
|||
</html> |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,20 @@ | |||
|
|||
function onRemovedCookies() { | |||
console.log("Removed all cookies"); | |||
} | |||
|
|||
function onRemovedHistory() { | |||
console.log("Removed History"); | |||
} | |||
|
|||
function onError(error) { | |||
console.log(`Error removing cookie: ${error}`); | |||
} | |||
|
|||
document.addEventListener("click", function(e) { | |||
if (e.target.classList.contains("clear_cookies")) { | |||
browser.browsingData.removeCookies({}).then(onRemovedCookies, onError); | |||
} else if (e.target.classList.contains("clear_history")) { | |||
browser.browsingData.removeHistory({}).then(onRemovedHistory, onError); | |||
} | |||
}); |
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
Binary file modified
BIN
+3.16 KB
(120%)
share/tor-browser-conf/{f47ca0a8-45b9-467e-8e4f-00d4fdb5acf1}.xpi
Binary file not shown.