Skip to content

Instantly share code, notes, and snippets.

@4piu
Forked from evanreichard/pwa-everything.user.js
Last active April 13, 2024 14:03
Show Gist options
  • Save 4piu/c7edcce420c724f6903cf8808da7a9d8 to your computer and use it in GitHub Desktop.
Save 4piu/c7edcce420c724f6903cf8808da7a9d8 to your computer and use it in GitHub Desktop.
pwa-everything.user.js
// ==UserScript==
// @name PWA Everything
// @author Evan Reichard
// @version 0.0.1
// @match *://*/*
// @grant none
// @run-at document-idle
// @noframes
// ==/UserScript==
const webManifest = {
"name": "",
"short_name": "",
"theme_color": "#0000",
"background_color": "#0000",
"display": "standalone"
};
const manifestElem = document.createElement('link');
manifestElem.setAttribute('rel', 'manifest');
manifestElem.setAttribute('href', 'data:application/manifest+json;base64,' + btoa(JSON.stringify(webManifest)));
document.head.prepend(manifestElem);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment