@@ -5,7 +5,7 @@ var debug = true
5
5
const tmDropdownString = '<option> ↓ Mink has TimeMaps for... ↓</option>'
6
6
const tmDropdownNoTimemapsString = '<option>--- No TimeMaps available ---</option>'
7
7
8
- import { MinkDefaults } from './MinkDefaults.js'
8
+ import { defaultAggregators } from './MinkDefaults.js'
9
9
10
10
function restoreOptions ( ) {
11
11
chrome . storage . local . get ( 'ignorelist' ) . then ( function ( items ) {
@@ -292,7 +292,7 @@ function clearAggregatorListInLocalStorage () {
292
292
}
293
293
294
294
function resetDefaultAggregators ( ) {
295
- chrome . storage . local . set ( { 'aggregators' : MinkDefaults . defaultAggregators } )
295
+ chrome . storage . local . set ( { 'aggregators' : defaultAggregators } )
296
296
}
297
297
298
298
function updateAggregatorsUIBasedOnLocalStorage ( ) {
@@ -349,15 +349,18 @@ function populateDropdownWithAggregatorsInStorage (arrayOfAggregators) {
349
349
function setAggregatorsInStorage ( arrayOfAggregatorHostnames , cb ) {
350
350
// Returns a promise
351
351
return chrome . storage . local . set ( { 'aggregators' : arrayOfAggregatorHostnames } ) . then ( ( ) => {
352
- console . log ( 'Attempting to invoke the callback' )
352
+ console . log ( 'Attempting to invoke the callback, this is failing w/ reload ' )
353
353
console . log ( cb )
354
354
cb ( )
355
+ } , function writeFailed ( ) {
356
+ console . log ( "Failed to write to localstorage" )
357
+ console . log ( arrayOfAggregatorHostnames )
355
358
} )
356
359
}
357
360
358
361
function test_writeToLocalStorageAndReload ( ) {
359
362
let testAggregators = [ 'https://memento.example.com' , 'https://aggregator.somehostname.net' ]
360
- setAggregatorsInStorage ( testAggregators , window . location . reload )
363
+ setAggregatorsInStorage ( defaultAggregators ) // , window.location.reload)
361
364
}
362
365
363
366
0 commit comments