Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6472a721ba | ||
![]() |
901b4381df | ||
![]() |
af4b4397cc | ||
![]() |
e5fc437cc1 |
12
Readme.md
Normal file
12
Readme.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# I2Pbutton
|
||||
|
||||
## Development howto
|
||||
|
||||
You can build and update i2pbutton without the need of recompiling firefox for most tasks luckly :)
|
||||
|
||||
To do this build it and copy it into your data directory:
|
||||
```
|
||||
./makexpi.sh
|
||||
cp pkg/i2pbutton-0.2.xpi ~/I2PBrowser-Data/Browser/914o5i1s.default/extensions/i2pbutton@geti2p.net.xpi
|
||||
```
|
||||
|
@@ -28,6 +28,9 @@ style chrome://global/content/customizeToolbar.xul chrome://i2pbutton/skin/i2pbu
|
||||
component {f605ec27-d867-44b5-ad97-2a29276642c3} components/dragDropFilter.js
|
||||
contract @geti2p.net/i2pbutton-dragDropFilter;1 {f605ec27-d867-44b5-ad97-2a29276642c3}
|
||||
|
||||
component {3da0269f-fc29-4e9e-a678-c3b1cafcf13f} components/external-app-blocker.js
|
||||
contract @geti2p.net/i2pbutton-extAppBlocker;1 {3da0269f-fc29-4e9e-a678-c3b1cafcf13f}
|
||||
|
||||
component {06322def-6fde-4c06-aef6-47ae8e799629} components/startup-observer.js
|
||||
contract @geti2p.net/startup-observer;1 {06322def-6fde-4c06-aef6-47ae8e799629}
|
||||
|
||||
@@ -40,6 +43,8 @@ contract @geti2p.net/i2pbutton-i2pCheckService;1 {5d57312b-5d8c-4169-b4af-e80d6a
|
||||
component {f36d72c9-9718-4134-b550-e109638331d7} components/i2pbutton-logger.js
|
||||
contract @geti2p.net/i2pbutton-logger;1 {f36d72c9-9718-4134-b550-e109638331d7}
|
||||
|
||||
category profile-after-change CookieJarSelector @geti2p.net/cookie-jar-selector;1
|
||||
|
||||
category profile-after-change StartupObserver @geti2p.net/startup-observer;1
|
||||
category profile-after-change DragDropFilter @geti2p.net/i2pbutton-dragDropFilter;1
|
||||
|
||||
|
@@ -182,7 +182,7 @@ function i2pbutton_check_protections()
|
||||
document.getElementById("i2pbutton-checkForUpdate").hidden = false;
|
||||
}
|
||||
|
||||
var cookie_pref = m_tb_prefs.getBoolPref("extensions.i2pbutton.cookie_protections");
|
||||
var cookie_pref = m_tb_prefs.getBoolPref("extensions.i2pbutton.cookie_protections", true);
|
||||
document.getElementById("i2pbutton-cookie-protector").disabled = !cookie_pref;
|
||||
|
||||
// XXX: Bug 14632: The cookie dialog is useless in private browsing mode in FF31ESR
|
||||
|
@@ -7,18 +7,18 @@ onboarding.tour-i2p-welcome.next-button=Go to Privacy
|
||||
|
||||
onboarding.tour-i2p-privacy=Privacy
|
||||
onboarding.tour-i2p-privacy.title=Snub trackers and snoopers.
|
||||
onboarding.tour-i2p-privacy.description=I2P Browser isolates cookies and deletes your browser hisi2py after your session. These modifications ensure your privacy and security are protected in the browser. Click ‘I2P Network’ to learn how we protect you on the network level.
|
||||
onboarding.tour-i2p-privacy.description=I2P Browser isolates cookies and deletes your browser history after your session. These modifications ensure your privacy and security are protected in the browser. Click ‘I2P Network’ to learn how we protect you on the network level.
|
||||
onboarding.tour-i2p-privacy.button=Go to I2P Network
|
||||
|
||||
onboarding.tour-i2p-network=I2P Network
|
||||
onboarding.tour-i2p-network.title=Travel a decentralized network.
|
||||
onboarding.tour-i2p-network.description=I2P Browser connects you to the I2P network run by thousands of volunteers around the world. Unlike a VPN, there’s no one point of failure or centralized entity you need to trust in order to enjoy the internet privately.
|
||||
onboarding.tour-i2p-network.button=Go to Circuit Display
|
||||
onboarding.tour-i2p-network.button=Go to Tunnel Display
|
||||
|
||||
onboarding.tour-i2p-circuit-display=Circuit Display
|
||||
onboarding.tour-i2p-circuit-display=Tunnel Display
|
||||
onboarding.tour-i2p-circuit-display.title=See your path.
|
||||
onboarding.tour-i2p-circuit-display.description=For each domain you visit, your traffic is relayed and encrypted in a circuit across three I2P relays around the world. No website knows where you are connecting from. You can request a new circuit by clicking ‘New Circuit for this Site’ on our Circuit Display.
|
||||
onboarding.tour-i2p-circuit-display.button=See My Path
|
||||
onboarding.tour-i2p-circuit-display.description=For each domain you visit, your traffic is relayed and encrypted in a tunnel across three I2P routers around the world. Currently displaying this information is still under development.
|
||||
onboarding.tour-i2p-circuit-display.button=Sorry, come back later.
|
||||
onboarding.tour-i2p-circuit-display.next-button=Go to Security
|
||||
|
||||
onboarding.tour-i2p-security=Security
|
||||
@@ -32,12 +32,12 @@ onboarding.tour-i2p-expect-differences=Experience Tips
|
||||
onboarding.tour-i2p-expect-differences.title=Expect some differences.
|
||||
onboarding.tour-i2p-expect-differences.description=With all the security and privacy features provided by I2P, your experience while browsing the internet may be a little different. Things may be a bit slower, and depending on your security level, some elements may not work or load. You may also be asked to prove you are a human and not a robot.
|
||||
onboarding.tour-i2p-expect-differences.button=See FAQs
|
||||
onboarding.tour-i2p-expect-differences.next-button=Go to Onion Services
|
||||
onboarding.tour-i2p-expect-differences.next-button=Go to Hidden Services
|
||||
|
||||
onboarding.tour-i2p-onion-services=Onion Services
|
||||
onboarding.tour-i2p-onion-services=Hidden Services
|
||||
onboarding.tour-i2p-onion-services.title=Be extra protected.
|
||||
onboarding.tour-i2p-onion-services.description=Onion services are sites that end with a .onion that provide extra protections to publishers and visii2ps, including added safeguards against censorship. Onion services allow anyone to provide content and services anonymously. Click below to visit the DuckDuckGo onion site.
|
||||
onboarding.tour-i2p-onion-services.button=Visit an Onion
|
||||
onboarding.tour-i2p-onion-services.description=Hidden services are sites that end with a .i2p that provide extra protections to publishers and visitors, including added safeguards against censorship. Onion services allow anyone to provide content and services anonymously. Click below to visit the DuckDuckGo onion site.
|
||||
onboarding.tour-i2p-onion-services.button=Visit an Hidden
|
||||
onboarding.tour-i2p-onion-services.next-button=Done
|
||||
|
||||
onboarding.overlay-icon-tooltip-updated2=See what's new\nin %S
|
||||
|
124
src/components/external-app-blocker.js
Normal file
124
src/components/external-app-blocker.js
Normal file
@@ -0,0 +1,124 @@
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
const Cr = Components.results;
|
||||
const Cu = Components.utils;
|
||||
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/SharedPromptUtils.jsm");
|
||||
|
||||
// Module specific constants
|
||||
const kMODULE_NAME = "I2pbutton External App Handler";
|
||||
const kCONTRACT_ID = "@geti2p.net/i2pbutton-extAppBlocker;1";
|
||||
const kMODULE_CID = Components.ID("3da0269f-fc29-4e9e-a678-c3b1cafcf13f");
|
||||
|
||||
const kInterfaces = [Ci.nsIObserver, Ci.nsIClassInfo];
|
||||
|
||||
function ExternalAppBlocker() {
|
||||
this.logger = Cc["@geti2p.net/i2pbutton-logger;1"]
|
||||
.getService(Ci.nsISupports).wrappedJSObject;
|
||||
this.logger.log(3, "Component Load 0: New ExternalAppBlocker.");
|
||||
}
|
||||
|
||||
ExternalAppBlocker.prototype =
|
||||
{
|
||||
_helperAppLauncher: undefined,
|
||||
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports, Ci.nsIObserver,
|
||||
Ci.nsIHelperAppWarningDialog]),
|
||||
|
||||
// make this an nsIClassInfo object
|
||||
flags: Ci.nsIClassInfo.DOM_OBJECT,
|
||||
classDescription: kMODULE_NAME,
|
||||
contractID: kCONTRACT_ID,
|
||||
classID: kMODULE_CID,
|
||||
|
||||
// method of nsIClassInfo
|
||||
getInterfaces: function(count) {
|
||||
count.value = kInterfaces.length;
|
||||
return kInterfaces;
|
||||
},
|
||||
|
||||
// method of nsIClassInfo
|
||||
getHelperForLanguage: function(count) { return null; },
|
||||
|
||||
// method of nsIHelperAppWarningDialog
|
||||
maybeShow: function(aLauncher, aWindowContext)
|
||||
{
|
||||
// Hold a reference to the object that called this component. This is
|
||||
// important not just because we need to later invoke the
|
||||
// continueRequest() or cancelRequest() callback on aLauncher, but also
|
||||
// so that the launcher object (which is a reference counted object) is
|
||||
// not released too soon.
|
||||
this._helperAppLauncher = aLauncher;
|
||||
|
||||
if (!Services.prefs.getBoolPref("extensions.i2pbutton.launch_warning")) {
|
||||
this._helperAppLauncher.continueRequest();
|
||||
return;
|
||||
}
|
||||
|
||||
this._showPrompt(aWindowContext);
|
||||
},
|
||||
|
||||
/*
|
||||
* The _showPrompt() implementation uses some XUL and JS that is part of the
|
||||
* browser's confirmEx() implementation. Specifically, _showPrompt() depends
|
||||
* on chrome://global/content/commonDialog.xul as well as some of the code
|
||||
* in resource://gre/modules/SharedPromptUtils.jsm.
|
||||
*/
|
||||
_showPrompt: function(aWindowContext) {
|
||||
let parentWin;
|
||||
try {
|
||||
parentWin = aWindowContext.getInterface(Ci.nsIDOMWindow);
|
||||
} catch (e) {
|
||||
parentWin = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
}
|
||||
|
||||
let title = parentWin.i2pbutton_get_property_string("i2pbutton.popup.external.title");
|
||||
let app = parentWin.i2pbutton_get_property_string("i2pbutton.popup.external.app");
|
||||
let note = parentWin.i2pbutton_get_property_string("i2pbutton.popup.external.note");
|
||||
let suggest = parentWin.i2pbutton_get_property_string("i2pbutton.popup.external.suggest");
|
||||
let launch = parentWin.i2pbutton_get_property_string("i2pbutton.popup.launch");
|
||||
let cancel = parentWin.i2pbutton_get_property_string("i2pbutton.popup.cancel");
|
||||
let dontask = parentWin.i2pbutton_get_property_string("i2pbutton.popup.dontask");
|
||||
|
||||
let args = {
|
||||
promptType: "confirmEx",
|
||||
title: title,
|
||||
text: app+note+suggest+" ",
|
||||
checkLabel: dontask,
|
||||
checked: false,
|
||||
ok: false,
|
||||
button0Label: launch,
|
||||
button1Label: cancel,
|
||||
defaultButtonNum: 1, // Cancel
|
||||
buttonNumClicked: 1, // Cancel
|
||||
enableDelay: true,
|
||||
};
|
||||
|
||||
let propBag = PromptUtils.objectToPropBag(args);
|
||||
let uri = "chrome://global/content/commonDialog.xul";
|
||||
let promptWin = Services.ww.openWindow(parentWin, uri, "_blank",
|
||||
"centerscreen,chrome,titlebar", propBag);
|
||||
promptWin.addEventListener("load", aEvent => {
|
||||
promptWin.addEventListener("unload", aEvent => {
|
||||
PromptUtils.propBagToObject(propBag, args);
|
||||
|
||||
if (0 == args.buttonNumClicked) {
|
||||
// Save the checkbox value and tell the browser's external helper app
|
||||
// module about the user's choice.
|
||||
if (args.checked) {
|
||||
Services.prefs.setBoolPref("extensions.i2pbutton.launch_warning",
|
||||
false);
|
||||
}
|
||||
|
||||
this._helperAppLauncher.continueRequest();
|
||||
} else {
|
||||
this._helperAppLauncher.cancelRequest(Cr.NS_BINDING_ABORTED);
|
||||
}
|
||||
}, false);
|
||||
}, false);
|
||||
},
|
||||
};
|
||||
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([ExternalAppBlocker]);
|
@@ -1,11 +1,13 @@
|
||||
// debug prefs
|
||||
pref("extensions.i2pbutton.loglevel",4);
|
||||
pref("extensions.i2pbutton.loglevel", 3); // Loglevel = info would be nice for the beta period.
|
||||
pref("extensions.i2pbutton.logmethod",1); // 0=stdout, 1=errorconsole, 2=debuglog
|
||||
|
||||
pref("extensions.i2pbutton@geti2p.net.description", "chrome://i2pbutton/locale/i2pbutton.properties");
|
||||
pref("extensions.i2pbutton.updateNeeded", false);
|
||||
|
||||
// Tor check and proxy prefs
|
||||
pref("app.update.url.details", "https://geti2p.net/en/download/lab")
|
||||
|
||||
// I2P check and proxy prefs
|
||||
pref("extensions.i2pbutton.test_enabled",true);
|
||||
pref("extensions.i2pbutton.test_url","http://4mucxjk5rxn2pmlgnjdbfdflhjmqqile5zxrltzl5o77mutl7jiq.b32.i2p/index.json?I2PButton=true");
|
||||
pref("extensions.i2pbutton.local_i2p_check",true);
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<em:name>I2pbutton</em:name>
|
||||
<em:creator>Meeh, Mikal Villa</em:creator>
|
||||
<em:id>i2pbutton@geti2p.net</em:id>
|
||||
<em:version>0.1</em:version>
|
||||
<em:version>0.2</em:version>
|
||||
<em:multiprocessCompatible>true</em:multiprocessCompatible>
|
||||
<em:homepageURL>https://geti2p.net/en/download/lab</em:homepageURL>
|
||||
<em:iconURL>chrome://i2pbutton/skin/i2p.png</em:iconURL>
|
||||
|
@@ -42,6 +42,9 @@ i2pbutton.jar:
|
||||
% component {f605ec27-d867-44b5-ad97-2a29276642c3} %components/dragDropFilter.js
|
||||
% contract @geti2p.net/i2pbutton-dragDropFilter;1 {f605ec27-d867-44b5-ad97-2a29276642c3}
|
||||
|
||||
% component {3da0269f-fc29-4e9e-a678-c3b1cafcf13f} %components/external-app-blocker.js
|
||||
% contract @geti2p.net/i2pbutton-extAppBlocker;1 {3da0269f-fc29-4e9e-a678-c3b1cafcf13f}
|
||||
|
||||
% component {e6204253-b690-4159-bfe8-d4eedab6b3be} %components/cookie-jar-selector.js
|
||||
% contract @geti2p.net/cookie-jar-selector;1 {e6204253-b690-4159-bfe8-d4eedab6b3be}
|
||||
|
||||
@@ -51,5 +54,8 @@ i2pbutton.jar:
|
||||
% component {f36d72c9-9718-4134-b550-e109638331d7} %components/i2pbutton-logger.js
|
||||
% contract @geti2p.net/i2pbutton-logger;1 {f36d72c9-9718-4134-b550-e109638331d7}
|
||||
|
||||
% category profile-after-change CookieJarSelector @geti2p.net/cookie-jar-selector;1
|
||||
|
||||
% category profile-after-change StartupObserver @geti2p.net/startup-observer;1
|
||||
% category profile-after-change DragDropFilter @geti2p.net/i2pbutton-dragDropFilter;1
|
||||
|
||||
|
Reference in New Issue
Block a user