Skip to content

Commit d306877

Browse files
committed
feat: 适配不同版本的select下拉箭头
1 parent ebf1316 commit d306877

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

jira_quick_comment.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ==UserScript==
22
// @name Jira快速备注模板工具
33
// @namespace https://izmj.net/
4-
// @version 0.9
4+
// @version 0.9.1
55
// @description 在JIRA页面,搜索comment-wiki-edit元素,在该元素下添加一个select控件。可以快速添加所需的模板。
66
// @author GiraKoo
77
// @license MIT
@@ -10,17 +10,21 @@
1010
// @icon64 https://gitee.com/izmj/web_js/raw/main/img/zmj.png
1111
// ==/UserScript==
1212

13-
// 创建一个CSS样式规则来隐藏下拉箭头,定制id为jira_quick_comment_select的元素
13+
// 创建一个CSS样式规则来隐藏下拉箭头
1414
var style = document.createElement('style');
1515
style.type = 'text/css';
1616
style.innerHTML = `
1717
#jira_quick_comment_select::-ms-expand {
1818
display: none;
1919
}
2020
#jira_quick_comment_select {
21-
-webkit-appearance: none;
22-
-moz-appearance: none;
21+
-moz-appearance: none; /* Firefox */
22+
-webkit-appearance: none; /* Chrome, Safari, Opera */
2323
appearance: none;
24+
background: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23344563' d='M6.744 8.744a1.053 1.053 0 0 0 0 1.49l4.547 4.557a1 1 0 0 0 1.416 0l4.55-4.558a1.051 1.051 0 1 0-1.488-1.488l-3.77 3.776-3.768-3.776a1.051 1.051 0 0 0-1.487 0z'/%3E%3C/svg%3E");
25+
background-repeat: no-repeat;
26+
background-position: right 8px center;
27+
background-size: 16px 16px;
2428
}
2529
`;
2630

0 commit comments

Comments
 (0)