aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
Diffstat (limited to 'view/js')
-rw-r--r--view/js/crypto.js7
-rw-r--r--view/js/mod_settings.js24
2 files changed, 17 insertions, 14 deletions
diff --git a/view/js/crypto.js b/view/js/crypto.js
index 2e6402c62..c3a37d177 100644
--- a/view/js/crypto.js
+++ b/view/js/crypto.js
@@ -1,5 +1,4 @@
-
function str_rot13 (str) {
// http://kevin.vanzonneveld.net
// + original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
@@ -43,7 +42,11 @@ function red_encrypt(alg, elem,text) {
// key and hint need to be localised
- var enc_key = bin2hex(prompt(aStr['passphrase']));
+ var passphrase = prompt(aStr['passphrase']);
+ // let the user cancel this dialogue
+ if (passphrase == null)
+ return false;
+ var enc_key = bin2hex(passphrase);
// If you don't provide a key you get rot13, which doesn't need a key
// but consequently isn't secure.
diff --git a/view/js/mod_settings.js b/view/js/mod_settings.js
index 16101db57..8cd062f43 100644
--- a/view/js/mod_settings.js
+++ b/view/js/mod_settings.js
@@ -72,12 +72,12 @@ function channel_privacy_macro(n) {
$('#id_profile_in_directory').val(0);
}
if(n == 2) {
- $('#id_view_stream option').eq(5).attr('selected','selected');
- $('#id_view_profile option').eq(5).attr('selected','selected');
- $('#id_view_photos option').eq(5).attr('selected','selected');
- $('#id_view_contacts option').eq(5).attr('selected','selected');
- $('#id_view_storage option').eq(5).attr('selected','selected');
- $('#id_view_pages option').eq(5).attr('selected','selected');
+ $('#id_view_stream option').eq(6).attr('selected','selected');
+ $('#id_view_profile option').eq(6).attr('selected','selected');
+ $('#id_view_photos option').eq(6).attr('selected','selected');
+ $('#id_view_contacts option').eq(6).attr('selected','selected');
+ $('#id_view_storage option').eq(6).attr('selected','selected');
+ $('#id_view_pages option').eq(6).attr('selected','selected');
$('#id_send_stream option').eq(2).attr('selected','selected');
$('#id_post_wall option').eq(1).attr('selected','selected');
$('#id_post_comments option').eq(2).attr('selected','selected');
@@ -95,12 +95,12 @@ function channel_privacy_macro(n) {
$('#id_profile_in_directory').val(1);
}
if(n == 3) {
- $('#id_view_stream option').eq(5).attr('selected','selected');
- $('#id_view_profile option').eq(5).attr('selected','selected');
- $('#id_view_photos option').eq(5).attr('selected','selected');
- $('#id_view_contacts option').eq(5).attr('selected','selected');
- $('#id_view_storage option').eq(5).attr('selected','selected');
- $('#id_view_pages option').eq(5).attr('selected','selected');
+ $('#id_view_stream option').eq(6).attr('selected','selected');
+ $('#id_view_profile option').eq(6).attr('selected','selected');
+ $('#id_view_photos option').eq(6).attr('selected','selected');
+ $('#id_view_contacts option').eq(6).attr('selected','selected');
+ $('#id_view_storage option').eq(6).attr('selected','selected');
+ $('#id_view_pages option').eq(6).attr('selected','selected');
$('#id_send_stream option').eq(4).attr('selected','selected');
$('#id_post_wall option').eq(4).attr('selected','selected');
$('#id_post_comments option').eq(4).attr('selected','selected');