(ChromeOS) Calculator Rickroll (Alt+R)

Redirects the ChromeOS calculator app to Never Gonna Give You Up when pressing Alt+R.

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

  1. // ==UserScript==
  2. // @name (ChromeOS) Calculator Rickroll (Alt+R)
  3. // @namespace https://greasyfork.org/users/1201646
  4. // @version 1.0
  5. // @description Redirects the ChromeOS calculator app to Never Gonna Give You Up when pressing Alt+R.
  6. // @author lemocha
  7. // @match https://calculator.apps.chrome/
  8. // @icon https://lh3.googleusercontent.com/WxY4nHcChLXwanpdhY5AE2SE9fK7qp0kfJBNql2Pt0WyuJ24zFCQYUMV5_bGOGMpcm6Qs360yCEuvV9EZ1Jcz0_j=s60
  9. // @grant none
  10. // @run-at document-idle
  11. // @license MIT
  12. // ==/UserScript==
  13.  
  14.  
  15. (() => {
  16. "use strict";
  17. document.addEventListener("keyup", event =>
  18. {
  19. // if Alt+R key combo pressed
  20. if (event.altKey && event.key === "r")
  21. {
  22. // redirect to Never Gonna Give You Up
  23. window.location.replace("https://www.youtube.com/watch?v=dQw4w9WgXcQ");
  24. }
  25. });
  26. })();