QR This SVG

Generates and saves an SVG based QR code of the URL of the current page.

  1. // ==UserScript==
  2. // @name QR This SVG
  3. // @namespace https://gabrieljones.dev/
  4. // @description Generates and saves an SVG based QR code of the URL of the current page.
  5. // @include *
  6. // @version 0.1
  7. // @author Gabriel Jones
  8. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  9. // @grant GM_registerMenuCommand
  10. // @grant GM_download
  11. // ==/UserScript==
  12.  
  13. (function(){
  14. if (top.location !== this.location){
  15. return false;
  16. }
  17. GM_registerMenuCommand( 'QR This Page', () => {
  18. const uriEncoded = encodeURIComponent(location.href);
  19. GM_download("https://api.qrserver.com/v1/create-qr-code/?data=" + uriEncoded + "&format=svg&qzone=4", document.title+".svg");
  20. });
  21. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址