您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
在Fogbug case页面增加下拉框,选择只看某个人的帖子。
// ==UserScript== // @name Fogbugz Filter Person/只看某人 // @namespace https://gqqnbig.me // @version 0.1 // @description 在Fogbug case页面增加下拉框,选择只看某个人的帖子。 // @copyright 2016, Gqqnbig // @run-at document-end // @require https://code.jquery.com/jquery-2.2.3.min.js // @include http://www.fogcreek.com/fogbugz/ or your own sites // ==/UserScript== function createFilter() { var persons = ["All"]; $(".person").each(function () { var name = $(this).text().trim(); if (persons.indexOf(name) === -1) persons.push(name); }); persons.sort(); //console.log(persons); var $select = $("<select></select>"); $select.change(function () { var person = $(this).val(); //alert(person); $(".bugevent").each(function () { var result = $(this).find(".person").is(function () { return person === "All" || $(this).text().trim() === person; }); if (result) $(this).closest(".bugevent").css("display", "");//.show(); else $(this).closest(".bugevent").css("display", "none");// hide(); }); }); $select.css("visibility", "visible"); $select.css("display", "inline"); for (var i = 0; i < persons.length; i++) { $select.append($("<option>" + persons[i] + "</option>")); } var $li = $("<li/>"); $li.append($select); $(".toolbar.buttons").prepend($li); //If there is more than one target element, however, cloned copies of the inserted element will be created for each target except for the last one. //That's why we cannot register change event later. } setTimeout(createFilter, 100);
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址