Skip to content

Instantly share code, notes, and snippets.

View pepelsbey's full-sized avatar
🚧
Working Hard

Vadim Makeev pepelsbey

🚧
Working Hard
View GitHub Profile
@media all and (display-mode: standalone){
}
{
"display": "fullscreen",
"orientation": "landscape"
}
{
"icons": [{
"src": "icon/lowres",
"sizes": "64x64",
"type": "image/webp"
}, {
"src": "icon/hd_small",
"sizes": "64x64"
}, {
"src": "icon/hd_hi",
{
"name": "Моё вообще улётное фотоприложение",
"short_name": "Фотки"
}
{
"lang": "ru",
"dir": "ltr",
"name": "Супергонщик 3000",
"description": "Потрясающая футуристичная гоночная игра из будущего!",
"short_name": "Гонщик3K",
"icons": [{
"src": "icon/lowres.webp",
"sizes": "64x64",
"type": "image/webp"
{
"name": "Супергонщик 3000",
"icons": [{
"src": "icon/lowres.png",
"sizes": "64x64"
}]
}
<link rel="manifest" href="/manifest.json">
server {
listen 80;
listen [::]:80;
server_name wsd.events www.wsd.events;
return 301 https://wsd.events$request_uri;
}
server {
listen 443 ssl http2;
importScripts('idb-keyval.js');
const VERSION = 'v1';
self.addEventListener('install', function (e) {
self.skipWaiting();
e.waitUntil(
caches.open(VERSION).then(function (cache) {
return cache.addAll([
'./',
// Проверяем поддержку сервис-воркера
if ('serviceWorker' in navigator) {
// Регистрируем сервис-воркер
navigator.serviceWorker.register('./service-worker.js');
form.addEventListener('submit', function (e) {
let formData = new FormData(form);
// Отправляем сообщение в фоне
navigator.serviceWorker.ready.then(function (swRegistration) {
idbKeyval.set('comment', commentArea.value);