Cursor Mod

Modify the cursor when hovering over certain links

  1. // ==UserScript==
  2. // @name Cursor Mod
  3. // @description Modify the cursor when hovering over certain links
  4. // @icon https://mdn.mozillademos.org/files/9/alias.gif
  5. // @version 0.1.1
  6. // @license GNU General Public License v3
  7. // @copyright 2014, Nickel
  8. // @grant GM_addStyle
  9. // @include *
  10. // @namespace https://gf.qytechs.cn/users/10797
  11. // ==/UserScript==
  12.  
  13. // Source: http://www.askvg.com/tip-show-different-cursors-for-javascript-links-and-hyperlinks-that-open-in-new-window/
  14.  
  15. // fallback (Chrome lacks GM functions)
  16. if( typeof GM_addStyle != 'function' ) {
  17. function GM_addStyle(css) {
  18. var head, style;
  19. head = document.getElementsByTagName('head')[0];
  20. if( !head ){ return; }
  21. style = document.createElement('style');
  22. style.type = 'text/css';
  23. style.innerHTML = css;
  24. head.appendChild(style);
  25. }
  26. }
  27.  
  28. // New tab/window
  29. GM_addStyle(':link[target="_blank"], :visited[target="_blank"], :link[target="_new"], :visited[target="_new"] {cursor: alias;}');
  30. // Javascript
  31. GM_addStyle('a[href^="javascript:"] {cursor: copy;}');

QingJ © 2025

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