您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Add keyboard shortcut Shift + o to open focusing link of GitHub Notifications.
当前为
// ==UserScript== // @name Open notification link by Shift + o for GitHub // @namespace http://tampermonkey.net/ // @version 1.0.0 // @description Add keyboard shortcut Shift + o to open focusing link of GitHub Notifications. // @author Kensuke Nagae // @match https://github.com/notifications/* // @grant none // ==/UserScript== (function() { 'use strict'; document.addEventListener('keyup', function(ev) { if (ev.key === 'O') { var focusing = document.querySelector('.list-group-item.navigation-focus'); var a = focusing.querySelector('a'); window.open(a.href, '_blank'); focusing.setAttribute('class', focusing.getAttribute('class') + ' read'); } }); })();