Permalink
Browse files

Merge pull request #10 from jayenashar/master

recursive decryption & automatic activation (Thanks for the update jayenashar!)
  • Loading branch information...
2 parents 8d1f70f + 50d5f60 commit e682a506e011cfd7abbfd52bc63e35f917d6635e @darkpixel darkpixel committed Apr 5, 2012
View
6 README
@@ -24,11 +24,13 @@ For development you should do the following:
1. Unzip the entire contents of this package to somewhere,
e.g, c:\dev or /home/user/dev
+1.8. Uninstall firegpg if you already have it
+1.9. Close firefox
2. Put the full path to the folder (e.g. c:\dev\firegpg on
Windows, /home/user/dev/firegpg on Linux) in a file named
firegpg@firegpg.team and copy that file to
[your profile folder]\extensions\
-3. Restart Firefox.
+3. [Re]start Firefox.
Contributing
------------
@@ -41,4 +43,4 @@ See Also
Several people from the FireGPG community have banded together and are working on two
new projects. One is a replacement for FireGPG that will apparently initially target
the Chrome web browser from Google and then be released for Firefox.
-The second is gpgAuth which is available for Chrome. (https://github.com/gpgauth)
+The second is gpgAuth which is available for Chrome. (https://github.com/gpgauth)
View
@@ -116,7 +116,7 @@ FireGPG.Inline.HandleBlock = function(document, range, blockType) {
// private information (contents of encrypted message).
var frame = document.createElement("iframe");
range.insertNode(frame);
- frame.contentWindow.location.href = "chrome://firegpg/skin/block.xml";
+ frame.contentWindow.location.href = "chrome://firegpg/skin/block.html";
frame.style.border = "0px";
frame.style.width = "100%";
@@ -181,13 +181,16 @@ FireGPG.Inline.HandleBlock = function(document, range, blockType) {
break;
case FireGPG.Inline.MESSAGE_BLOCK:
FireGPG.Inline.DecryptMessage(block.original.textContent, block);
+ FireGPG.Inline.HandlePage(frame.contentDocument);
break;
}
frame.style.width = block.body.scrollWidth + "px";
frame.style.height = block.body.scrollHeight + "px";
};
block.action.addEventListener("click", actionHandler, false);
+ if (FireGPG.Inline.autoactivate)
+ actionHandler();
switch(blockType) {
case FireGPG.Inline.KEY_BLOCK:
@@ -544,6 +547,14 @@ FireGPG.Inline.initSystem = function() {
FireGPG.Inline.activate = activate;
+ try {
+ var autoactivate = prefs.getBoolPref("auto_activate_inline");
+ } catch (e) {
+ var autoactivate = true;
+ }
+
+ FireGPG.Inline.autoactivate = autoactivate;
+
try {
if (document.getElementById("appcontent"))
View
@@ -48,7 +48,7 @@ Portions created by gpg_auth are Copyright (C) 2007 Kyle L. Huff All Rights Rese
Parameters:
checkbox - _Optional_. The checkbox value. If not set, use the current value.
- focus_textbox - _Optional_. Set it to true to fucus the text field
+ focus_textbox - _Optional_. Set it to true to focus the text field
*/
function onChangeGPGPathCheckbox(checkbox, focus_textbox) {
/* checked ? */
@@ -69,6 +69,30 @@ function onChangeGPGPathCheckbox(checkbox, focus_textbox) {
/*
+ Function: onChangeActivateInlineCheckbox
+ Called when inline-activated is checked/unchecked to
+ enable/disable some elements in the options interface.
+
+ Parameters:
+ checkbox - _Optional_. The checkbox value. If not set, use the current value.
+ focus_checkbox - _Optional_. Set it to true to focus the check box
+*/
+function onChangeActivateInlineCheckbox(checkbox, focus_checkbox) {
+ /* checked ? */
+ if(checkbox == undefined)
+ checkbox = document.getElementById('inline-activated');
+
+ var disabled = (checkbox.checked) ? false : true;
+
+ /* checkbox */
+ var checkbox = document.getElementById('inline-auto-activated');
+ checkbox.disabled = disabled;
+ if(focus_checkbox != undefined && focus_checkbox == true)
+ checkbox.focus();
+}
+
+
+/*
Function: privateKeySelected
This function is called when a private key is selected. It's update the hidden field.
*/
@@ -174,6 +198,7 @@ function onLoad(win) {
/* call some important events */
onChangeGPGPathCheckbox();
+ onChangeActivateInlineCheckbox();
/* gpgAUth */
getIgnored_servers( document.getElementById('domain_list') );
@@ -59,6 +59,7 @@ Portions created by gpg_auth are Copyright (C) 2007 Kyle L. Huff All Rights Rese
<preference id="no-updates" name="extensions.firegpg.no_updates" type="bool"/>
<preference id="hide-expired-pref" name="extensions.firegpg.hide_expired" type="bool"/>
<preference id="inline-activated-pref" name="extensions.firegpg.activate_inline" type="bool"/>
+ <preference id="inline-auto-activated-pref" name="extensions.firegpg.auto_activate_inline" type="bool"/>
<preference id="hide-fireftp-message-pref" name="extensions.firegpg.fireftp_already_warning" type="bool"/>
<preference id="use-fireftp-workaround-pref" name="extensions.firegpg.fireftp_try_to_use_old_system" type="bool"/>
@@ -94,7 +95,10 @@ Portions created by gpg_auth are Copyright (C) 2007 Kyle L. Huff All Rights Rese
<!-- hide expired keys -->
<checkbox id="hide-expired" preference="hide-expired-pref" label="&hide-expired;"/>
- <checkbox id="inline-activated" preference="inline-activated-pref" label="&inline-activated;"/>
+ <checkbox id="inline-activated" preference="inline-activated-pref" label="&inline-activated;"
+ control="inline-auto-activated"
+ oncommand="onChangeActivateInlineCheckbox(this, true);"/>
+ <checkbox id="inline-auto-activated" preference="inline-auto-activated-pref" label="&inline-auto-activated;"/>
<checkbox id="updates-checkbox" preference="no-updates" label="&turn-off-updates;" onclick="showWarnings()"/>
@@ -481,4 +485,4 @@ Portions created by gpg_auth are Copyright (C) 2007 Kyle L. Huff All Rights Rese
<script src="../GpgAuth/gpgauth_options.js"/>
<script src="../Webmails/autowrap.js"/>
-</prefwindow>
+</prefwindow>
@@ -21,6 +21,7 @@ pref("extensions.firegpg.no_updates", false);
pref("extensions.firegpg.enable_gpgapi", true);
pref("extensions.firegpg.gmail_butons_use_select", false);
pref("extensions.firegpg.activate_inline", true);
+pref("extensions.firegpg.auto_activate_inline", false);
pref("extensions.firegpg.gmail_disable_autosave", false);
pref("extensions.firegpg.keyserver", "pgp.mit.edu");
pref("extensions.firegpg.gmail_never_use_google_com_password", false);
View
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "Display a list instead of buttons">
<!ENTITY firegpg-ask-for-private-label.text "نسأل دائما عن المفتاح الخاص">
<!ENTITY inline-activated "Check for PGP blocks in pages (restart needed)">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "Disable autosave feature">
<!ENTITY gmail-buton-csign-checkbox "واضح التوقيع">
<!ENTITY gmail-buton-csignsend-checkbox "واضح التوقيع">
View
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "No mostris botons sino una llista">
<!ENTITY firegpg-ask-for-private-label.text "Demanar sempre per la clau privada">
<!ENTITY inline-activated "Activa el controlador per a blocs GPG en les pàgines (es necessita reiniciar)">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "Deshabilitar autoguardar">
<!ENTITY gmail-buton-csign-checkbox "Neteja la signatura">
<!ENTITY gmail-buton-csignsend-checkbox "Neteja la signatura i envia">
View
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "Zobrazit seznam místo tlačítek">
<!ENTITY firegpg-ask-for-private-label.text "Vždy se ptát na tajný klíč">
<!ENTITY inline-activated "Hledat PGP bloky ve stránkách (vyžaduje restart)">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "Vypnout automatické ukládání">
<!ENTITY gmail-buton-csign-checkbox "Podepsat čitelně">
<!ENTITY gmail-buton-csignsend-checkbox "Podepsat čitelně a odeslat">
View
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "Vis liste fremfor knapper">
<!ENTITY firegpg-ask-for-private-label.text "Spørg altid efter privat nøgle">
<!ENTITY inline-activated "Tjek for PGP-blok på sider (kræver genstart)">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "Slå autogem-funktionen fra">
<!ENTITY gmail-buton-csign-checkbox "Underskriv klartekst">
<!ENTITY gmail-buton-csignsend-checkbox "Underskriv klartekst og send">
View
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "Zeige keine Buttons sondern eine Drop Down Liste">
<!ENTITY firegpg-ask-for-private-label.text "Immer nach privatem Schlüssel fragen">
<!ENTITY inline-activated "Aktiviere Handler für PGP-Blöcke in Seiten (Neustart benötigt)">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "Automatisches Speichern abschalten">
<!ENTITY gmail-buton-csign-checkbox "Unterschrift in Klartext">
<!ENTITY gmail-buton-csignsend-checkbox "Unterschrift in Klartext und Versenden">
View
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "Εμφάνιση λίστας αντί κουμπιών">
<!ENTITY firegpg-ask-for-private-label.text "Να ζητείται πάντοτε το κρυφό κλειδί">
<!ENTITY inline-activated "Ενεργοποίηση του χειριστή PGP blocks σε σελίδες (απαιτείται επανεκκίνηση) ">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "Απενεργοποίηση αυτόματης αποθήκευσης">
<!ENTITY gmail-buton-csign-checkbox "Απλή υπογραφή">
<!ENTITY gmail-buton-csignsend-checkbox "Απλή υπογραφή και αποστολή">
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "Display a list instead of buttons">
<!ENTITY firegpg-ask-for-private-label.text "Always ask for private key">
<!ENTITY inline-activated "Check for PGP blocks in pages (restart needed)">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "Disable autosave feature">
<!ENTITY gmail-buton-csign-checkbox "Clearsign">
<!ENTITY gmail-buton-csignsend-checkbox "Clearsign and send">
View
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "Display a list instead of buttons">
<!ENTITY firegpg-ask-for-private-label.text "Always ask for private key">
<!ENTITY inline-activated "Check for PGP blocks in pages (restart needed)">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "Disable autosave feature">
<!ENTITY gmail-buton-csign-checkbox "Clearsign">
<!ENTITY gmail-buton-csignsend-checkbox "Clearsign and send">
View
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "Mostrar una lista desplegable en vez de botones.">
<!ENTITY firegpg-ask-for-private-label.text "Preguntar siempre la clave privada">
<!ENTITY inline-activated "Detectar bloques PGP en páginas web (necesita reiniciar)">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "Desactivar autoguardado">
<!ENTITY gmail-buton-csign-checkbox "Firmar en claro">
<!ENTITY gmail-buton-csignsend-checkbox "Firmar en claro y enviar">
View
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "Botoiak erakutsi beharrean zerrenda bat erakutsi">
<!ENTITY firegpg-ask-for-private-label.text "Gako pribatua beti eskatu">
<!ENTITY inline-activated "PGP blokeak orrietan bilatu (berbiarazi behar da)">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "Auto-gorde opzioa desaktibatu">
<!ENTITY gmail-buton-csign-checkbox "Argian sinatu">
<!ENTITY gmail-buton-csignsend-checkbox "Argian sinatu eta bidali">
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "Näytä lista nappien tilalla">
<!ENTITY firegpg-ask-for-private-label.text "Kysy aina salaista avainta">
<!ENTITY inline-activated "Tarkista PGP kappaleet sivuilla (Uudelleenkäynnistys)">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "Poista autosave toiminto">
<!ENTITY gmail-buton-csign-checkbox "Clearsign">
<!ENTITY gmail-buton-csignsend-checkbox "Clearsign ja lähetä">
View
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "Afficher une liste plutôt que des boutons. ">
<!ENTITY firegpg-ask-for-private-label.text "Toujours demander la clé privée">
<!ENTITY inline-activated "Activer le système de détection dans le contenu des pages (redémarrage nécessaire)">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "Désactiver la sauvegarde automatique">
<!ENTITY gmail-buton-csign-checkbox "Signer en clair">
<!ENTITY gmail-buton-csignsend-checkbox "Signer en clair et envoyer">
View
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "Mostrar unha lista en lugar de botóns">
<!ENTITY firegpg-ask-for-private-label.text "Preguntar sempre pola chave privada">
<!ENTITY inline-activated "Buscar bloques PGP na páxinas (necesario reiniciar)">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "Desactivar autogardar">
<!ENTITY gmail-buton-csign-checkbox "Asinar">
<!ENTITY gmail-buton-csignsend-checkbox "Asinar e enviar">
View
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "אל תראה לחצנים אלא רשימה נגללת">
<!ENTITY firegpg-ask-for-private-label.text "תמיד בקש מפתח פרטי">
<!ENTITY inline-activated "Check for PGP blocks in pages (restart needed)">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "בטל שמירה אוטומטית">
<!ENTITY gmail-buton-csign-checkbox "נקה חתימה">
<!ENTITY gmail-buton-csignsend-checkbox "נקה חתימה ושלח">
View
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "Ne mutassa a gombokat, csak egy lenyíló listát.">
<!ENTITY firegpg-ask-for-private-label.text "Mindig kérje a személyes kulcsot">
<!ENTITY inline-activated "Az oldalak PGP tartalom kezelőjének aktiválása (újraindítás szükséges)">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "Az automata mentés kikapcsolása">
<!ENTITY gmail-buton-csign-checkbox "Clearsign">
<!ENTITY gmail-buton-csignsend-checkbox "Clearsign and send">
View
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "Tampilkan daftar dan bukan tombol">
<!ENTITY firegpg-ask-for-private-label.text "Selalu minta untuk kunci privat">
<!ENTITY inline-activated "Periksa untuk blok PGP pada halaman (diperlukan restart)">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "Nonaktifkan fitur penyimpanan otomatis">
<!ENTITY gmail-buton-csign-checkbox "Hapus tanda tangan">
<!ENTITY gmail-buton-csignsend-checkbox "Hapus tanda tangan dan kirim">
View
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "Usa menu a tendina al posto dei pulsanti">
<!ENTITY firegpg-ask-for-private-label.text "Chiedi sempre la chiave privata">
<!ENTITY inline-activated "Attiva il gestore per i blocchi PGP (richiede il riavvio)">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "Disabilita il salvataggio automatico">
<!ENTITY gmail-buton-csign-checkbox "Firma (Clearsign)">
<!ENTITY gmail-buton-csignsend-checkbox "Firma (Clearsign) ed invia">
View
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "ボタンの代わりにリストを表示する">
<!ENTITY firegpg-ask-for-private-label.text "常に秘密鍵を尋ねる">
<!ENTITY inline-activated "ページ中のPGPブロックを確認する (再起動が必要)">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "自動保存の機能を無効にする">
<!ENTITY gmail-buton-csign-checkbox "クリア署名">
<!ENTITY gmail-buton-csignsend-checkbox "クリア署名して送信">
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "버튼 대신 드롭다운 리스트 보이기">
<!ENTITY firegpg-ask-for-private-label.text "항상 개인키를 물어봄">
<!ENTITY inline-activated "문서 내의 PGP 블럭에 대한 핸들러 활성화 (재시작 필요)">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "자동 저장 비활성화">
<!ENTITY gmail-buton-csign-checkbox "가독형 서명">
<!ENTITY gmail-buton-csignsend-checkbox "가독형 서명하고 보내기">
View
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "Attēlot sarakstu nevis pogas">
<!ENTITY firegpg-ask-for-private-label.text "Vienmēr jautāt pēc privātās atslēgas">
<!ENTITY inline-activated "Pārbaudīt vai lapā nav PGP bloku (nepieciešama pārstartēšana)">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "Izslēgt automātisko saglabāšanas iespēju">
<!ENTITY gmail-buton-csign-checkbox "Notīrīt parakstu">
<!ENTITY gmail-buton-csignsend-checkbox "Notīrīt parakstu un sūtīt">
View
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "Toon geen knoppen maar een lijst.">
<!ENTITY firegpg-ask-for-private-label.text "Altijd vragen om private sleutel">
<!ENTITY inline-activated "Activeer de functie voor PGP blokken in paginas (opnieuw opstarten zal nodig zijn)">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "Automatisch opslaan afzetten">
<!ENTITY gmail-buton-csign-checkbox "Leesbaar ondertekenen">
<!ENTITY gmail-buton-csignsend-checkbox "Leesbaar ondertekenen en versturen">
View
@@ -44,6 +44,7 @@
<!ENTITY gmail-buton-use-select-checkbox "Vis liste istedet for knapper">
<!ENTITY firegpg-ask-for-private-label.text "Alltid spør etter privat nøkkel">
<!ENTITY inline-activated "Sjekk for PGP blokker i nettsider (omstart påkrevd)">
+<!ENTITY inline-auto-activated "Automatically import/verify/decrypt (restart required) (do you understand the security implications?)">
<!ENTITY gmail-disable-autosave-checkbox "Slå av autolagring">
<!ENTITY gmail-buton-csign-checkbox "Klartekst-signering">
<!ENTITY gmail-buton-csignsend-checkbox "Klartekst-signering og send">
Oops, something went wrong.

0 comments on commit e682a50

Please sign in to comment.