2 * (C) Copyright 2004-2007 Shawn Betts
3 * (C) Copyright 2007-2009 John J. Foerch
4 * (C) Copyright 2007-2008 Jeremy Maitin-Shepard
6 * Use, modification, and distribution are subject to the terms specified in the
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,
21 shortdoc: get_shortdoc_string(doc),
22 source_code_reference: get_caller_source_code_reference()
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,
32 shortdoc: get_shortdoc_string(doc),
33 source_code_reference: get_caller_source_code_reference()
37 provide("user-variable");