forked from leftypol/leftypol
js/settings.js: Simple config stuff for javascript extensions
This commit is contained in:
parent
cff15bd765
commit
d13f30b39f
4 changed files with 362 additions and 338 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue