summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorMichael Foster <savetheinternet@tinyboard.org>2013-09-18 14:40:39 +1000
committerMichael Foster <savetheinternet@tinyboard.org>2013-09-18 14:40:39 +1000
commitd13f30b39f93f694241239c86c08c306c7b94fd4 (patch)
tree16caddbc80f4b0ccee56ef29ba253c3c1ff104e8 /templates
parentcff15bd765d1bd65f17a4407970244cc9d258521 (diff)
js/settings.js: Simple config stuff for javascript extensions
Diffstat (limited to 'templates')
-rw-r--r--templates/main.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/templates/main.js b/templates/main.js
index 235b52db..5a4c68fc 100644
--- a/templates/main.js
+++ b/templates/main.js
@@ -249,6 +249,17 @@ function rememberStuff() {
}
}
+var script_settings = function(script_name) {
+ this.script_name = script_name;
+ this.get = function(var_name, default_val) {
+ if (typeof tb_settings == 'undefined' ||
+ typeof tb_settings[this.script_name] == 'undefined' ||
+ typeof tb_settings[this.script_name][var_name] == 'undefined')
+ return default_val;
+ return tb_settings[this.script_name][var_name];
+ }
+};
+
function init() {
init_stylechooser();