Commit 901c4804 authored by Jérome Perrin's avatar Jérome Perrin Committed by Thomas Gambier

generate a service worker and add webapp manifest

npm install workbox-cli
./node_modules/.bin/workbox injectManifest workbox-config.js

service worker: ignore query string for fonts
parent fc8314b9
......@@ -8,6 +8,7 @@
<noscript><p><img src="//stats.opkode.com/piwik.php?idsite=5" style="border:0;" alt="" /></p></noscript>
<link type="text/css" rel="stylesheet" media="screen" href="css/converse.css" />
<link type="text/css" rel="stylesheet" media="screen" href="css/fullpage.css" />
<link rel="manifest" href="manifest.json">
<script src="dist/converse.js"></script>
</head>
<body class="converse-fullscreen">
......@@ -41,6 +42,10 @@
For more information, please refer to <http://unlicense.org/>
@licend
*/
window.addEventListener('load', () => {
navigator.serviceWorker.register('sw.js');
});
converse.initialize({
authentication: 'login',
auto_away: 300,
......
{
"display": "standalone",
"icons": [
{
"sizes": "144x144",
"src": "css/images/logo.png",
"type": "image/png"
}
],
"name": "Converse.js",
"short_name": "Converse",
"start_url": "fullscreen.html"
}
importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.6.1/workbox-sw.js');
workbox.core.setCacheNameDetails({
prefix: 'converse.nexedi',
});
// Note: this is populated at build time.
workbox.precaching.precacheAndRoute([
{
"url": "dev.html",
"revision": "f1489c4dc857c611b5642e6ff2338dcd"
},
{
"url": "fullscreen.html",
"revision": "924f819906237479ca62c81a4597d81a"
},
{
"url": "index.html",
"revision": "a671ee887f9e3d8a4888c6df9e99c528"
},
{
"url": "jslicenses.html",
"revision": "03f61b3dd9898d35eb337e2a5a960083"
},
{
"url": "mobile.html",
"revision": "d083901d4df24e8359101791c330fc07"
},
{
"url": "redirect.html",
"revision": "6ca8042c675780a1be7684a7e508c2d1"
},
{
"url": "manifest.json",
"revision": "bf20e42a1a024aadd2bda85da6984f1b"
},
{
"url": "dist/converse-headless.js",
"revision": "75d575861a7d8284d4cd82b1259f5bd2"
},
{
"url": "dist/converse-headless.js.map",
"revision": "b61deede1f245b6f9bb482ce15188f19"
},
{
"url": "dist/converse-headless.min.js",
"revision": "4070918bd748e8dcce9270d202a27f45"
},
{
"url": "dist/converse-headless.min.js.map",
"revision": "b8376f370d6ab63b973f3a2e2f254239"
},
{
"url": "dist/converse-no-dependencies.js",
"revision": "6aeb93daed3347a6d5d52fa4e4c103c4"
},
{
"url": "dist/converse-no-dependencies.js.map",
"revision": "471d00575bfad5dd27be6bd740cd8dd6"
},
{
"url": "dist/converse-no-dependencies.min.js",
"revision": "9658a63360e9f50973be4c0411db3379"
},
{
"url": "dist/converse-no-dependencies.min.js.map",
"revision": "07540287a52a8974bf0a0a9d5b934ab0"
},
{
"url": "dist/converse.js",
"revision": "b82e2df77618c633d30fee5072741c33"
},
{
"url": "dist/converse.js.map",
"revision": "b5f967db0e68c11b4e0cf0d3eabb1a98"
},
{
"url": "dist/converse.min.js",
"revision": "b723f4d6715e6386bce2364cb5b643a7"
},
{
"url": "dist/converse.min.js.map",
"revision": "ee1695f07ea6e212fc15d19791d0c32d"
},
{
"url": "css/converse.css",
"revision": "91303f47212a9f29617706a2f0984afc"
},
{
"url": "css/converse.css.map",
"revision": "53cbbdd814c751319d655f48bfc8abee"
},
{
"url": "css/converse.min.css",
"revision": "c07f1f3eab0777981b34c344d1837dab"
},
{
"url": "css/font-awesome.css",
"revision": "31139a1f7b64a6769bd1c1e727421246"
},
{
"url": "css/font-awesome.min.css",
"revision": "269550530cc127b6aa5a35925a7de6ce"
},
{
"url": "css/fonts.css",
"revision": "d547f07a27c8df35f2b1895db4cfd30d"
},
{
"url": "css/fonts.css.map",
"revision": "3c051e664ea28267056246e787ee70c8"
},
{
"url": "css/fullpage.css",
"revision": "e6cde29acf657a5ffda3101fe26f8783"
},
{
"url": "css/images/arrow.svg",
"revision": "f669d4226e7163f4ead6bef4d1799bfc"
},
{
"url": "css/images/bgbl.svg",
"revision": "2747b04f96c14f65fb1fd73875e34400"
},
{
"url": "css/images/bgtr.svg",
"revision": "39923e8d88133faae00bc7afcbdb4e9a"
},
{
"url": "css/images/bitcoin_qr_code.png",
"revision": "95c6c33665f0a3bcf7b03bf781cad2c3"
},
{
"url": "css/images/dark-arrow.svg",
"revision": "1cdb6c1ef71eba811c8e0254459cf570"
},
{
"url": "css/images/favicon.ico",
"revision": "0370d9605b249c8dd4157c6bdeed7775"
},
{
"url": "css/images/header.jpg",
"revision": "c9b3b4ac0ceaf6045432e95033536a1e"
},
{
"url": "css/images/logo.png",
"revision": "be4ef59608e420900f4398f98947b12f"
},
{
"url": "css/images/overlay.png",
"revision": "b7f8c68723fb643f86d3a49a8205bd25"
},
{
"url": "css/images/user.svg",
"revision": "9abd1944d802b371e1d53acebe6286bc"
},
{
"url": "css/jasmine.css",
"revision": "3b2c2c9ecf959d8dbcea550236dc2fc1"
},
{
"url": "css/webfonts.zip",
"revision": "15a959b161e02125a9f7d8d9a9d5f773"
},
{
"url": "css/webfonts/fa-brands-400.eot",
"revision": "9b6c8da3c489424e2b3e9c9fb6314b37"
},
{
"url": "css/webfonts/fa-brands-400.svg",
"revision": "b5472631dbace30d549357ec325b9c62"
},
{
"url": "css/webfonts/fa-brands-400.ttf",
"revision": "947b9537bc0fecc8130d48eb753495a1"
},
{
"url": "css/webfonts/fa-brands-400.woff",
"revision": "7b464e274bc331f9a765d765359635a5"
},
{
"url": "css/webfonts/fa-brands-400.woff2",
"revision": "48461ea4e797c9774dabb4a0440d2f56"
},
{
"url": "css/webfonts/fa-regular-400.eot",
"revision": "7422060ca379ee9939d3b687d072acad"
},
{
"url": "css/webfonts/fa-regular-400.svg",
"revision": "b5a61b229c9c92a6ac21f5b0e3c6e9f1"
},
{
"url": "css/webfonts/fa-regular-400.ttf",
"revision": "73fe7f1effbf382f499831a0a9f18626"
},
{
"url": "css/webfonts/fa-regular-400.woff",
"revision": "381af09a1366b6c2ae65eac5dd6f0588"
},
{
"url": "css/webfonts/fa-regular-400.woff2",
"revision": "949a2b066ec37f5a384712fc7beaf2f1"
},
{
"url": "css/webfonts/fa-solid-900.eot",
"revision": "70e65a7d34902f2c350816ecfe2f6492"
},
{
"url": "css/webfonts/fa-solid-900.svg",
"revision": "38508b2e7fac045869a86a15936433f7"
},
{
"url": "css/webfonts/fa-solid-900.ttf",
"revision": "0079a0ab6bec4da7d6e16f2a2e87cd71"
},
{
"url": "css/webfonts/fa-solid-900.woff",
"revision": "815694de1120d6c1e9d1f0895ee81056"
},
{
"url": "css/webfonts/fa-solid-900.woff2",
"revision": "14a08198ec7d1eb96d515362293fed36"
},
{
"url": "css/webfonts/icomoon/fonticons/fonts/icomoon.eot",
"revision": "d13648635179bd821f4f42da2e4733ad"
},
{
"url": "css/webfonts/icomoon/fonticons/fonts/icomoon.svg",
"revision": "ec9e4fe46dde9b3e8eafed3ce9a6cd75"
},
{
"url": "css/webfonts/icomoon/fonticons/fonts/icomoon.ttf",
"revision": "0c99344c318c544c0e671ee56fc77017"
},
{
"url": "css/webfonts/icomoon/fonticons/fonts/icomoon.woff",
"revision": "e927179def1bab1c4f8ae5751b28421d"
},
{
"url": "css/webfonts/icomoon/fonticons/selection.json",
"revision": "2a26205a70607433b8f840068ca9026a"
},
{
"url": "css/webfonts/icomoon/fonticons/style.css",
"revision": "f6ee30792ee7266459c39163ae4f3d6b"
},
{
"url": "css/webfonts/icomoon/fonts/icomoon.eot",
"revision": "d13648635179bd821f4f42da2e4733ad"
},
{
"url": "css/webfonts/icomoon/fonts/icomoon.svg",
"revision": "ec9e4fe46dde9b3e8eafed3ce9a6cd75"
},
{
"url": "css/webfonts/icomoon/fonts/icomoon.ttf",
"revision": "0c99344c318c544c0e671ee56fc77017"
},
{
"url": "css/webfonts/icomoon/fonts/icomoon.woff",
"revision": "e927179def1bab1c4f8ae5751b28421d"
},
{
"url": "css/webfonts/icomoon/selection.json",
"revision": "2a26205a70607433b8f840068ca9026a"
},
{
"url": "css/webfonts/icomoon/style.css",
"revision": "f6ee30792ee7266459c39163ae4f3d6b"
},
{
"url": "css/website.css",
"revision": "e08680d1c95d199e18df11a1a7cc3329"
},
{
"url": "css/website.css.map",
"revision": "ee629d3e3c71d809da3362029e37b074"
},
{
"url": "css/website.min.css",
"revision": "1815ffcd7017a6e9ad7ead15e91191d8"
},
{
"url": "fonts/fontawesome-webfont.eot",
"revision": "674f50d287a8c48dc19ba404d20fe713"
},
{
"url": "fonts/fontawesome-webfont.svg",
"revision": "912ec66d7572ff821749319396470bde"
},
{
"url": "fonts/fontawesome-webfont.ttf",
"revision": "b06871f281fee6b241d60582ae9369b9"
},
{
"url": "fonts/fontawesome-webfont.woff",
"revision": "fee66e712a8a08eef5805a46892932ad"
},
{
"url": "fonts/fontawesome-webfont.woff2",
"revision": "af7ae505a9eed503f8b8e6982036873e"
},
{
"url": "fonts/FontAwesome.otf",
"revision": "0d2717cd5d853e5c765ca032dfd41a4d"
},
{
"url": "locale/af/LC_MESSAGES/converse.json",
"revision": "5ad386784da5bd14a9cf400d54e0b317"
},
{
"url": "locale/af/LC_MESSAGES/converse.po",
"revision": "565ec5265ada868bbc4a09fdcecfe03c"
},
{
"url": "locale/ar/LC_MESSAGES/converse.json",
"revision": "da598d7636e6da523d36028d39523dad"
},
{
"url": "locale/ar/LC_MESSAGES/converse.po",
"revision": "dae1ed71912e98df9b240a9bdb7a021a"
},
{
"url": "locale/bg/LC_MESSAGES/converse.json",
"revision": "abf4dff6049e7e6f5a422aa50d98526e"
},
{
"url": "locale/bg/LC_MESSAGES/converse.po",
"revision": "7385f4cfd5dc0a90e76fe22a0abd10b5"
},
{
"url": "locale/ca/LC_MESSAGES/converse.json",
"revision": "4d6e160ba0dae1aba087e443c9ad385e"
},
{
"url": "locale/ca/LC_MESSAGES/converse.po",
"revision": "f466867fcde774351b1c02f0ab4fe8b8"
},
{
"url": "locale/converse.pot",
"revision": "e4cf7bfb3d0b16bc98820312edbf9b5d"
},
{
"url": "locale/cs/LC_MESSAGES/converse.json",
"revision": "e3a85b40f2625b7c5e1cba9410eca0b0"
},
{
"url": "locale/cs/LC_MESSAGES/converse.po",
"revision": "db9c13d3d0aa084fdf6b9ce249008afb"
},
{
"url": "locale/de/LC_MESSAGES/converse.json",
"revision": "529814824cfb48f983773b8769661221"
},
{
"url": "locale/de/LC_MESSAGES/converse.po",
"revision": "c09a290bec5229f748f196b94d90e39b"
},
{
"url": "locale/es/LC_MESSAGES/converse.json",
"revision": "66ed9a1f318bfb3b0a0d232d3f1de0d8"
},
{
"url": "locale/es/LC_MESSAGES/converse.po",
"revision": "1c6557969b69511f08138c5acdec17cc"
},
{
"url": "locale/eu/LC_MESSAGES/converse.json",
"revision": "8ce09e309b542f5ee994eb26e9f0956a"
},
{
"url": "locale/eu/LC_MESSAGES/converse.po",
"revision": "0e22e0a63136c00fa467d291e29cf8b9"
},
{
"url": "locale/fr/LC_MESSAGES/converse.json",
"revision": "e28f5263140f4d9eea8446a46bf829ee"
},
{
"url": "locale/fr/LC_MESSAGES/converse.po",
"revision": "6a9f3535098478c12b01a4883f0ecc00"
},
{
"url": "locale/gl/LC_MESSAGES/converse.json",
"revision": "e102d391ecd5f9f5df4282d8459c39ab"
},
{
"url": "locale/gl/LC_MESSAGES/converse.po",
"revision": "674af8357a00d23e7804e3ddff7f7207"
},
{
"url": "locale/he/LC_MESSAGES/converse.json",
"revision": "5c3a931b2606388cafc6404f846c8881"
},
{
"url": "locale/he/LC_MESSAGES/converse.po",
"revision": "b0be0338687ec500c6ccc6c841275bf9"
},
{
"url": "locale/hi/LC_MESSAGES/converse.json",
"revision": "ff79708d67a4322d773c41bb3ff960e3"
},
{
"url": "locale/hi/LC_MESSAGES/converse.po",
"revision": "60a1abca8c6a695903a473edee926227"
},
{
"url": "locale/hu/LC_MESSAGES/converse.json",
"revision": "a5d5b10bdd24ec4304ffaebfedb23388"
},
{
"url": "locale/hu/LC_MESSAGES/converse.po",
"revision": "55ad98cd24c4d50ee1dfbbc5d50b0a57"
},
{
"url": "locale/id/LC_MESSAGES/converse.json",
"revision": "f56217dc608c42034a8abb91ae05ca6c"
},
{
"url": "locale/id/LC_MESSAGES/converse.po",
"revision": "85c2fef99c0517b6e9f412cc1dca403d"
},
{
"url": "locale/it/LC_MESSAGES/converse.json",
"revision": "d81175daf0ae989b16fcfffcdef7472d"
},
{
"url": "locale/it/LC_MESSAGES/converse.po",
"revision": "2a2c7c3803aa5be33ce969947331392b"
},
{
"url": "locale/ja/LC_MESSAGES/converse.json",
"revision": "2ffe7f23470eee94e20cceb708e65166"
},
{
"url": "locale/ja/LC_MESSAGES/converse.po",
"revision": "d3cc19a28bfb5f7dd82f2ba6e4585ee5"
},
{
"url": "locale/lt/LC_MESSAGES/converse.json",
"revision": "22a56eb22b75f14a6a31e61a8c1da993"
},
{
"url": "locale/lt/LC_MESSAGES/converse.po",
"revision": "8ed6f46fe940d0a56b458b47c70b3db3"
},
{
"url": "locale/nb/LC_MESSAGES/converse.json",
"revision": "036280ffd5f7485d6df20e3669f0269d"
},
{
"url": "locale/nb/LC_MESSAGES/converse.po",
"revision": "a9738e447f942c75c6a5da961839e445"
},
{
"url": "locale/nl_BE/LC_MESSAGES/converse.json",
"revision": "0ef82723b158fd77559bbda103e29e80"
},
{
"url": "locale/nl_BE/LC_MESSAGES/converse.po",
"revision": "c75b4f8522210edc323b9f9f9e234f7c"
},
{
"url": "locale/nl/LC_MESSAGES/converse.json",
"revision": "170a345be8bdd743181264f45b5e7352"
},
{
"url": "locale/nl/LC_MESSAGES/converse.po",
"revision": "8337bf66a595da64efe537fcd6fd7d7b"
},
{
"url": "locale/pl/LC_MESSAGES/converse.json",
"revision": "16e30163bbb5e09433f867c675eb58aa"
},
{
"url": "locale/pl/LC_MESSAGES/converse.po",
"revision": "084ac0988ee4b15e697d2020ad8a0d67"
},
{
"url": "locale/pt_BR/LC_MESSAGES/converse.json",
"revision": "4852f6799feca23da330bf250bcc5e65"
},
{
"url": "locale/pt_BR/LC_MESSAGES/converse.po",
"revision": "5ad00bda9f4f3fe165a09c2ce625a6b2"
},
{
"url": "locale/ro/LC_MESSAGES/converse.json",
"revision": "c27ef226aadd41e659dd02574f2e497e"
},
{
"url": "locale/ro/LC_MESSAGES/converse.po",
"revision": "a0b148a752d3c760413a1f04f53b61da"
},
{
"url": "locale/ru/LC_MESSAGES/converse.json",
"revision": "536b8cf31762f829278b52118d848f63"
},
{
"url": "locale/ru/LC_MESSAGES/converse.po",
"revision": "c34b7d72b7318263bb7fb23706429730"
},
{
"url": "locale/tr/LC_MESSAGES/converse.json",
"revision": "fb77e877c02ffabb467de3dcde7a90cd"
},
{
"url": "locale/tr/LC_MESSAGES/converse.po",
"revision": "b34a7280390a1628fa310dc59113fcbd"
},
{
"url": "locale/uk/LC_MESSAGES/converse.json",
"revision": "fe881c62a91bb39dacedeba4fad6f1b7"
},
{
"url": "locale/uk/LC_MESSAGES/converse.po",
"revision": "704fd3336b3ff23e1a430175ed80022b"
},
{
"url": "locale/zh_CN/LC_MESSAGES/converse.json",
"revision": "99e02895ce25e7865e13e251551afe56"
},
{
"url": "locale/zh_CN/LC_MESSAGES/converse.po",
"revision": "ffe2e526cf0a921259c5f0544adf5ae5"
},
{
"url": "locale/zh_TW/LC_MESSAGES/converse.json",
"revision": "e4a8a9e3df1a120f0619620d09da16e9"
},
{
"url": "locale/zh_TW/LC_MESSAGES/converse.po",
"revision": "dd71bd83d621e52be74293e773ddddf4"
},
{
"url": "sounds/msg_received.mp3",
"revision": "4f1b63f7d58442641b927c6f1dd062a7"
},
{
"url": "sounds/msg_received.ogg",
"revision": "55d7178f2021da1d643a33ef07c63498"
},
{
"url": "sounds/README",
"revision": "371b027334f1303b176aa297f9130ad6"
},
{
"url": "logo/conversejs-filled.svg",
"revision": "d65e66dda91ff82774cf952bb6742430"
},
{
"url": "logo/conversejs-transparent.svg",
"revision": "63388a79e1e1cc799c909403a635a9a8"
},
{
"url": "logo/diasporing.svg",
"revision": "5cb38db9d1a317865a6a3d0035e1acc9"
},
{
"url": "logo/hostpresto.png",
"revision": "fdab5808b28eeee880648d10f26d4f58"
},
{
"url": "logo/keycdn.png",
"revision": "d45fb496caec4ab86af90a1f2ae873ad"
},
{
"url": "logo/keycdn.svg",
"revision": "f211b5dd91d66f5b2cd524a566429e2f"
},
{
"url": "logo/mastodon.svg",
"revision": "6a47c9a117ae3c0b271e564bd7f6218f"
},
{
"url": "logo/wikisuite-white.png",
"revision": "06ca5c51972999eb658f4ac84bec8df2"
},
{
"url": "logo/wikisuite.png",
"revision": "e4209baa643ba3b4975940507ddfee61"
}
],
// we ignore wvi0ht for urls like :
// /fonticons/fonts/icomoon.ttf?wvi0ht
{ ignoreUrlParametersMatching: [/^wvi0ht/] }
)
workbox.strategies.cacheFirst()
workbox.strategies.networkFirst()
workbox.strategies.staleWhileRevalidate()
workbox.skipWaiting();
importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.6.1/workbox-sw.js');
workbox.core.setCacheNameDetails({
prefix: 'converse.nexedi',
});
// Note: this is populated at build time.
workbox.precaching.precacheAndRoute([],
// we ignore wvi0ht for urls like :
// /fonticons/fonts/icomoon.ttf?wvi0ht
{ ignoreUrlParametersMatching: [/^wvi0ht/] }
)
workbox.strategies.cacheFirst()
workbox.strategies.networkFirst()
workbox.strategies.staleWhileRevalidate()
workbox.skipWaiting();
module.exports = {
globDirectory: '.',
globPatterns: [
'*.html',
'manifest.json',
'dist/**',
'css/**',
'fonts/**',
'locale/**',
'css/webfonts/icomoon/fonticons/**',
'sounds/**',
'logo/**',
],
swSrc: 'sw.template.js',
swDest: 'sw.js',
maximumFileSizeToCacheInBytes: 1024**4
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment