Mercurial > tinyurl_creator
view chrome/content/options.js @ 3:520da387d211 default tip
raise maxVersion to 3.5.*
| author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
|---|---|
| date | Wed, 26 Aug 2009 22:10:43 +0900 |
| parents | c14d52a3b2fe |
| children |
line wrap: on
line source
function tinyurl_options_init(){ try{ var oPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch(""); // Prefill if(oPrefs.prefHasUserValue("tinyurl.confirmation.hide")) document.getElementById("confirm-hide").checked = oPrefs.getBoolPref("tinyurl.confirmation.hide"); }catch(e){ alert("Could not load preferences.\n"+ e); } } function tinyurl_options_save(){ try{ var oPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch(""); // Save oPrefs.setBoolPref("tinyurl.confirmation.hide", document.getElementById("confirm-hide").checked); }catch(e){ alert("Could not save preferences.\n"+ e); return false; } return true; }
