您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
It reveals the the Depends and Blocks bug titles via a keyboard shortcut
当前为
// ==UserScript== // @name Bugzilla - reveal the Depends and Blocks bug titles // @namespace darkred // @description It reveals the the Depends and Blocks bug titles via a keyboard shortcut // @include https://bugzilla.mozilla.org/show_bug.cgi?id=* // @version 1 // @grant none // @require http://code.jquery.com/ui/1.9.1/jquery-ui.min.js // @require https://cdnjs.cloudflare.com/ajax/libs/keypress/2.1.3/keypress.min.js // ==/UserScript== var flag = 1; var listener = new window.keypress.Listener(); listener.simple_combo('`', function() { console.log('You pressed `'); if (flag === 1) { flag = 0; var depends = $('#dependson_input_area').siblings(); var blocks = $('#blocked_input_area').siblings(); var combined = [].concat(Array.prototype.slice.call(depends), Array.prototype.slice.call(blocks)); for (var i = 0; i < combined.length; i++) { combined[i].innerHTML = '(' + combined[i].innerHTML + ') ' + combined[i].title; combined[i].outerHTML += '<br/>'; } } else { var regex = /^https:\/\/bugzilla\.mozilla\.org\/show_bug\.cgi\?id=(.*)$/; console.log('You pressed ~'); var depends = $('#dependson_input_area').siblings(); var blocks = $('#blocked_input_area').siblings(); var combined = [].concat(Array.prototype.slice.call(depends), Array.prototype.slice.call(blocks)); if (flag === 0) { flag = 1; for (var i = 0; i < combined.length; i += 2) { combined[i].innerHTML = combined[i].href.match(regex)[1]; } for (var i = (combined.length) - 1; i => 0; i -= 2) { // if (typeof(combined[i]) !== 'undefined' ){ combined[i].remove(); // } } } } });