mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-24 03:57:08 -04:00
Update options.
This commit is contained in:
parent
2d54c23a2c
commit
0022264a8e
3 changed files with 48 additions and 37 deletions
|
@ -2,6 +2,7 @@ modulejs.define('ext/info', ['_', '$', 'modernizr', 'core/settings', 'core/resou
|
|||
|
||||
var settings = _.extend({
|
||||
enabled: false,
|
||||
show: false,
|
||||
qrcode: true,
|
||||
qrColor: "#999"
|
||||
}, allsettings.info);
|
||||
|
@ -141,8 +142,10 @@ modulejs.define('ext/info', ['_', '$', 'modernizr', 'core/settings', 'core/resou
|
|||
ev.preventDefault();
|
||||
});
|
||||
|
||||
// ensure stored value is boolean, default to true
|
||||
store.put(storekey, store.get(storekey) !== false);
|
||||
// ensure stored value is boolean, otherwise set default
|
||||
if (typeof(store.get(storekey)) !== 'boolean') {
|
||||
store.put(storekey, settings.show);
|
||||
}
|
||||
updateSettings();
|
||||
|
||||
event.sub('location.changed', onLocationChanged);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue