Give Url

Gives you website url

当前为 2023-10-28 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Give Url
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0.01
  5. // @description Gives you website url
  6. // @author TKTK1234567
  7. // @match https://*
  8. // @match *.html
  9. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  10. // @grant none
  11. // @license MIT
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16. addEventListener("keydown", (event) => {
  17. if (event.keyCode === 16) {
  18. const currentUrl = window.location.href;
  19. window.alert("The url is: " + currentUrl)
  20. }
  21. // do something
  22. })();
  23. // Your code here...
  24. })();