mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-06-02 18:34:52 +12:00
allow some local settings to be modified by users
This commit is contained in:
parent
a58dba5c27
commit
20bd54c56b
|
@ -78,7 +78,13 @@ var defaultLocalUserSettings = {
|
|||
'<a href="{{url}}" title="{{url}}" target="_blank">↑</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…
Reference in a new issue