Debian package: Support xulrunner 9+10 in debian/conkeror.bin, drop support for unver...
[conkeror.git] / modules / user-variable.js
blob97ca174b39d2af1d2ad3be22c3a3bb94d858e715
1 /**
2  * (C) Copyright 2004-2007 Shawn Betts
3  * (C) Copyright 2007-2009 John J. Foerch
4  * (C) Copyright 2007-2008 Jeremy Maitin-Shepard
5  *
6  * Use, modification, and distribution are subject to the terms specified in the
7  * COPYING file.
8 **/
10 in_module(null);
12 require("source-code.js");
14 var user_variables = {};
16 function define_variable (name, default_value, doc) {
17     conkeror[name] = default_value;
18     user_variables[name] = {
19         default_value: default_value,
20         doc: doc,
21         shortdoc: get_shortdoc_string(doc),
22         source_code_reference: get_caller_source_code_reference()
23     };
26 function define_special_variable (name, getter, setter, doc) {
27     conkeror.__defineGetter__(name, getter);
28     conkeror.__defineSetter__(name, setter);
29     user_variables[name] = {
30         default_value: undefined,
31         doc: doc,
32         shortdoc: get_shortdoc_string(doc),
33         source_code_reference: get_caller_source_code_reference()
34     };
37 provide("user-variable");