comments and minor whitespace fixes

merge-requests/9/merge
Michał 'rysiek' Woźniak 2021-11-16 15:17:31 +00:00
rodzic a90a9793a8
commit a8707f758b
2 zmienionych plików z 13 dodań i 4 usunięć

Wyświetl plik

@ -29,10 +29,11 @@ self.LibResilientConfig.plugins = [{
'https://gateway.pinata.cloud/ipns/<CIDv0-or-CIDv1>/', // Germany
'https://<CIDv1>.ipns.bluelight.link/' // Singapore
]},{
name: 'gun-ipfs',
gunPubkey: '<your-gun-pubkey>'
}]
]
},{
name: 'gun-ipfs',
gunPubkey: '<your-gun-pubkey>'
}]
}]
// we need to explicitly list components we want to see debug messages from

Wyświetl plik

@ -498,7 +498,15 @@ if ('serviceWorker' in navigator) {
var scriptFolder = scriptPath.substr(0, scriptPath.lastIndexOf( '/' )+1 )
var serviceWorkerPath = scriptFolder + 'service-worker.js'
self.log('browser-side', 'Service Worker script at: ' + serviceWorkerPath)
// TODO: is there a way to provide config params for the Service Worker here?
// TODO: it would be good if the config.js script could reside outside of the libresilient directory
// TODO: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register
navigator.serviceWorker.register(serviceWorkerPath, {
// TODO: what is the scope relative to? is it the HTML file that included it, or this script?
// TODO: "It is relative to the base URL of the application." ¯\_(ツ)_/¯
// TODO: "There is frequent confusion surrounding the meaning and use of scope.
// TODO: Since a service worker can't have a scope broader than its own location,
// TODO: only use the scope option when you need a scope that is narrower than the default."
scope: './'
}).then(function(reg) {
// Success.