This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//browser push notification "onClick" event heandler | |
self.addEventListener('notificationclick', function(event) { | |
console.log('[Service Worker] Notification click Received.'); | |
event.notification.close(); | |
/** | |
* if exists open browser tab with matching url just set focus to it, | |
* otherwise open new tab/window with sw root scope url | |
*/ | |
event.waitUntil(clients.matchAll({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Lists of countries with ISO 3166 codes, presented in various formats. | |
// Last Updated: July 30, 2020 | |
// If you're using PHP, I suggest checking out: | |
// https://github.com/thephpleague/iso3166 | |
// or Laravel: https://github.com/squirephp/squire | |
// | |
// JS developers can check out: | |
// https://www.npmjs.com/package/iso3166-2-db | |
// |