聚合搜索引擎切换导航[手机版][移动端]

把导航改到了底部,方便手机使用。

  1. // ==UserScript==
  2. // @name 聚合搜索引擎切换导航[手机版][移动端]
  3. // @namespace http://tampermonkey.net/
  4. // @version 2023.12.12
  5. // @description 把导航改到了底部,方便手机使用。
  6. // @author PunkJet
  7. // @include *
  8. // @grant unsafeWindow
  9. // @grant GM_getValue
  10. // @grant GM_setValue
  11. // @run-at document-start
  12. // @license MIT
  13. // ==/UserScript==
  14.  
  15. const punkDeafultMark = "Bing-Baidu-Google-Toutiao-Fsou-Quark-Sougou-360";
  16. const punkAllSearchMark = "Bing-Baidu-Google-Zhihu-Fsou-360-Wuzhui-Quark-Sougou-Toutiao-Yandex-Ecosia-DuckDuckGo-QwantLite-Swisscows";
  17.  
  18. const searchUrlMap = [
  19. {name: "必应", searchUrl: "https://www.bing.com/search?q=", searchkeyName: ["q"], matchUrl:/bing\.com.*?search\?q=?/g, mark:"Bing",},
  20. {name: "百度", searchUrl: "https://baidu.com/s?wd=", searchkeyName: ["wd", "word"], matchUrl:/baidu\.com.*?w(or)?d=?/g, mark:"Baidu",},
  21. {name: "谷歌", searchUrl: "https://www.google.com/search?q=", searchkeyName: ["q"], matchUrl:/google\.com.*?search.*?q=/g, mark:"Google",},
  22. {name: "知乎", searchUrl: "https://www.zhihu.com/search?q=", searchkeyName: ["q"], matchUrl:/zhihu\.com\/search.*?q=/g, mark:"Zhihu",},
  23. {name: "360", searchUrl: "https://www.so.com/s?q=", searchkeyName: ["q"], matchUrl:/\.so\.com.*?q=/g, mark:"360",},
  24. {name: "无追", searchUrl: "https://www.wuzhuiso.com/s?q=", searchkeyName: ["q"], matchUrl:/wuzhuiso\.com.*?q=/g, mark:"Wuzhui",},
  25. {name: "夸克", searchUrl: "https://quark.sm.cn/s?q=", searchkeyName: ["q"], matchUrl:/sm\.cn.*?q=/g, mark:"Quark",},
  26. {name: "搜狗", searchUrl: "https://m.sogou.com/web/searchList.jsp?keyword=", searchkeyName: ["keyword"], matchUrl:/sogou\.com.*?keyword=/g, mark:"Sougou",},
  27. {name: "头条", searchUrl: "https://so.toutiao.com/search/?keyword=", searchkeyName: ["keyword"], matchUrl:/toutiao\.com.*?keyword=/g, mark:"Toutiao",},
  28. {name: "Yandex", searchUrl: "https://yandex.com/search/touch/?text=", searchkeyName: ["text"], matchUrl:/((ya(ndex)?\.ru)|(yandex\.com)).*?text=/g, mark:"Yandex",},
  29. {name: "DuckDuckGo", searchUrl: "https://duckduckgo.com/?q=", searchkeyName: ["q"], matchUrl:/duckduckgo\.com.*?q=/g, mark:"DuckDuckGo",},
  30. {name: "Ecosia", searchUrl: "https://www.ecosia.org/search?q=", searchkeyName: ["q"], matchUrl:/ecosia\.org.*?q=/g, mark:"Ecosia",},
  31. {name: "QwantLite", searchUrl: "https://lite.qwant.com/?q=", searchkeyName: ["q"], matchUrl:/lite\.qwant\.com.*?q=/g, mark:"QwantLite",},
  32. {name: "Swisscows", searchUrl: "https://swisscows.com/en/web?query=", searchkeyName: ["query"], matchUrl:/swisscows\.com.*?query=/g, mark:"Swisscows",}
  33. ];
  34.  
  35.  
  36. const punkSocialMap = [
  37. {
  38. tabName:"日常",
  39. tabList:[
  40. {name: "知乎", searchUrl: "https://www.zhihu.com/search?q="},
  41. {name: "豆瓣", searchUrl: "https://m.douban.com/search/?query="},
  42. {name: "微博", searchUrl: "https://m.weibo.cn/search?containerid=100103&q="},
  43. {name: "哔哩哔哩", searchUrl: "https://m.bilibili.com/search?keyword="},
  44. {name: "维基百科", searchUrl: "https://zh.m.wikipedia.org/wiki/"},
  45. {name: "安娜的档案", searchUrl: "https://annas-archive.org/search?q="},
  46. {name: "Unsplash", searchUrl: "https://unsplash.com/s/photos/"},
  47. {name: "火山翻译", searchUrl: "https://translate.volcengine.com/mobile?text="},
  48. {name: "博客园", searchUrl: "https://zzk.cnblogs.com/s?w="},
  49. ],
  50. },
  51. {
  52. tabName:"娱乐",
  53. tabList:[
  54. {name: "知乎", searchUrl: "https://www.zhihu.com/search?q="},
  55. {name: "豆瓣", searchUrl: "https://m.douban.com/search/?query=",},
  56. {name: "微博", searchUrl: "https://m.weibo.cn/search?containerid=100103&q="},
  57. {name: "哔哩哔哩", searchUrl: "https://m.bilibili.com/search?keyword="},
  58. {name: "小红书", searchUrl: "https://m.sogou.com/web/xiaohongshu?keyword="},
  59. {name: "微信文章", searchUrl: "https://weixin.sogou.com/weixinwap?type=2&query="},
  60. {name: "推特", searchUrl: "https://mobile.twitter.com/search/"},
  61. {name: "豆瓣阅读", searchUrl: "https://read.douban.com/search?q="},
  62. {name: "Malavida", searchUrl: "https://www.malavida.com/en/android/s/"},
  63. {name: "ApkPure", searchUrl: "https://m.apkpure.com/search?q="},
  64. {name: "安娜的档案", searchUrl: "https://annas-archive.org/search?q="},
  65. {name: "人人影视", searchUrl: "https://www.renren.pro/search?wd="},
  66. {name: "豌豆Pro", searchUrl: "https://wandou.la/search/"},
  67. ],
  68. },
  69. {
  70. tabName:"开发",
  71. tabList:[
  72. {name: "开发者搜索", searchUrl: "https://kaifa.baidu.com/searchPage?wd="},
  73. {name: "GitHub", searchUrl: "https://github.com/search?q="},
  74. {name: "Gitee", searchUrl: "https://search.gitee.com/?q="},
  75. {name: "Stackoverflow", searchUrl: "https://stackoverflow.com/search?q="},
  76. {name: "GreasyFork", searchUrl: "https://greasyfork.org/scripts?q="},
  77. {name: "MDN", searchUrl: "https://developer.mozilla.org/search?q="},
  78. {name: "菜鸟教程", searchUrl: "https://www.runoob.com/?s="},
  79. {name: "掘金", searchUrl: "https://juejin.cn/search?query="},
  80. {name: "博客园", searchUrl: "https://zzk.cnblogs.com/s?w="},
  81. ],
  82. },
  83. {
  84. tabName:"网盘",
  85. tabList:[
  86. {name: "阿里云盘", searchUrl: "https://alipansou.com/search?k="},
  87. {name: "百度云盘", searchUrl: "https://xiongdipan.com/search?k="},
  88. {name: "夸克网盘", searchUrl: "https://aipanso.com/search?k="},
  89. {name: "罗马网盘", searchUrl: "https://www.luomapan.com/#/main/search?keyword="},
  90. ],
  91. },
  92. {
  93. tabName:"翻译",
  94. tabList:[
  95. {name: "有道词典", searchUrl: "https://youdao.com/m/result?word="},
  96. {name: "必应翻译", searchUrl: "https://cn.bing.com/dict/search?q="},
  97. {name: "百度翻译", searchUrl: "https://fanyi.baidu.com/#zh/en/"},
  98. {name: "谷歌翻译", searchUrl: "https://translate.google.com/?q="},
  99. {name: "火山翻译", searchUrl: "https://translate.volcengine.com/mobile?text="},
  100. {name: "DeepL翻译", searchUrl: "https://www.deepl.com/translator-mobile#zh/en/"},
  101. ],
  102. },
  103. {
  104. tabName:"图片",
  105. tabList:[
  106. {name: "谷歌搜图", searchUrl: "https://www.google.com.hk/search?tbm=isch&q="},
  107. {name: "必应搜图", searchUrl: "https://www.bing.com/images/search?q="},
  108. {name: "Flickr", searchUrl: "http://www.flickr.com/search/?q="},
  109. {name: "Pinterest", searchUrl: "https://www.pinterest.com/search/pins/?q="},
  110. {name: "Pixabay", searchUrl: "https://pixabay.com/zh/images/search/"},
  111. {name: "花瓣", searchUrl: "https://huaban.com/search/?q="},
  112. {name: "Unsplash", searchUrl: "https://unsplash.com/s/photos/"},
  113. ],
  114. },
  115. ];
  116.  
  117.  
  118. function getKeywords() {
  119. let keywords = "";
  120. for (let urlItem of searchUrlMap) {
  121. if (window.location.href.match(urlItem.matchUrl) != null) {
  122. for (let keyItem of urlItem.searchkeyName) {
  123. if ( window.location.href.indexOf(keyItem) >= 0 ) {
  124. let url = new URL(window.location.href);
  125. keywords = url.searchParams.get(keyItem);
  126. return keywords;
  127. }
  128. }
  129. }
  130. }
  131. return keywords;
  132. }
  133.  
  134.  
  135. function addOpenSearchBox() {
  136. const oDivtemp = document.createElement("div");
  137. oDivtemp.id = "punk-search-open-box";
  138. oDivtemp.style.display = "none";
  139. document.getElementById("punkjet-search-box").after(oDivtemp);
  140. }
  141.  
  142.  
  143. function addTabfunction() {
  144. var tab_list = document.querySelector('#punk-tablist');
  145. var lis = tab_list.querySelectorAll('li');
  146. var items = document.querySelectorAll('.punk-item');
  147.  
  148. for (var i = 0; i < lis.length; i++) {
  149. lis[i].setAttribute('index', i);
  150. lis[i].onclick = function () {
  151. for (var i = 0; i < lis.length; i++) {
  152. lis[i].className = '';
  153. }
  154. this.className = 'punk-current';
  155. var index = this.getAttribute('index');
  156. for (i = 0; i < items.length; i++) {
  157. items[i].style.display = 'none';
  158. }
  159. items[index].style.display = 'block';
  160. }
  161. }
  162. }
  163.  
  164.  
  165. function addSingleTab(node, tabList) {
  166. var ulList = document.createElement('ul');
  167. node.appendChild(ulList);
  168. let fragment = document.createDocumentFragment();//创建一个文档碎片,减少DOM渲染次数
  169. for (let index = 0; index < tabList.length; index++) {
  170. let liItem = document.createElement('li');
  171. liItem.innerHTML = `<a href='' id="punk-url-a" url='${tabList[index].searchUrl}'>${tabList[index].name}</a>`;
  172. fragment.appendChild(liItem);
  173. }
  174. ulList.appendChild(fragment);
  175. return node;
  176. }
  177.  
  178.  
  179. function addJumpSearchBox(){
  180. const searchJumpBox = document.createElement("div");
  181. searchJumpBox.id = "punk-search-jump-box";
  182. searchJumpBox.style.display = "none";
  183. document.getElementById("punkjet-search-box").appendChild(searchJumpBox);
  184.  
  185. const searchAllBox = document.createElement("div");
  186. searchAllBox.id = "punk-search-all-app";
  187. searchJumpBox.appendChild(searchAllBox);
  188.  
  189. let jumpAllSearchTitle = document.createElement("h1");
  190. jumpAllSearchTitle.innerText = "✰全部搜索引擎";
  191. searchAllBox.appendChild(jumpAllSearchTitle);
  192. addSingleTab(searchAllBox, searchUrlMap);
  193.  
  194. const punkTabList = document.createElement("div");
  195. punkTabList.id = "punk-tablist";
  196.  
  197. let jumpSocialTitle = document.createElement("h1");
  198. jumpSocialTitle.innerText = "@社交网络";
  199. punkTabList.appendChild(jumpSocialTitle);
  200. var ulListq = document.createElement('ul');
  201. punkTabList.appendChild(ulListq);
  202. let fragmentq = document.createDocumentFragment();//创建一个文档碎片,减少DOM渲染次数
  203. for (let index = 0; index < punkSocialMap.length; index++) {
  204. let liItemq = document.createElement('li');
  205. if (index == 0) {
  206. liItemq.className = "punk-current";
  207. }
  208. liItemq.innerText = punkSocialMap[index].tabName;
  209. fragmentq.appendChild(liItemq);
  210. }
  211. ulListq.appendChild(fragmentq);
  212. searchJumpBox.appendChild(punkTabList);
  213.  
  214. const punkTabListcontent = document.createElement("div");
  215. punkTabListcontent.className = "tab-content";
  216. let fragmentr = document.createDocumentFragment();//创建一个文档碎片,减少DOM渲染次数
  217. for (let index = 0; index < punkSocialMap.length; index++) {
  218. let liItemr = document.createElement('div');
  219. liItemr.className = "punk-item";
  220. if (index == 0) {
  221. liItemr.style.display = `block`;
  222. } else {
  223. liItemr.style.display = `none`;
  224. }
  225. liItemr = addSingleTab(liItemr, punkSocialMap[index].tabList);
  226. fragmentr.appendChild(liItemr);
  227. }
  228. punkTabListcontent.appendChild(fragmentr);
  229. searchJumpBox.appendChild(punkTabListcontent);
  230.  
  231. let jumpSortTitle = document.createElement("h1");
  232. jumpSortTitle.innerText = "■搜索引擎排序";
  233. searchJumpBox.appendChild(jumpSortTitle);
  234.  
  235. let jumpSortDesc = document.createElement("div");
  236. jumpSortDesc.className = "jump-sort-discription";
  237. searchJumpBox.appendChild(jumpSortDesc);
  238. jumpSortDesc.innerHTML = `<a style="color:#666666 !important">说明:除搜索引擎,其他站只跳转无导航<br>支持的格式:${punkAllSearchMark}</a>`;
  239. let punkJumpButton = document.createElement("button");
  240.  
  241. punkJumpButton.innerText = "点击输入排序";
  242. punkJumpButton.className = "punk-jump-sort-btn";
  243. searchJumpBox.appendChild(punkJumpButton);
  244.  
  245. punkJumpButton.onclick = function () {
  246. let sss = prompt("请输入需要显示的引擎!\n格式举例:Quark-Zhihu-Toutiao-360\n则导航为:夸克、知乎、头条、360", GM_getValue("punk_setup_search") || punkDeafultMark);
  247. if (sss) {
  248. GM_setValue("punk_setup_search", sss);
  249. setTimeout(function(){location.reload();}, 200);
  250. }
  251. //console.log("用户设置:" + GM_getValue("punk_setup_search"));
  252. }
  253.  
  254. let punkJumpClose = document.createElement("button");
  255. punkJumpClose.innerText = "收起";
  256. punkJumpClose.className = "punk-jump-sort-btn";
  257. searchJumpBox.appendChild(punkJumpClose);
  258.  
  259. punkJumpClose.onclick = function () {
  260. document.getElementById("punk-search-jump-box").style.display = `none`;
  261. }
  262. }
  263.  
  264.  
  265. function punkSearchClickFunction(){
  266. let btnPunkOpen = document.querySelector("#punk-search-open-box");
  267. btnPunkOpen.onclick = function () {
  268. var x = document.getElementById("punkjet-search-box");
  269. if (x.style.display == "none") {
  270. x.style.display = "block";
  271. document.getElementsByTagName('body')[0].style = "margin-top: 35px !important;";
  272. btnPunkOpen.style.display = "none";
  273. } else {
  274. x.style.display = "none";
  275. document.getElementsByTagName('body')[0].style = "margin-top: 0px !important;";
  276. }
  277. document.getElementsByClassName('_search-sticky-bar')[0].style.setProperty('top', '34px', 'important');
  278. }
  279.  
  280. let btnSet = document.querySelector("#search-setting-box");
  281. btnSet.onclick = function () {
  282. var punkjump = document.getElementById("punk-search-jump-box");
  283. if (punkjump.style.display === "none") {
  284. punkjump.style.display = "block";
  285. } else {
  286. punkjump.style.display = `none`;
  287. }
  288. }
  289.  
  290. let btnClose = document.querySelector("#search-close-box");
  291. btnClose.onclick = function () {
  292. var x = document.getElementById("punk-search-open-box");
  293. if (x.style.display === "none") {
  294. x.style.display = "block";
  295. }
  296. document.querySelector("#punkjet-search-box").style.display = `none`;
  297. document.getElementsByTagName('body')[0].style = "margin-bottom: 0px !important;";
  298. document.getElementsByClassName('_search-sticky-bar')[0].style.setProperty('top', '0px', 'important');
  299. }
  300. }
  301.  
  302. function addSearchBox() {
  303. const punkJetBox = document.createElement("div");
  304. punkJetBox.id = "punkjet-search-box";
  305. punkJetBox.style.display = "block";
  306. punkJetBox.style.fontSize = "15px";
  307.  
  308. const searchBox = document.createElement("div");
  309. searchBox.id = "punk-search-navi-box";
  310. punkJetBox.appendChild(searchBox);
  311.  
  312. const appBoxDiv = document.createElement("div");
  313. appBoxDiv.id = "punk-search-app-box";
  314. searchBox.appendChild(appBoxDiv);
  315.  
  316. var ulList = document.createElement('ul');
  317. appBoxDiv.appendChild(ulList);
  318.  
  319. let fragment = document.createDocumentFragment();//创建一个文档碎片,减少DOM渲染次数
  320. let showList = GM_getValue("punk_setup_search").split('-');
  321. for (let showListIndex = 0; showListIndex < showList.length; showListIndex++) {
  322. for (let index = 0; index < searchUrlMap.length; index++) {
  323. let item = searchUrlMap[index];
  324. if (item.mark == showList[showListIndex]) {
  325. let liItem = document.createElement('li');
  326. if (window.location.href.match(item.matchUrl) != null) {
  327. liItem.innerHTML = `<a href='' id="punk-url-a" style="color:#5C6BC0 !important" url='${item.searchUrl}'>${item.name}</a>`;
  328. } else {
  329. liItem.innerHTML = `<a href='' id="punk-url-a" url='${item.searchUrl}'>${item.name}</a>`;
  330. }
  331. fragment.appendChild(liItem);
  332. break;
  333. }
  334. }
  335. }
  336. ulList.appendChild(fragment);
  337.  
  338. const setBoxDiv = document.createElement("div");
  339. setBoxDiv.id = "search-setting-box";
  340. setBoxDiv.innerHTML = `<span id="punkBtnSet"> </span>`;
  341. searchBox.appendChild(setBoxDiv);
  342.  
  343. const closeBoxDiv = document.createElement("div");
  344. closeBoxDiv.id = "search-close-box";
  345. closeBoxDiv.innerHTML = `<span id="punkBtnClose"></span>`;
  346. searchBox.appendChild(closeBoxDiv);
  347.  
  348. document.getElementsByTagName('head')[0].after(punkJetBox);
  349. }
  350.  
  351.  
  352. function funcTouchStart(state) {
  353. var myNodelist = document.querySelectorAll("*");
  354. //console.log("length is "+ myNodelist.length);
  355. for (var i = 0; i < myNodelist.length; i++) {
  356. let style = window.getComputedStyle(myNodelist[i], null);
  357. if (style.getPropertyValue("position") === "fixed") {
  358. if (style.getPropertyValue("z-index") != "9999999") {
  359. //console.log(myNodelist[i]);
  360. if (style.getPropertyValue("bottom") === "0px") {
  361. if (document.getElementById("punkjet-search-box").style.display == "block") {
  362. myNodelist[i].style.bottom = "35px";
  363. }
  364. } else if (style.getPropertyValue("bottom") === "35px") {
  365. if (document.getElementById("punkjet-search-box").style.display == "none") {
  366. myNodelist[i].style.bottom = "0px";
  367. }
  368. }
  369. }
  370. } else if ((style.getPropertyValue("bottom") === "35px")) {
  371. myNodelist[i].style.bottom = "0px";
  372. }
  373. }
  374. }
  375.  
  376.  
  377. function funcPopState() {
  378. var myNodelist = document.querySelectorAll("*");
  379. //console.log("length is "+ myNodelist.length);
  380. for (var i = 0; i < myNodelist.length; i++) {
  381. let style = window.getComputedStyle(myNodelist[i], null);
  382. if (style.getPropertyValue("position") != "fixed"){
  383. if (style.getPropertyValue("bottom") === "35px") {
  384. myNodelist[i].style.bottom = "0px";
  385. }
  386. }
  387. }
  388. }
  389.  
  390.  
  391. function punkAddUrl(){
  392. setTimeout(function(){funcTouchStart();}, 200); window.addEventListener("touchstart", function() {setTimeout(function(){funcTouchStart();}, 550);});
  393. window.addEventListener("popstate", function() {setTimeout(function(){funcPopState();}, 100);});
  394. let aElement = document.querySelectorAll("#punk-url-a");
  395. for (let value of aElement) {
  396. value.addEventListener("click", function () { value.setAttribute("href", value.getAttribute("url") + getKeywords()); });
  397. value.addEventListener("contextmenu", function (){ value.setAttribute("href", value.getAttribute("url") + getKeywords()); });
  398. }
  399. }
  400.  
  401.  
  402. function injectStyle() {
  403. const css = `#punkjet-search-box{transform: scaleY(-1);position:fixed;flex-direction:column;bottom:0;left:0px;width:100%;height:35px;background-color:#FFFFFF !important;font-size:15px;z-index:9999999;justify-content:flex-end;}#punk-search-navi-box{transform: scaleY(-1);display:-webkit-flex;display:flex;width:100%;height:35px}#punk-search-jump-box{transform: scaleY(-1);padding:8px;background-color:#FFFFFF !important;max-width:480px;float:right;max-height:calc(80vh);overflow:scroll;box-shadow:0px 0px 1px 0px #000000;-ms-overflow-style:none;scrollbar-width:none;}#punk-search-jump-box::-webkit-scrollbar{display:none}#punk-search-app-box{flex:1;width:0}#punk-need-hide-box{flex:1;width:0;display:flex}#search-setting-box{flex:0 0 30px;text-align:center;margin:auto;background:url("data:image/svg+xml;utf8,%3Csvg width='48' height='48' xmlns='http://www.w3.org/2000/svg' fill='none'%3E%3Cg%3E%3Ctitle%3ELayer 1%3C/title%3E%3Cpath id='svg_1' stroke-linejoin='round' stroke-width='4' stroke='%23444444' fill='none' d='m24,44c11.0457,0 20,-8.9543 20,-20c0,-11.0457 -8.9543,-20 -20,-20c-11.0457,0 -20,8.9543 -20,20c0,11.0457 8.9543,20 20,20z'/%3E%3Cline stroke='%23444444' stroke-linecap='round' stroke-linejoin='round' id='svg_10' y2='28.5' x2='33' y1='28.5' x1='14' stroke-width='4' fill='none'/%3E%3Cline stroke='%23444444' stroke-linecap='round' stroke-linejoin='round' id='svg_11' y2='20.5' x2='33' y1='20.5' x1='14' stroke-width='4' fill='none'/%3E%3Cline stroke-linecap='round' stroke-linejoin='round' id='svg_12' y2='14.5' x2='20' y1='19.5' x1='14' stroke-width='4' stroke='%23444444' fill='none'/%3E%3Cline stroke='%23444444' stroke-linecap='round' stroke-linejoin='round' id='svg_13' y2='34.5' x2='24' y1='28.5' x1='33' stroke-width='4' fill='none'/%3E%3C/g%3E%3C/svg%3E") no-repeat center;background-size:contain;width:100%;height:18px}#search-close-box{flex:0 0 29px;text-align:center;margin:auto;background:url("data:image/svg+xml;utf8,%3Csvg width='18' height='18' viewBox='0 0 48 48' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z' fill='none' stroke='%23444444' stroke-width='4' stroke-linejoin='round'/%3E%3Cpath d='M29.6567 18.3432L18.343 29.6569' stroke='%23444444' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M18.3433 18.3432L29.657 29.6569' stroke='%23444444' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;background-size:contain;width:100%;height:18px}#punk-search-app-box ul{margin:0;padding:0;overflow:hidden;overflow-x:auto;list-style:none;white-space:nowrap;height:35px}#punk-search-app-box ul::-webkit-scrollbar{display:none !important}#punk-search-app-box li{margin-left:0px;display:inline-block;border-radius:2px;vertical-align:middle}#punk-search-app-box ul li a{display:block;color:#666666 !important;padding:8px;text-decoration:none;font-weight:bold;font-size:15px !important;font-family:Helvetica Neue,Helvetica,Arial,Microsoft Yahei,Hiragino Sans GB,Heiti SC,WenQuanYi Micro Hei,sans-serif}#punk-search-open-box{position:fixed;left:22px;bottom:64px;height:36px;width:36px;font-size:15px;text-align:center;padding:10px;border-radius:5px;z-index:9999998;background:url("data:image/svg+xml;utf8,%3Csvg width='48' height='48' xmlns='http://www.w3.org/2000/svg' stroke='null' style='vector-effect:non-scaling-stroke;' fill='none'%3E%3Cg id='Layer_1'%3E%3Ctitle%3ELayer 1%3C/title%3E%3Cpath stroke='%23000' id='svg_5' d='m1.97999,23.9675l0,0c0,-12.42641 10.0537,-22.5 22.45556,-22.5l0,0c5.95558,0 11.66724,2.37053 15.87848,6.5901c4.21123,4.21957 6.57708,9.94253 6.57708,15.9099l0,0c0,12.4264 -10.05369,22.5 -22.45555,22.5l0,0c-12.40186,0 -22.45556,-10.07359 -22.45556,-22.5zm22.45556,-22.5l0,45m-22.45556,-22.5l44.91111,0' stroke-width='0' fill='%23005fbf'/%3E%3Cpath stroke='%23000' id='svg_7' d='m13.95011,18.65388l0,0l0,-0.00203l0,0.00203zm0.00073,-0.00203l4.2148,5.84978l-4.21553,5.84775l1.54978,2.15123l5.76532,-8l-5.76532,-8l-1.54905,2.15123zm7.46847,13.70285l10.5308,0l0,-3.03889l-10.5308,0l0,3.03889zm3.16603,-6.33312l7.36476,0l0,-3.03889l-7.36476,0l0,3.03889zm-3.16603,-9.37302l0,3.04091l10.5308,0l0,-3.04091l-10.5308,0z' stroke-width='0' fill='%23ffffff'/%3E%3Cpath id='svg_8' d='m135.44834,59.25124l0,0l0,-0.00001l0,0.00001zm0.00004,-0.00001l0.23416,0.02887l-0.2342,0.02886l0.0861,0.01062l0.3203,-0.03948l-0.3203,-0.03948l-0.08606,0.01062zm0.41492,0.06762l0.58504,0l0,-0.015l-0.58504,0l0,0.015zm0.17589,-0.03125l0.40915,0l0,-0.015l-0.40915,0l0,0.015zm-0.17589,-0.04625l0,0.01501l0.58504,0l0,-0.01501l-0.58504,0z' stroke-width='0' stroke='%23000' fill='%23ffffff'/%3E%3C/g%3E%3C/svg%3E") no-repeat center;background-size:contain}#punk-search-open-box,::after,::before{box-sizing:initial !important}#punk-search-jump-box h1{font-size:15px !important;color:#444444 !important;font-weight:bold;margin:7px 4px}#punk-search-jump-box ul{margin-left:0px;padding:0;overflow:hidden;overflow-x:auto;list-style:none}#punk-search-jump-box li{margin:4px;display:inline-block;vertical-align:middle;border-radius:2px;background-color:hsla(204,48%,14%,0.1) !important}#punk-search-jump-box a{display:block;color:#263238 !important;padding:3px;margin:2px;font-size:14px;text-decoration:none;font-family:Helvetica Neue,Helvetica,Arial,Microsoft Yahei,Hiragino Sans GB,Heiti SC,WenQuanYi Micro Hei,sans-serif}.jump-sort-discription{margin:5px 4px}.punk-jump-sort-btn{background-color:#0026A69A;border:none;color:white;padding:8px 64px;text-align:center;text-decoration:none;display:inline-block;font-size:13px;margin:4px 5px;cursor:pointer;border-radius:4px;width:97%}body{margin-top:35px !important;position:relative !important}._search-sticky-bar{top:34px !important}._2Ldjm{top:34px !important;}#punk-tablist{height:65px;margin-top:20px}#punk-tablist li{float:left;height:18px;background-color:hsla(0,100%,100%,0) !important;color:#666666 !important;text-align:center;cursor:pointer;margin:4px 8px}#punk-tablist ul{height:39px}.punk-current{text-decoration:underline 3px #0026A69A;text-underline-offset:0.4em}.punk-current li{color:#0026A69A !important}.tab-content{margin-bottom:20px} `
  404. const cssNode = document.createElement("style");
  405. cssNode.setAttribute("type", "text/css");;
  406. cssNode.appendChild(document.createTextNode(css));
  407. document.getElementById("punkjet-search-box").appendChild(cssNode);
  408. }
  409.  
  410. (function () {
  411. "use strict";
  412.  
  413. for (let index = 0; index < searchUrlMap.length; index++) {
  414. if (window.location.href.match(searchUrlMap[index].matchUrl) != null) {
  415. if (getKeywords() != null){
  416. if (!GM_getValue("punk_setup_search")) {
  417. GM_setValue("punk_setup_search", punkDeafultMark);
  418. }
  419. addSearchBox();
  420. addJumpSearchBox();
  421. addOpenSearchBox();
  422. punkSearchClickFunction();
  423. addTabfunction();
  424. injectStyle();
  425. punkAddUrl();
  426. }
  427. }
  428. }
  429.  
  430. })();