Skip to content

Instantly share code, notes, and snippets.

View adrianoOliveiraRocha's full-sized avatar
🏠
Working from home

Adriano Oliveira adrianoOliveiraRocha

🏠
Working from home
View GitHub Profile
@Uriel29
Uriel29 / app.js
Last active November 8, 2023 01:24
Instalar PWA com botão que aparece assim que o Service esta registrado e o beforeinstallprompt esta funcional! Deixei o botão como none:
window.onload = function() {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('sw.js').then(function() {
console.log('Service Worker Registered');
});
}
let deferredPrompt;
const addBtn = document.querySelector('#enable-banner-install');
window.addEventListener('beforeinstallprompt', (e) => {
'''A round menu that appears on a long touch
'''
from kivy.uix.widget import Widget
from kivy.uix.label import Label
from kivy.uix.behaviors import ButtonBehavior
from kivy.lang import Builder
from kivy.clock import Clock
from kivy.animation import Animation
from kivy.properties import (
NumericProperty, ListProperty, ObjectProperty, DictProperty)