Skip to content

Instantly share code, notes, and snippets.

@evanreichard
Created January 1, 2022 21:28
Show Gist options
  • Save evanreichard/5a9774f962c485f7007e31c548757a7b to your computer and use it in GitHub Desktop.
Save evanreichard/5a9774f962c485f7007e31c548757a7b 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==
let webManifest = {
"name": "",
"short_name": "",
"theme_color": "#ff0000",
"background_color": "#ff0000",
"display": "standalone"
};
let manifestElem = document.createElement('link');
manifestElem.setAttribute('rel', 'manifest');
manifestElem.setAttribute('href', 'data:application/manifest+json;base64,' + btoa(JSON.stringify(webManifest)));
document.head.prepend(manifestElem);
@Ponta-neizan
Copy link

@evanreichard

Thank you so much! It works perfectly. However, I’m having trouble WPAing YouTube on my iPad Pro. The shortcut just launches Safari with YouTube open on the left tab. Is there any way to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment