Skip to content

Instantly share code, notes, and snippets.

🚧
Working Hard

Vadim Makeev pepelsbey

🚧
Working Hard
Block or report user

Report or block pepelsbey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View what-is-manifest__6.json
{
"display": "fullscreen",
"orientation": "landscape"
}
View what-is-manifest__5.json
{
"icons": [{
"src": "icon/lowres",
"sizes": "64x64",
"type": "image/webp"
}, {
"src": "icon/hd_small",
"sizes": "64x64"
}, {
"src": "icon/hd_hi",
View what-is-manifest__4.json
{
"name": "Моё вообще улётное фотоприложение",
"short_name": "Фотки"
}
View what-is-manifest__3.json
{
"lang": "ru",
"dir": "ltr",
"name": "Супергонщик 3000",
"description": "Потрясающая футуристичная гоночная игра из будущего!",
"short_name": "Гонщик3K",
"icons": [{
"src": "icon/lowres.webp",
"sizes": "64x64",
"type": "image/webp"
View what-is-manifest__2.json
{
"name": "Супергонщик 3000",
"icons": [{
"src": "icon/lowres.png",
"sizes": "64x64"
}]
}
View after.conf
server {
listen 80;
listen [::]:80;
server_name wsd.events www.wsd.events;
return 301 https://wsd.events$request_uri;
}
server {
listen 443 ssl http2;
View enhancing-comment-form__10.js
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([
'./',
View enhancing-comment-form__9.js
// Проверяем поддержку сервис-воркера
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);
View enhancing-comment-form__8.js
var messageElement = document.querySelector('#feedback');
// ...
form.addEventListener('submit', function () {
// ...
xhr.onerror = function () {
messageElement.className = 'message error';
messageElement.textContent = 'При публикации комментария произошла ошибка. Попробуйте ещё раз.';
};
xhr.upload.onprogress = function (e) {
messageElement.textContent = 'Uploading: ' + e.loaded / e.total * 100;
You can’t perform that action at this time.