blob: 6cee5365428d492f574a15b248a97a18d5477440 [file] [log] [blame]
function matchQuery(query) {
return self.location.href.indexOf(query) != -1;
}
if (matchQuery('?evaluation'))
self.registration.unregister();
self.addEventListener('install', function(e) {
if (matchQuery('?install'))
self.registration.unregister();
});
self.addEventListener('activate', function(e) {
if (matchQuery('?activate'))
self.registration.unregister();
});
self.addEventListener('message', function(e) {
self.registration.unregister()
.then(function(result) {
e.data.port.postMessage({result: result});
});
});