V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
fyooo
V2EX  ›  浏览器

有没有根据域名自定义快捷键的 chrome 插件?

  •  
  •   fyooo · 2020-07-22 10:12:01 +08:00 · 1266 次点击
    这是一个创建于 1366 天前的主题,其中的信息可能已经有所发展或是发生改变。
    之前用习惯了 google docs,经常条件反射的 Cmd+S

    现在公司要求改去用企业微信文档,企业微信文档的 Cmd+S 没有屏蔽这个 shortcut 。

    跟 V 友们请教一下有没有相关的插件可以解决这个问题?
    2 条回复    2020-07-24 11:28:45 +08:00
    whileFalse
        1
    whileFalse  
       2020-07-22 10:17:23 +08:00
    油猴自己写一个?
    fyooo
        2
    fyooo  
    OP
       2020-07-24 11:28:45 +08:00
    @whileFalse 谢谢哈,没有用过油猴,我写了一个,参考 https://toffee24.github.io/blog/2019/07/19/chrome%E5%BF%AB%E6%8D%B7%E9%94%AE%E5%A4%AA%E5%8F%8D%E4%BA%BA%E7%B1%BB-%E4%B8%8D%E6%83%B3%E5%AE%89%E8%A3%85%E9%A2%9D%E5%A4%96%E6%8F%92%E4%BB%B6-%E9%82%A3%E5%B0%B1%E7%94%A8TamperMonkey%E5%86%99%E4%B8%AA%E8%84%9A%E6%9C%AC/

    但是貌似没有生效,不知道搞个类似的么?

    ```
    // ==UserScript==
    // @name weixin doc
    // @namespace http://tampermonkey.net/
    // @version 0.1
    // @description try to take over the world!
    // @author you
    // @match https://doc.weixin.qq.com/
    // @grant none
    // ==/UserScript==



    (function() {
    window.addEventListener('keydown',function(event){
    if (event. metaKey && event.keyCode == 83) {
    // window.location.href = "about:blank"
    // window.close()
    alert(1)
    }
    })
    })()
    ```
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3230 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 13:31 · PVG 21:31 · LAX 06:31 · JFK 09:31
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.