Skip to content

Commit 4ca7b4e

Browse files
committed
Update searchJumper.user.js
1 parent 853d67e commit 4ca7b4e

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

SearchJumper/searchJumper.user.js

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// @name:zh-TW 搜尋醬
55
// @name:ja 検索ちゃん - SearchJumper
66
// @namespace hoothin
7-
// @version 1.6.6.46.4
7+
// @version 1.6.6.46.5
88
// @description Jump to any search engine quickly and easily, the most powerful, most complete search enhancement script.
99
// @description:zh-CN 高效搜索引擎辅助增强,在搜索时一键跳转各大搜索引擎,支持任意页面右键划词搜索与全面自定义
1010
// @description:zh-TW 高效搜尋引擎輔助增强,在搜尋時一鍵跳轉各大搜尋引擎,支持任意頁面右鍵劃詞搜尋與全面自定義
@@ -683,7 +683,9 @@
683683
defaultFindTab: false,
684684
disableAutoOpen: false,
685685
hideOnSearchEngine: false,
686-
minSizeMode: false
686+
minSizeMode: false,
687+
hidePopup: false,
688+
minPopup: false
687689
};
688690
function run() {
689691
const lang = navigator.appName == "Netscape" ? navigator.language : navigator.userLanguage;
@@ -1351,12 +1353,12 @@
13511353
display: inline-flex!important;
13521354
}
13531355
#search-jumper>.search-jumper-searchBar.funcKeyCall>.search-jumper-type {
1354-
height: auto!important;
1355-
width: ${240 * this.scale}px!important;
1356-
flex-wrap: wrap!important;
1357-
flex-direction: row;
1356+
height: ${searchData.prefConfig.minPopup ? '24px' : 'auto'}!important;
1357+
width: ${searchData.prefConfig.minPopup ? 24 : (240 * this.scale)}px!important;
13581358
max-width: unset;
13591359
max-height: ${108 * this.scale + 10}px;
1360+
flex-wrap: wrap!important;
1361+
flex-direction: row;
13601362
padding: 5px;
13611363
box-shadow: #000000 0px 0px 10px;
13621364
overflow: auto;
@@ -1366,6 +1368,10 @@
13661368
transition: none;
13671369
background: #d0d0d0d0;
13681370
}
1371+
#search-jumper>.search-jumper-searchBar.funcKeyCall>.search-jumper-type:hover {
1372+
height: auto!important;
1373+
width: ${240 * this.scale}px!important;
1374+
}
13691375
#search-jumper>.search-jumper-searchBar.funcKeyCall>.search-jumper-type::-webkit-scrollbar {
13701376
width: 0 !important;
13711377
height: 0 !important;
@@ -6001,9 +6007,10 @@
60016007
}
60026008

60036009
showInPage(funcKeyCall, e) {
6004-
if (this.bar.contains(targetElement) || this.inInput || this.bar.classList.contains("funcKeyCall")) {
6010+
if (this.bar.contains(targetElement) || this.inInput || (!funcKeyCall && this.bar.classList.contains("funcKeyCall"))) {
60056011
return;
60066012
}
6013+
if (searchData.prefConfig.hidePopup) funcKeyCall = false;
60076014
if (this.bar.parentNode && this.bar.parentNode.classList.contains("search-jumper-showall")) return;
60086015
if (!targetElement) targetElement = document.body;
60096016
let _targetElement = targetElement, children;
@@ -6097,6 +6104,7 @@
60976104
searchData.prefConfig.offset.y
60986105
);
60996106
}
6107+
this.bar.classList.remove("funcKeyCall");
61006108
if (firstType && firstType.parentNode.classList.contains('search-jumper-hide')) {
61016109
if (!searchData.prefConfig.disableAutoOpen || funcKeyCall) {
61026110
firstType.onmousedown();
@@ -7830,6 +7838,7 @@
78307838
});
78317839
dragRoundFrame.addEventListener('drop', e => {
78327840
if (e.target === dragLogo) {
7841+
searchBar.bar.classList.remove("funcKeyCall");
78337842
searchBar.showInPage();
78347843
} else if (dragSector) {
78357844
searchBar.searchBySiteName(dragSector.children[0].dataset.name, e);

0 commit comments

Comments
 (0)