Browse Source

allow some local settings to be modified by users

pull/2/head
gorhill 10 years ago
parent
commit
20bd54c56b
  1. 15
      src/js/start.js

15
src/js/start.js

@ -78,7 +78,13 @@ var defaultLocalUserSettings = {
'<a href="{{url}}" title="{{url}}" target="_blank">&#x2191;</a>{{url}}',
'</body></html>'
].join(''),
placeholderImage: 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'
placeholderImage: 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='
};
var rwLocalUserSettings = {
placeholderBackground: true,
placeholderBorder: true,
placeholderImage: true
};
/******************************************************************************/
@ -104,9 +110,12 @@ var onAllDone = function() {
if ( defaultLocalUserSettings.hasOwnProperty(key) === false ) {
continue;
}
//if ( vAPI.localStorage.getItem(key) === null ) {
if (
vAPI.localStorage.getItem(key) === null ||
rwLocalUserSettings.hasOwnProperty(key) === false
) {
vAPI.localStorage.setItem(key, defaultLocalUserSettings[key]);
//}
}
}
};

Loading…
Cancel
Save