summaryrefslogtreecommitdiff
path: root/templates/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'templates/main.js')
-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();