Skip to content

Commit 6b2b953

Browse files
committed
Update searchJumper.user.js
1 parent 2259f54 commit 6b2b953

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

SearchJumper/searchJumper.user.js

Lines changed: 10 additions & 6 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.7.43
7+
// @version 1.7.44
88
// @description META search assistant that assists with the seamless transition between search engines, providing the ability to swiftly navigate to any platform and conduct searches effortlessly. Additionally, it allows for the selection of text, images, or links to be searched on any search engine with a simple right-click or by utilizing a range of menus and shortcuts.
99
// @description:zh-CN 高效搜索辅助,在搜索时一键切换搜索引擎,支持划词右键搜索、页内关键词查找与高亮、可视化操作模拟、高级自定义等
1010
// @description:zh-TW 高效搜尋輔助,在搜尋時一鍵切換搜尋引擎,支援劃詞右鍵搜尋、頁內關鍵詞查找與高亮、可視化操作模擬、高級自定義等
@@ -3263,7 +3263,7 @@
32633263
title = "";
32643264
popup = true;
32653265
if (popupMatch[1]) {
3266-
showTips = popupMatch[2] || 1;
3266+
showTips = popupMatch[2] || "1";
32673267
}
32683268
}
32693269
}
@@ -4478,10 +4478,14 @@
44784478
targetElement = spannode;
44794479
let targetShowTipsSite;
44804480
if (word.showTips) {
4481-
let firstType = self.autoGetFirstType();
4482-
let targetSites = firstType.querySelectorAll('a.search-jumper-btn[data-show-tips]:not(.notmatch)');
4483-
let index = parseInt(word.showTips) - 1;
4484-
targetShowTipsSite = targetSites[index];
4481+
if (/^\d+$/.test(word.showTips)) {
4482+
let firstType = self.autoGetFirstType();
4483+
let targetSites = firstType.querySelectorAll('a.search-jumper-btn[data-show-tips]:not(.notmatch)');
4484+
let index = parseInt(word.showTips) - 1;
4485+
targetShowTipsSite = targetSites[index];
4486+
} else {
4487+
targetShowTipsSite = self.getTargetSitesByName([word.showTips])[0];
4488+
}
44854489
}
44864490
self.setFuncKeyCall(true);
44874491
if (targetShowTipsSite) {

0 commit comments

Comments
 (0)