javascript prefs