new module to enable editing and deleting of bookmarks
[conkeror/arlinius.git] / modules / user-agent.js
blobc542cbd7d707bb83420fb77e7aa5b6ac47e1042d
1 /**
2 * (C) Copyright 2007-2011 John J. Foerch
3 * (C) Copyright 2007-2008 Jeremy Maitin-Shepard
5 * Use, modification, and distribution are subject to the terms specified in the
6 * COPYING file.
7 **/
9 default_pref("general.useragent.extra.conkeror", "Conkeror/"+version);
11 /**
12 * set_user_agent overrides the user agent string globally with whatever
13 * string is passed to it. If called with null or no argument, any
14 * current override is undone, reverting to Conkeror's default user agent
15 * string. The override is performed (rather non-conventionally) with a
16 * default pref instead of a user pref, which allows the override to be
17 * done cleanly from the rc, without interference by persisting prefs in
18 * the profile.
20 function set_user_agent (str) {
21 const p = "general.useragent.override";
22 if (str == null) {
23 clear_default_pref(p);
24 user_pref(p, "");
25 clear_pref(p);
26 } else
27 session_pref(p, str);