From b4ede1d54f8ebd7170b120052fffe10ee5f346a1 Mon Sep 17 00:00:00 2001 From: erqan Date: Wed, 26 Mar 2014 20:49:49 +0200 Subject: [PATCH] Added show preview option --- js/options.js | 13 +++++++++++++ options.html | 15 +++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/js/options.js b/js/options.js index 90ffdd2..a34394a 100644 --- a/js/options.js +++ b/js/options.js @@ -131,6 +131,18 @@ var TwisterOptions = function() $.Options.setOption(this.id, this.value); }) } + + this.getShowPreviewOpt = function() { + return $.Options.getOption('displayPreview',"disable"); + } + + this.setShowPreviewOpt = function () { + $('#showPreviewOpt select')[0].value = this.getShowPreviewOpt(); + + $('#showPreviewOpt select').on('change', function(){ + $.Options.setOption(this.id, this.value); + }) + } this.InitOptions = function() { this.soundNotifOptions(); @@ -139,6 +151,7 @@ var TwisterOptions = function() this.setLang(); this.setTheme(); this.setLineFeedsOpt(); + this.setShowPreviewOpt(); } } diff --git a/options.html b/options.html index 628e64e..9698564 100644 --- a/options.html +++ b/options.html @@ -149,6 +149,21 @@ +
+
+

Posts display

+
+
+

Inline image preview

+ +
+
+
+
+