This file contains 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
<?php | |
// ISO country code source: https://en.wikipedia.org/wiki/ISO_3166-1 | |
// Emoji unicode codes: http://unicode.org/emoji/charts/full-emoji-list.html#country-flag | |
// An array to hold all the countries | |
$emoji_flags = array(); | |
// Now, all the country flags as emojis | |
$emoji_flags["AD"] = "\u{1F1E6}\u{1F1E9}"; | |
$emoji_flags["AE"] = "\u{1F1E6}\u{1F1EA}"; |
This file contains 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
// first open the articles cache | |
// this cache is specified in the service worker where the | |
// offline handling code is kept | |
caches.open('articles') | |
.then(articlesCache => { | |
articlesCache.keys() | |
.then(keys => { | |
// loop over each article from the cache | |
keys.forEach(request => { | |
let markup = ''; |