Created
March 20, 2026 10:26
-
-
Save unitycoder/c6f9ca5b39f55ba071c44d4610e4ef52 to your computer and use it in GitHub Desktop.
[GreaseMonkey] App Store / Google Play URL QR Overlay (add QR code link to easily download this app)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name App Store / Google Play URL QR Overlay | |
| // @namespace https://unitycoder.com/ | |
| // @version 1.0 | |
| // @description Show a QR code for the current page URL in the top-right corner | |
| // @match https://apps.apple.com/us/app/* | |
| // @match https://play.google.com/store/apps/* | |
| // @grant none | |
| // ==/UserScript== | |
| (function () { | |
| 'use strict'; | |
| var overlayId = 'gm-url-qr-overlay'; | |
| if (document.getElementById(overlayId)) { | |
| return; | |
| } | |
| function addStyles() { | |
| var style = document.createElement('style'); | |
| style.textContent = | |
| '#' + overlayId + ' {' + | |
| 'position: fixed;' + | |
| 'top: 75px;' + | |
| 'right: 16px;' + | |
| 'z-index: 2147483647;' + | |
| 'background: rgba(255,255,255,0.96);' + | |
| 'border: 1px solid #ccc;' + | |
| 'border-radius: 10px;' + | |
| 'padding: 10px;' + | |
| 'box-shadow: 0 4px 12px rgba(0,0,0,0.2);' + | |
| 'text-align: center;' + | |
| 'font-family: Arial, sans-serif;' + | |
| 'font-size: 12px;' + | |
| '}' + | |
| '#' + overlayId + ' .qr-title {' + | |
| 'margin-bottom: 8px;' + | |
| 'font-weight: bold;' + | |
| '}' + | |
| '#' + overlayId + ' img {' + | |
| 'display: block;' + | |
| 'width: 140px;' + | |
| 'height: 140px;' + | |
| '}'; | |
| document.head.appendChild(style); | |
| } | |
| function createOverlay() { | |
| var overlay = document.createElement('div'); | |
| overlay.id = overlayId; | |
| var img = document.createElement('img'); | |
| img.alt = 'QR code'; | |
| img.src = 'https://api.qrserver.com/v1/create-qr-code/?size=140x140&data=' + encodeURIComponent(window.location.href); | |
| overlay.appendChild(img); | |
| document.body.appendChild(overlay); | |
| } | |
| function init() { | |
| if (!document.body || !document.head) { | |
| setTimeout(init, 100); | |
| return; | |
| } | |
| addStyles(); | |
| createOverlay(); | |
| } | |
| init(); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment