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
10 require("source-code.js");
12 var user_variables = {};
14 function define_variable (name, default_value, doc) {
15 conkeror[name] = default_value;
16 user_variables[name] = {
17 default_value: default_value,
19 shortdoc: get_shortdoc_string(doc),
20 source_code_reference: get_caller_source_code_reference()
24 function define_special_variable (name, getter, setter, doc) {
25 conkeror.__defineGetter__(name, getter);
26 conkeror.__defineSetter__(name, setter);
27 user_variables[name] = {
28 default_value: undefined,
30 shortdoc: get_shortdoc_string(doc),
31 source_code_reference: get_caller_source_code_reference()
35 provide("user-variable");