|
|
@ -15,18 +15,19 @@
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
;(function() {
|
|
|
|
;(function() {
|
|
|
|
'use strict';
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
extension.windows.getBackground(function(bg) {
|
|
|
|
$('.notifications .on button').click(function() {
|
|
|
|
$('.notifications .on button').click(function() {
|
|
|
|
Whisper.Notifications.disable();
|
|
|
|
bg.Whisper.Notifications.disable();
|
|
|
|
initOptions();
|
|
|
|
initOptions();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$('.notifications .off button').click(function() {
|
|
|
|
$('.notifications .off button').click(function() {
|
|
|
|
Whisper.Notifications.enable(initOptions);
|
|
|
|
bg.Whisper.Notifications.enable(initOptions);
|
|
|
|
initOptions();
|
|
|
|
initOptions();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
function initOptions() {
|
|
|
|
function initOptions() {
|
|
|
|
if (Whisper.Notifications.isEnabled()) {
|
|
|
|
if (bg.Whisper.Notifications.isEnabled()) {
|
|
|
|
$('.notifications .on').show();
|
|
|
|
$('.notifications .on').show();
|
|
|
|
$('.notifications .off').hide();
|
|
|
|
$('.notifications .off').hide();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -69,7 +70,6 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$(function() {
|
|
|
|
$(function() {
|
|
|
|
extension.windows.getBackground(function(bg) {
|
|
|
|
|
|
|
|
if (bg.textsecure.registration.isDone()) {
|
|
|
|
if (bg.textsecure.registration.isDone()) {
|
|
|
|
$('#complete-number').text(bg.textsecure.storage.user.getNumber());
|
|
|
|
$('#complete-number').text(bg.textsecure.storage.user.getNumber());
|
|
|
|
$('#setup-complete').show().addClass('in');
|
|
|
|
$('#setup-complete').show().addClass('in');
|
|
|
|