all-search 全搜,一个搜索引擎快捷跳转菜单

在各个引擎之间跳转的顶部固定菜单,借鉴自searchEngineJump

目前为 2020-03-30 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name all-search 全搜,一个搜索引擎快捷跳转菜单
  3. // @version 0.1.4d
  4. // @description 在各个引擎之间跳转的顶部固定菜单,借鉴自searchEngineJump
  5. // @author endday
  6. // @license GPL-2.0
  7. // @update 2020/3/30
  8. // @include *
  9. // @homepageURL https://github.com/endday/all-search
  10.  
  11. // @require https://cdn.jsdelivr.net/npm/vue
  12. // @run-at document-body
  13.  
  14. // @grant GM_getValue
  15. // @grant GM_setValue
  16. // @grant GM_addStyle
  17.  
  18. // @namespace https://github.com/endday
  19. // ==/UserScript==
  20. /* eslint-disable */
  21.  
  22. !function(e) {
  23. "use strict";
  24. e = e && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
  25. var n = [ {
  26. nameZh: "默认",
  27. name: "common",
  28. list: [ {
  29. name: "baidu",
  30. nameZh: "百度",
  31. url: "https://www.baidu.com/s?wd=%s&ie=utf-8"
  32. }, {
  33. name: "google",
  34. nameZh: "谷歌",
  35. url: "https://www.google.com/search?q=%s&ie=utf-8&oe=utf-8"
  36. }, {
  37. name: "bing",
  38. nameZh: "必应",
  39. url: "https://cn.bing.com/search?q=%s"
  40. }, {
  41. name: "baidu",
  42. nameZh: "百度翻译",
  43. url: "http://fanyi.baidu.com/#auto/zh/%s"
  44. }, {
  45. name: "zhihu",
  46. nameZh: "知乎",
  47. url: "http://www.zhihu.com/search?q=%s"
  48. }, {
  49. name: "stackoverflow",
  50. nameZh: "stackoverflow",
  51. url: "https://stackoverflow.com/search?q=%s"
  52. }, {
  53. name: "juejin",
  54. nameZh: "掘金",
  55. url: "https://juejin.im/search?query=%s&type=all"
  56. }, {
  57. name: "GitHub",
  58. nameZh: "GitHub",
  59. url: "https://github.com/search?utf8=✓&q=%s",
  60. blank: !0
  61. } ]
  62. }, {
  63. nameZh: "搜索",
  64. name: "search",
  65. list: [ {
  66. name: "baidu",
  67. nameZh: "百度",
  68. url: "https://www.baidu.com/s?wd=%s&ie=utf-8"
  69. }, {
  70. name: "google",
  71. nameZh: "谷歌",
  72. url: "https://www.google.com/search?q=%s&ie=utf-8&oe=utf-8"
  73. }, {
  74. name: "bing",
  75. nameZh: "必应",
  76. url: "https://cn.bing.com/search?q=%s"
  77. }, {
  78. name: "DDG",
  79. nameZh: "DDG",
  80. url: "https://duckduckgo.com/?q=%s",
  81. disable: !0
  82. }, {
  83. name: "360",
  84. nameZh: "360",
  85. url: "https://www.so.com/s?ie=utf-8&q=%s"
  86. }, {
  87. name: "yahoo",
  88. nameZh: "雅虎",
  89. url: "https://search.yahoo.com/search;?p=%s",
  90. disable: !0
  91. }, {
  92. name: "sogou",
  93. nameZh: "搜狗",
  94. url: "https://www.sogou.com/web?query=%s",
  95. disable: !1
  96. }, {
  97. name: "startpage",
  98. nameZh: "Startpage",
  99. url: "https://www.startpage.com/do/asearch$post$query",
  100. disable: !0
  101. }, {
  102. name: "mijisou",
  103. nameZh: "秘迹搜索",
  104. url: "https://mijisou.com/?q=%s&category_general=on&time_range=&language=zh-CN"
  105. }, {
  106. name: "Yandex",
  107. nameZh: "Yandex",
  108. url: "https://yandex.com/search/?text=%s",
  109. disabled: !0
  110. } ]
  111. }, {
  112. nameZh: "翻译",
  113. name: "translate",
  114. list: [ {
  115. name: "google",
  116. nameZh: "谷歌翻译",
  117. url: "https://translate.google.com/?q=%s"
  118. }, {
  119. name: "baidu",
  120. nameZh: "百度翻译",
  121. url: "http://fanyi.baidu.com/#auto/zh/%s"
  122. }, {
  123. name: "youdao",
  124. nameZh: "有道词典",
  125. url: "http://dict.youdao.com/search?q=%s",
  126. blank: !0
  127. }, {
  128. name: "bing",
  129. nameZh: "必应翻译",
  130. url: "http://cn.bing.com/dict/search?q=%s"
  131. }, {
  132. name: "forvo",
  133. nameZh: "Forvo发音",
  134. url: "https://zh.forvo.com/search/%s",
  135. blank: !0
  136. }, {
  137. name: "cnki",
  138. nameZh: "CNKI翻译",
  139. url: "http://dict.cnki.net/dict_result.aspx?searchword=%s",
  140. disable: !0
  141. }, {
  142. name: "zdic",
  143. nameZh: "汉典",
  144. url: "http://www.zdic.net/sousuo/?q=%s",
  145. disable: !0
  146. }, {
  147. name: "dict",
  148. nameZh: "海词",
  149. url: "http://dict.cn/%s"
  150. } ]
  151. }, {
  152. nameZh: "开发者",
  153. name: "developer",
  154. list: [ {
  155. name: "MDN",
  156. nameZh: "MDN",
  157. url: "https://developer.mozilla.org/zh-CN/search?q=%s"
  158. }, {
  159. name: "stackoverflow",
  160. nameZh: "stackoverflow",
  161. url: "https://stackoverflow.com/search?q=%s"
  162. }, {
  163. name: "juejin",
  164. nameZh: "掘金",
  165. url: "https://juejin.im/search?query=%s&type=all"
  166. }, {
  167. name: "Can I Use",
  168. nameZh: "Can I Use",
  169. url: "http://caniuse.com/#search=%s",
  170. blank: !0
  171. }, {
  172. name: "GitHub",
  173. nameZh: "GitHub",
  174. url: "https://github.com/search?utf8=✓&q=%s",
  175. blank: !0
  176. }, {
  177. name: "w3c",
  178. nameZh: "w3c",
  179. url: "http://www.runoob.com/?s=%s"
  180. }, {
  181. name: "GreasyFork",
  182. nameZh: "GreasyFork",
  183. url: "https://gf.qytechs.cn/zh-CN/scripts?q=%s&utf8=✓",
  184. blank: !0
  185. } ]
  186. }, {
  187. nameZh: "音乐",
  188. name: "music",
  189. list: [ {
  190. name: "NetEase",
  191. nameZh: "网易音乐",
  192. url: "http://music.163.com/#/search/m/?s=%s"
  193. }, {
  194. name: "1ting",
  195. nameZh: "一听",
  196. url: "http://so.1ting.com/all.do?q=%s"
  197. }, {
  198. name: "xiami",
  199. nameZh: "虾米音乐",
  200. url: "http://www.xiami.com/search?key=%s"
  201. }, {
  202. name: "yinyuetai",
  203. nameZh: "音悦Tai",
  204. url: "http://so.yinyuetai.com/?keyword=%s"
  205. }, {
  206. name: "qq",
  207. nameZh: "QQ音乐",
  208. url: "https://y.qq.com/portal/search.html#page=1&searchid=1&remoteplace=txt.yqq.top&t=song&w=%s",
  209. blank: !0
  210. }, {
  211. name: "baidu",
  212. nameZh: "百度音乐",
  213. url: "http://music.baidu.com/search?ie=utf-8&oe=utf-8&key=%s"
  214. }, {
  215. name: "kuwo",
  216. nameZh: "酷我音乐",
  217. url: "http://sou.kuwo.cn/ws/NSearch?type=all&key=%s",
  218. blank: !0
  219. }, {
  220. name: "kugou",
  221. nameZh: "酷狗",
  222. url: "http://search.5sing.kugou.com/?keyword=%s",
  223. blank: !0
  224. } ]
  225. }, {
  226. nameZh: "新闻",
  227. name: "news",
  228. list: [ {
  229. name: "google",
  230. nameZh: "谷歌中文",
  231. url: "https://news.google.com/search?q=%s&hl=zh-CN&gl=CN&ceid=CN:zh-Hans",
  232. blank: !0
  233. }, {
  234. name: "baidu",
  235. nameZh: "百度新闻",
  236. url: "http://news.baidu.com/ns?word=%s&tn=news&from=news&cl=2&rn=20&ct=1",
  237. blank: !0
  238. }, {
  239. name: "163-baidu",
  240. nameZh: "网易-百度",
  241. url: "https://www.baidu.com/s?wd=%s%20site%3Anews.163.com",
  242. blank: !0
  243. }, {
  244. name: "163-google",
  245. nameZh: "网易-谷歌",
  246. url: "https://www.google.com.hk/search?q=site:news.163.com+%s",
  247. blank: !0
  248. }, {
  249. name: "qq",
  250. nameZh: "腾讯新闻",
  251. url: "https://www.sogou.com/sogou?site=news.qq.com&query=%s",
  252. blank: !0
  253. }, {
  254. name: "ifeng",
  255. nameZh: "凤凰新闻",
  256. url: "http://search.ifeng.com/sofeng/search.action?q=%s",
  257. blank: !0
  258. }, {
  259. name: "CNN",
  260. nameZh: "CNN",
  261. url: "https://edition.cnn.com/search/?q=%s",
  262. blank: !0
  263. }, {
  264. name: "BBC",
  265. nameZh: "BBC",
  266. url: "https://www.bbc.co.uk/search?q=%s",
  267. blank: !0
  268. }, {
  269. name: "Economis",
  270. nameZh: "Economis",
  271. url: "https://www.google.com/search?q=site:www.economist.com%20%s",
  272. blank: !0
  273. }, {
  274. name: "toutiao",
  275. nameZh: "今日头条",
  276. url: "https://www.toutiao.com/search/?keyword=%E4%B8%96%E7%95%8C%E6%9D%AF",
  277. blank: !0
  278. } ]
  279. }, {
  280. nameZh: "社交",
  281. name: "social",
  282. list: [ {
  283. name: "zhihu",
  284. nameZh: "知乎",
  285. url: "http://www.zhihu.com/search?q=%s"
  286. }, {
  287. name: "Twitter",
  288. nameZh: "推特",
  289. url: "https://twitter.com/search/%s"
  290. }, {
  291. name: "douban",
  292. nameZh: "豆瓣",
  293. url: "http://www.douban.com/search?source=suggest&q=%s"
  294. }, {
  295. name: "tieba",
  296. nameZh: "百度贴吧",
  297. url: "http://tieba.baidu.com/f?kw=%s&ie=utf-8",
  298. blank: !0
  299. }, {
  300. name: "qq",
  301. nameZh: "腾讯微博",
  302. url: "http://search.t.qq.com/index.php?k=%s"
  303. }, {
  304. name: "sina",
  305. nameZh: "新浪微博",
  306. url: "http://s.weibo.com/weibo/%s"
  307. }, {
  308. name: "Facebook",
  309. nameZh: "脸书",
  310. url: "https://www.facebook.com/search/results.php?q=%s"
  311. }, {
  312. name: "weixin",
  313. nameZh: "微信搜索",
  314. url: "http://weixin.sogou.com/weixin?ie=utf8&type=2&query=%s"
  315. } ]
  316. }, {
  317. nameZh: "百科",
  318. name: "knowledge",
  319. list: [ {
  320. name: "wiki",
  321. nameZh: "维基",
  322. url: "http://zh.wikipedia.org/wiki/%s"
  323. }, {
  324. name: "baike",
  325. nameZh: "百度百科",
  326. url: "http://baike.baidu.com/search/word?pic=1&sug=1&word=%s",
  327. disable: !1
  328. }, {
  329. name: "wenku",
  330. nameZh: "百度文库",
  331. url: "http://wenku.baidu.com/search?word=%s&ie=utf-8"
  332. }, {
  333. name: "docin",
  334. nameZh: "豆丁文档",
  335. url: "http://www.docin.com/search.do?searchcat=2&searchType_banner=p&nkey=%s",
  336. disable: !0
  337. }, {
  338. name: "iask",
  339. nameZh: "爱问知识",
  340. url: "http://iask.sina.com.cn/search?searchWord=%s",
  341. disable: !0
  342. }, {
  343. name: "moegirl",
  344. nameZh: "萌娘百科",
  345. url: "https://zh.moegirl.org/%s",
  346. blank: !0
  347. }, {
  348. name: "guokr",
  349. nameZh: "果壳",
  350. url: "http://www.guokr.com/search/all/?wd=%s",
  351. blank: !0
  352. }, {
  353. name: "Quora",
  354. nameZh: "Quora",
  355. url: "https://www.quora.com/search?q=%s"
  356. } ]
  357. } ];
  358. document.createElement("a");
  359. function t(e, n, t, r, s, a, o, i, l, c) {
  360. "boolean" != typeof o && (l = i, i = o, o = !1);
  361. const A = "function" == typeof t ? t.options : t;
  362. let d;
  363. if (e && e.render && (A.render = e.render, A.staticRenderFns = e.staticRenderFns,
  364. A._compiled = !0, s && (A.functional = !0)), r && (A._scopeId = r), a ? (d = function(e) {
  365. (e = e || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) || "undefined" == typeof __VUE_SSR_CONTEXT__ || (e = __VUE_SSR_CONTEXT__),
  366. n && n.call(this, l(e)), e && e._registeredComponents && e._registeredComponents.add(a);
  367. }, A._ssrRegister = d) : n && (d = o ? function(e) {
  368. n.call(this, c(e, this.$root.$options.shadowRoot));
  369. } : function(e) {
  370. n.call(this, i(e));
  371. }), d) if (A.functional) {
  372. const e = A.render;
  373. A.render = function(n, t) {
  374. return d.call(t), e(n, t);
  375. };
  376. } else {
  377. const e = A.beforeCreate;
  378. A.beforeCreate = e ? [].concat(e, d) : [ d ];
  379. }
  380. return t;
  381. }
  382. const r = "undefined" != typeof navigator && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());
  383. function s(e) {
  384. return (e, n) => function(e, n) {
  385. const t = r ? n.media || "default" : e, s = o[t] || (o[t] = {
  386. ids: new Set,
  387. styles: []
  388. });
  389. if (!s.ids.has(e)) {
  390. s.ids.add(e);
  391. let t = n.source;
  392. if (n.map && (t += "\n/*# sourceURL=" + n.map.sources[0] + " */", t += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(n.map)))) + " */"),
  393. s.element || (s.element = document.createElement("style"), s.element.type = "text/css",
  394. n.media && s.element.setAttribute("media", n.media), void 0 === a && (a = document.head || document.getElementsByTagName("head")[0]),
  395. a.appendChild(s.element)), "styleSheet" in s.element) s.styles.push(t), s.element.styleSheet.cssText = s.styles.filter(Boolean).join("\n"); else {
  396. const e = s.ids.size - 1, n = document.createTextNode(t), r = s.element.childNodes;
  397. r[e] && s.element.removeChild(r[e]), r.length ? s.element.insertBefore(n, r[e]) : s.element.appendChild(n);
  398. }
  399. }
  400. }(e, n);
  401. }
  402. let a;
  403. const o = {};
  404. const i = {
  405. name: "logo"
  406. };
  407. var l = function() {
  408. var e = this.$createElement;
  409. this._self._c;
  410. return this._m(0);
  411. };
  412. l._withStripped = !0;
  413. const c = t({
  414. render: l,
  415. staticRenderFns: [ function() {
  416. var e = this.$createElement, n = this._self._c || e;
  417. return n("a", {
  418. staticClass: "as-title",
  419. attrs: {
  420. href: "https://github.com/endday/all-search",
  421. target: "_blank"
  422. }
  423. }, [ n("p", {
  424. staticClass: "as-title-inner"
  425. }, [ this._v("\n All Search\n ") ]) ]);
  426. } ]
  427. }, (function(e) {
  428. e && e("data-v-5c453d41_0", {
  429. source: ".as-title {\n text-decoration: none;\n}\n.as-title .as-title-inner {\n font-size: 18px;\n width: 120px;\n height: 30px;\n line-height: 30px;\n font-weight: 600;\n color: #1990fc;\n margin: 0;\n text-align: center;\n cursor: pointer;\n}\n\n/*# sourceMappingURL=logo.vue.map */",
  430. map: {
  431. version: 3,
  432. sources: [ "E:\\project\\all-search\\src\\components\\logo.vue", "logo.vue" ],
  433. names: [],
  434. mappings: "AAoBA;EACA,qBAAA;ACnBA;ADqBA;EACA,eAAA;EACA,YAAA;EACA,YAAA;EACA,iBAAA;EACA,gBAAA;EACA,cAAA;EACA,SAAA;EACA,kBAAA;EACA,eAAA;ACnBA;;AAEA,mCAAmC",
  435. file: "logo.vue",
  436. sourcesContent: [ '<template>\r\n <a class="as-title"\r\n href="https://github.com/endday/all-search"\r\n target="_blank"\r\n >\r\n <p class="as-title-inner">\r\n All Search\r\n </p>\r\n </a>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: \'logo\'\r\n}\r\n<\/script>\r\n\r\n<style lang="scss">\r\n @import "../assets/common";\r\n\r\n .as-title {\r\n text-decoration: none;\r\n\r\n .as-title-inner {\r\n font-size: 18px;\r\n width: 120px;\r\n height: $height;\r\n line-height: $height;\r\n font-weight: 600;\r\n color: #1990fc;\r\n margin: 0;\r\n text-align: center;\r\n cursor: pointer;\r\n }\r\n }\r\n</style>\r\n', ".as-title {\n text-decoration: none;\n}\n.as-title .as-title-inner {\n font-size: 18px;\n width: 120px;\n height: 30px;\n line-height: 30px;\n font-weight: 600;\n color: #1990fc;\n margin: 0;\n text-align: center;\n cursor: pointer;\n}\n\n/*# sourceMappingURL=logo.vue.map */" ]
  437. },
  438. media: void 0
  439. });
  440. }), i, void 0, !1, void 0, !1, s, void 0, void 0);
  441. const A = {
  442. name: "category",
  443. props: {
  444. value: {
  445. type: String,
  446. default: ""
  447. }
  448. },
  449. data: () => ({
  450. engines: n,
  451. show: !1
  452. }),
  453. computed: {
  454. nameZh() {
  455. const e = this.engines.findIndex(e => e.name === this.value);
  456. return e > -1 ? this.engines[e].nameZh : this.engines[0].nameZh;
  457. }
  458. },
  459. methods: {
  460. handleChange(e) {
  461. this.$emit("change", e);
  462. },
  463. openValue() {
  464. this.show = !this.show;
  465. },
  466. selectCategory(e, n) {
  467. this.handleChange(n.name), this.show = !1;
  468. }
  469. }
  470. };
  471. var d = function() {
  472. var e = this, n = e.$createElement, t = e._self._c || n;
  473. return t("div", {
  474. staticClass: "as-select"
  475. }, [ t("div", {
  476. staticClass: "as-select-content",
  477. on: {
  478. click: e.openValue
  479. }
  480. }, [ t("span", {
  481. domProps: {
  482. textContent: e._s(e.nameZh)
  483. }
  484. }) ]), e._v(" "), t("ul", {
  485. directives: [ {
  486. name: "show",
  487. rawName: "v-show",
  488. value: e.show,
  489. expression: "show"
  490. } ],
  491. staticClass: "as-select-list",
  492. class: {
  493. fadeInDown: e.show
  494. }
  495. }, e._l(e.engines, (function(n, r) {
  496. return t("li", {
  497. key: n.index,
  498. domProps: {
  499. textContent: e._s(n.nameZh)
  500. },
  501. on: {
  502. click: function(t) {
  503. return e.selectCategory(r, n);
  504. }
  505. }
  506. });
  507. })), 0), e._v(" "), t("div", {
  508. directives: [ {
  509. name: "show",
  510. rawName: "v-show",
  511. value: e.show,
  512. expression: "show"
  513. } ],
  514. staticClass: "as-select-mask",
  515. on: {
  516. click: function(n) {
  517. e.show = !1;
  518. }
  519. }
  520. }) ]);
  521. };
  522. d._withStripped = !0;
  523. const p = t({
  524. render: d,
  525. staticRenderFns: []
  526. }, (function(e) {
  527. e && e("data-v-4c707c2f_0", {
  528. source: '@charset "UTF-8";\n.as-select {\n position: relative;\n}\n.as-select ul li {\n list-style: none;\n}\n.as-select-content {\n width: 100px;\n height: 30px;\n line-height: 30px;\n font-size: 14px;\n cursor: pointer;\n padding-left: 10px;\n position: relative;\n}\n.as-select-content::after {\n content: " ▾";\n position: absolute;\n right: 12px;\n font-size: 24px;\n color: #999;\n}\n.as-select-list {\n padding: 4px 0;\n min-width: 100px;\n border: 1px solid #e4e7ed;\n border-radius: 4px;\n background-color: #fff;\n box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);\n box-sizing: border-box;\n margin: 5px 0;\n position: absolute;\n z-index: 99;\n}\n.as-select-list li {\n font-size: 14px;\n padding: 0 20px;\n position: relative;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: #606266;\n height: 34px;\n line-height: 34px;\n box-sizing: border-box;\n cursor: pointer;\n}\n.as-select-list li:hover {\n background-color: #f5f7fa;\n}\n.as-select-mask {\n position: fixed;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n}\n\n/*# sourceMappingURL=category.vue.map */',
  529. map: {
  530. version: 3,
  531. sources: [ "category.vue", "E:\\project\\all-search\\src\\components\\category.vue" ],
  532. names: [],
  533. mappings: "AAAA,gBAAgB;ACoEhB;EACA,kBAAA;ADlEA;ACmEA;EACA,gBAAA;ADjEA;ACqEA;EACA,YAAA;EACA,YAAA;EACA,iBAAA;EACA,eAAA;EACA,eAAA;EACA,kBAAA;EACA,kBAAA;ADlEA;ACmEA;EACA,aAAA;EACA,kBAAA;EACA,WAAA;EACA,eAAA;EACA,WAAA;ADjEA;ACqEA;EACA,cAAA;EACA,gBAAA;EACA,yBAAA;EACA,kBAAA;EACA,sBAAA;EACA,2CAAA;EACA,sBAAA;EACA,aAAA;EACA,kBAAA;EACA,WAAA;ADlEA;ACmEA;EACA,eAAA;EACA,eAAA;EACA,kBAAA;EACA,mBAAA;EACA,gBAAA;EACA,uBAAA;EACA,cAAA;EACA,YAAA;EACA,iBAAA;EACA,sBAAA;EACA,eAAA;ADjEA;ACkEA;EACA,yBAAA;ADhEA;ACqEA;EACA,eAAA;EACA,MAAA;EACA,SAAA;EACA,QAAA;EACA,OAAA;ADlEA;;AAEA,uCAAuC",
  534. file: "category.vue",
  535. sourcesContent: [ '@charset "UTF-8";\n.as-select {\n position: relative;\n}\n.as-select ul li {\n list-style: none;\n}\n\n.as-select-content {\n width: 100px;\n height: 30px;\n line-height: 30px;\n font-size: 14px;\n cursor: pointer;\n padding-left: 10px;\n position: relative;\n}\n.as-select-content::after {\n content: " ▾";\n position: absolute;\n right: 12px;\n font-size: 24px;\n color: #999;\n}\n\n.as-select-list {\n padding: 4px 0;\n min-width: 100px;\n border: 1px solid #e4e7ed;\n border-radius: 4px;\n background-color: #fff;\n box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);\n box-sizing: border-box;\n margin: 5px 0;\n position: absolute;\n z-index: 99;\n}\n.as-select-list li {\n font-size: 14px;\n padding: 0 20px;\n position: relative;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: #606266;\n height: 34px;\n line-height: 34px;\n box-sizing: border-box;\n cursor: pointer;\n}\n.as-select-list li:hover {\n background-color: #f5f7fa;\n}\n\n.as-select-mask {\n position: fixed;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n}\n\n/*# sourceMappingURL=category.vue.map */', '<template>\r\n <div class="as-select">\r\n <div class="as-select-content"\r\n @click="openValue">\r\n <span v-text="nameZh"></span>\r\n </div>\r\n <ul class="as-select-list"\r\n :class="{ fadeInDown: show }"\r\n v-show="show">\r\n <li\r\n v-for="(item,index) in engines"\r\n :key="item.index"\r\n v-text="item.nameZh"\r\n @click="selectCategory(index,item)">\r\n </li>\r\n </ul>\r\n <div class="as-select-mask"\r\n @click="show = false"\r\n v-show="show">\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport engines from \'../config/engines\'\r\n\r\nexport default {\r\n name: \'category\',\r\n props: {\r\n value: {\r\n type: String,\r\n default: \'\'\r\n }\r\n },\r\n data () {\r\n return {\r\n engines,\r\n show: false\r\n }\r\n },\r\n computed: {\r\n nameZh () {\r\n const i = this.engines.findIndex(item => item.name === this.value)\r\n if (i > -1) {\r\n return this.engines[i].nameZh\r\n } else {\r\n return this.engines[0].nameZh\r\n }\r\n }\r\n },\r\n methods: {\r\n handleChange (val) {\r\n this.$emit(\'change\', val)\r\n },\r\n openValue () {\r\n this.show = !this.show\r\n },\r\n selectCategory (index, item) {\r\n this.handleChange(item.name)\r\n this.show = false\r\n }\r\n }\r\n}\r\n<\/script>\r\n\r\n<style lang="scss">\r\n @import "../assets/common";\r\n\r\n .as-select {\r\n position: relative;\r\n ul li {\r\n list-style: none;\r\n }\r\n }\r\n\r\n .as-select-content {\r\n width: 100px;\r\n height: $height;\r\n line-height: $height;\r\n font-size: 14px;\r\n cursor: pointer;\r\n padding-left: 10px;\r\n position: relative;\r\n &::after {\r\n content: \' ▾\';\r\n position: absolute;\r\n right: 12px;\r\n font-size: 24px;\r\n color: #999;\r\n }\r\n }\r\n\r\n .as-select-list {\r\n padding: 4px 0;\r\n min-width: 100px;\r\n border: 1px solid #e4e7ed;\r\n border-radius: 4px;\r\n background-color: #fff;\r\n box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);\r\n box-sizing: border-box;\r\n margin: 5px 0;\r\n position: absolute;\r\n z-index: 99;\r\n li {\r\n font-size: 14px;\r\n padding: 0 20px;\r\n position: relative;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n color: #606266;\r\n height: 34px;\r\n line-height: 34px;\r\n box-sizing: border-box;\r\n cursor: pointer;\r\n &:hover {\r\n background-color: #f5f7fa;\r\n }\r\n }\r\n }\r\n\r\n .as-select-mask {\r\n position: fixed;\r\n top: 0;\r\n bottom: 0;\r\n right: 0;\r\n left: 0;\r\n }\r\n</style>\r\n' ]
  536. },
  537. media: void 0
  538. });
  539. }), A, void 0, !1, void 0, !1, s, void 0, void 0);
  540. const h = {
  541. name: "site-menu",
  542. props: {
  543. menus: {
  544. type: Array,
  545. default: () => []
  546. }
  547. },
  548. data: () => ({}),
  549. methods: {
  550. getKeyword() {
  551. return this.$root.currentSite.keyword ? this.$root.currentSite.keyword() : function() {
  552. const e = document.querySelector("input[type='search'],input[type='text'][autocomplete='off'],input[autocomplete='off']:not([type])") || document.querySelector("input[type='text'][name][value],input[name][value]:not([type])");
  553. return e ? "INPUT" === e.nodeName || "textarea" === e.localName ? e.value : e.textContent : "";
  554. }();
  555. },
  556. handleClick(e) {
  557. this.$emit("click", e);
  558. const n = this.getKeyword();
  559. window.location.href = e.url.replace("%s", n);
  560. },
  561. handleMouseWheelClick(e, n) {
  562. if (1 === e.button) {
  563. const e = this.getKeyword();
  564. window.open(n.url.replace("%s", e));
  565. }
  566. }
  567. }
  568. };
  569. var m = function() {
  570. var e = this, n = e.$createElement, t = e._self._c || n;
  571. return t("div", {
  572. staticClass: "as-menu-container"
  573. }, [ t("ul", {
  574. staticClass: "as-menu"
  575. }, e._l(e.menus, (function(n, r) {
  576. return t("li", {
  577. key: r,
  578. staticClass: "as-submenu",
  579. on: {
  580. click: function(t) {
  581. return e.handleClick(n);
  582. },
  583. mousedown: function(t) {
  584. return e.handleMouseWheelClick(t, n);
  585. }
  586. }
  587. }, [ t("p", {
  588. staticClass: "as-submenu-title",
  589. domProps: {
  590. textContent: e._s(n.nameZh)
  591. }
  592. }) ]);
  593. })), 0) ]);
  594. };
  595. m._withStripped = !0;
  596. const u = t({
  597. render: m,
  598. staticRenderFns: []
  599. }, (function(e) {
  600. e && e("data-v-33eabb56_0", {
  601. source: ".as-menu-container {\n display: flex;\n flex: 1;\n}\n.as-menu {\n display: flex;\n line-height: 30px;\n width: 100%;\n height: 100%;\n padding: 0;\n margin-top: -1px;\n margin-bottom: 0;\n white-space: nowrap;\n border: 0;\n box-shadow: none;\n background-color: #fff;\n}\n.as-submenu {\n display: flex;\n align-items: center;\n position: relative;\n top: 1px;\n}\n.as-submenu-title {\n position: relative;\n display: block;\n margin: 0;\n padding: 0 20px;\n white-space: nowrap;\n cursor: pointer;\n font-size: 14px;\n}\n.as-submenu-title:hover {\n color: #1890ff;\n}\n\n/*# sourceMappingURL=menu.vue.map */",
  602. map: {
  603. version: 3,
  604. sources: [ "E:\\project\\all-search\\src\\components\\menu.vue", "menu.vue" ],
  605. names: [],
  606. mappings: "AA2DA;EACA,aAAA;EACA,OAAA;AC1DA;AD6DA;EACA,aAAA;EACA,iBAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,gBAAA;EACA,gBAAA;EACA,mBAAA;EACA,SAAA;EACA,gBAAA;EACA,sBAAA;AC1DA;AD6DA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;EACA,QAAA;AC1DA;AD6DA;EACA,kBAAA;EACA,cAAA;EACA,SAAA;EACA,eAAA;EACA,mBAAA;EACA,eAAA;EACA,eAAA;AC1DA;AD4DA;EACA,cAAA;AC1DA;;AAEA,mCAAmC",
  607. file: "menu.vue",
  608. sourcesContent: [ '<template>\r\n <div class="as-menu-container">\r\n <ul class="as-menu">\r\n <li class="as-submenu"\r\n v-for="(item, i) in menus"\r\n :key="i"\r\n @click="handleClick(item)"\r\n @mousedown="handleMouseWheelClick($event, item)">\r\n <p class="as-submenu-title"\r\n v-text="item.nameZh">\r\n </p>\r\n </li>\r\n </ul>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { getKeyword } from \'../util\'\r\n\r\nexport default {\r\n name: \'site-menu\',\r\n props: {\r\n menus: {\r\n type: Array,\r\n default () {\r\n return []\r\n }\r\n }\r\n },\r\n data () {\r\n return {}\r\n },\r\n methods: {\r\n getKeyword () {\r\n if (this.$root.currentSite.keyword) {\r\n return this.$root.currentSite.keyword()\r\n } else {\r\n return getKeyword()\r\n }\r\n },\r\n handleClick (item) {\r\n this.$emit(\'click\', item)\r\n const keyword = this.getKeyword()\r\n window.location.href = item.url.replace(\'%s\', keyword)\r\n },\r\n handleMouseWheelClick (event, item) {\r\n const btnNum = event.button\r\n if (btnNum === 1) {\r\n const keyword = this.getKeyword()\r\n window.open(item.url.replace(\'%s\', keyword))\r\n }\r\n }\r\n }\r\n}\r\n<\/script>\r\n\r\n<style lang="scss">\r\n @import "../assets/common";\r\n\r\n .as-menu-container {\r\n display: flex;\r\n flex: 1;\r\n }\r\n\r\n .as-menu {\r\n display: flex;\r\n line-height: $height;\r\n width: 100%;\r\n height: 100%;\r\n padding: 0;\r\n margin-top: -1px;\r\n margin-bottom: 0;\r\n white-space: nowrap;\r\n border: 0;\r\n box-shadow: none;\r\n background-color: #fff;\r\n }\r\n\r\n .as-submenu {\r\n display: flex;\r\n align-items: center;\r\n position: relative;\r\n top: 1px;\r\n }\r\n\r\n .as-submenu-title {\r\n position: relative;\r\n display: block;\r\n margin: 0;\r\n padding: 0 20px;\r\n white-space: nowrap;\r\n cursor: pointer;\r\n font-size: 14px;\r\n\r\n &:hover {\r\n color: #1890ff;\r\n }\r\n }\r\n</style>\r\n', ".as-menu-container {\n display: flex;\n flex: 1;\n}\n\n.as-menu {\n display: flex;\n line-height: 30px;\n width: 100%;\n height: 100%;\n padding: 0;\n margin-top: -1px;\n margin-bottom: 0;\n white-space: nowrap;\n border: 0;\n box-shadow: none;\n background-color: #fff;\n}\n\n.as-submenu {\n display: flex;\n align-items: center;\n position: relative;\n top: 1px;\n}\n\n.as-submenu-title {\n position: relative;\n display: block;\n margin: 0;\n padding: 0 20px;\n white-space: nowrap;\n cursor: pointer;\n font-size: 14px;\n}\n.as-submenu-title:hover {\n color: #1890ff;\n}\n\n/*# sourceMappingURL=menu.vue.map */" ]
  609. },
  610. media: void 0
  611. });
  612. }), h, void 0, !1, void 0, !1, s, void 0, void 0);
  613. const g = {
  614. name: "x-dialog",
  615. props: {
  616. visible: {
  617. type: Boolean,
  618. default: !1
  619. },
  620. title: {
  621. type: String,
  622. default: ""
  623. }
  624. },
  625. methods: {
  626. handleClose() {
  627. this.$emit("update:visible", !1);
  628. }
  629. }
  630. };
  631. var b = function() {
  632. var e = this, n = e.$createElement, t = e._self._c || n;
  633. return t("div", {
  634. directives: [ {
  635. name: "show",
  636. rawName: "v-show",
  637. value: e.visible,
  638. expression: "visible"
  639. } ],
  640. staticClass: "as-dialog"
  641. }, [ t("div", {
  642. staticClass: "as-dialog-container"
  643. }, [ t("div", {
  644. staticClass: "as-dialog__header"
  645. }, [ t("p", {
  646. domProps: {
  647. textContent: e._s(e.title)
  648. }
  649. }), e._v(" "), t("span", {
  650. staticClass: "as-dialog__close",
  651. on: {
  652. click: e.handleClose
  653. }
  654. }) ]), e._v(" "), t("div", {
  655. staticClass: "as-dialog__body"
  656. }, [ e._t("default") ], 2), e._v(" "), t("div", {
  657. staticClass: "as-dialog__footer"
  658. }) ]), e._v(" "), t("div", {
  659. staticClass: "as-dialog__mask",
  660. on: {
  661. click: e.handleClose
  662. }
  663. }) ]);
  664. };
  665. b._withStripped = !0;
  666. const w = {
  667. name: "all-search",
  668. components: {
  669. logo: c,
  670. category: p,
  671. siteMenu: u,
  672. xDialog: t({
  673. render: b,
  674. staticRenderFns: []
  675. }, (function(e) {
  676. e && e("data-v-dee8096c_0", {
  677. source: '@charset "UTF-8";\n.as-dialog {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n overflow: auto;\n margin: 0;\n}\n.as-dialog__mask {\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n opacity: 0.5;\n background: #000;\n}\n.as-dialog-container {\n position: relative;\n background: #fff;\n border-radius: 2px;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);\n box-sizing: border-box;\n width: 50%;\n z-index: 99;\n margin: 40vh auto 50px;\n transform: translateY(-40%);\n}\n.as-dialog__header {\n padding: 20px 20px 10px;\n position: relative;\n}\n.as-dialog__header p {\n margin: 0;\n line-height: 24px;\n height: 24px;\n}\n.as-dialog__body {\n padding: 30px 20px;\n color: #606266;\n font-size: 14px;\n word-break: break-all;\n}\n.as-dialog__footer {\n padding: 10px 20px 20px;\n text-align: right;\n box-sizing: border-box;\n}\n.as-dialog__close {\n display: inline-block;\n position: absolute;\n top: 16px;\n right: 24px;\n padding: 0;\n background: transparent;\n cursor: pointer;\n font-size: 16px;\n color: #909399;\n}\n.as-dialog__close:before {\n content: "✖";\n}\n\n/*# sourceMappingURL=dialog.vue.map */',
  678. map: {
  679. version: 3,
  680. sources: [ "dialog.vue", "E:\\project\\all-search\\src\\components\\dialog.vue" ],
  681. names: [],
  682. mappings: "AAAA,gBAAgB;ACyChB;EACA,eAAA;EACA,MAAA;EACA,QAAA;EACA,SAAA;EACA,OAAA;EACA,cAAA;EACA,SAAA;ADvCA;AC0CA;EACA,eAAA;EACA,OAAA;EACA,MAAA;EACA,WAAA;EACA,YAAA;EACA,YAAA;EACA,gBAAA;ADvCA;AC0CA;EACA,kBAAA;EACA,gBAAA;EACA,kBAAA;EACA,wCAAA;EACA,sBAAA;EACA,UAAA;EACA,WAAA;EACA,sBAAA;EACA,2BAAA;ADvCA;AC0CA;EACA,uBAAA;EACA,kBAAA;ADvCA;ACwCA;EACA,SAAA;EACA,iBAAA;EACA,YAAA;ADtCA;AC0CA;EACA,kBAAA;EACA,cAAA;EACA,eAAA;EACA,qBAAA;ADvCA;AC0CA;EACA,uBAAA;EACA,iBAAA;EACA,sBAAA;ADvCA;AC0CA;EACA,qBAAA;EACA,kBAAA;EACA,SAAA;EACA,WAAA;EACA,UAAA;EACA,uBAAA;EACA,eAAA;EACA,eAAA;EACA,cAAA;ADvCA;ACwCA;EACA,YAAA;ADtCA;;AAEA,qCAAqC",
  683. file: "dialog.vue",
  684. sourcesContent: [ '@charset "UTF-8";\n.as-dialog {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n overflow: auto;\n margin: 0;\n}\n\n.as-dialog__mask {\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n opacity: 0.5;\n background: #000;\n}\n\n.as-dialog-container {\n position: relative;\n background: #fff;\n border-radius: 2px;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);\n box-sizing: border-box;\n width: 50%;\n z-index: 99;\n margin: 40vh auto 50px;\n transform: translateY(-40%);\n}\n\n.as-dialog__header {\n padding: 20px 20px 10px;\n position: relative;\n}\n.as-dialog__header p {\n margin: 0;\n line-height: 24px;\n height: 24px;\n}\n\n.as-dialog__body {\n padding: 30px 20px;\n color: #606266;\n font-size: 14px;\n word-break: break-all;\n}\n\n.as-dialog__footer {\n padding: 10px 20px 20px;\n text-align: right;\n box-sizing: border-box;\n}\n\n.as-dialog__close {\n display: inline-block;\n position: absolute;\n top: 16px;\n right: 24px;\n padding: 0;\n background: transparent;\n cursor: pointer;\n font-size: 16px;\n color: #909399;\n}\n.as-dialog__close:before {\n content: "✖";\n}\n\n/*# sourceMappingURL=dialog.vue.map */', '<template>\r\n <div class="as-dialog" v-show="visible">\r\n <div class="as-dialog-container">\r\n <div class="as-dialog__header">\r\n <p v-text="title"></p>\r\n <span class="as-dialog__close"\r\n @click="handleClose">\r\n </span>\r\n </div>\r\n <div class="as-dialog__body">\r\n <slot></slot>\r\n </div>\r\n <div class="as-dialog__footer"></div>\r\n </div>\r\n <div class="as-dialog__mask"\r\n @click="handleClose"></div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: \'x-dialog\',\r\n props: {\r\n visible: {\r\n type: Boolean,\r\n default: false\r\n },\r\n title: {\r\n type: String,\r\n default: \'\'\r\n }\r\n },\r\n methods: {\r\n handleClose () {\r\n this.$emit(\'update:visible\', false)\r\n }\r\n }\r\n}\r\n<\/script>\r\n\r\n<style lang="scss">\r\n .as-dialog {\r\n position: fixed;\r\n top: 0;\r\n right: 0;\r\n bottom: 0;\r\n left: 0;\r\n overflow: auto;\r\n margin: 0;\r\n }\r\n\r\n .as-dialog__mask {\r\n position: fixed;\r\n left: 0;\r\n top: 0;\r\n width: 100%;\r\n height: 100%;\r\n opacity: .5;\r\n background: #000;\r\n }\r\n\r\n .as-dialog-container {\r\n position: relative;\r\n background: #fff;\r\n border-radius: 2px;\r\n box-shadow: 0 1px 3px rgba(0, 0, 0, .3);\r\n box-sizing: border-box;\r\n width: 50%;\r\n z-index: 99;\r\n margin: 40vh auto 50px;\r\n transform: translateY(-40%);\r\n }\r\n\r\n .as-dialog__header {\r\n padding: 20px 20px 10px;\r\n position: relative;\r\n p {\r\n margin: 0;\r\n line-height: 24px;\r\n height: 24px;\r\n }\r\n }\r\n\r\n .as-dialog__body {\r\n padding: 30px 20px;\r\n color: #606266;\r\n font-size: 14px;\r\n word-break: break-all;\r\n }\r\n\r\n .as-dialog__footer {\r\n padding: 10px 20px 20px;\r\n text-align: right;\r\n box-sizing: border-box;\r\n }\r\n\r\n .as-dialog__close {\r\n display: inline-block;\r\n position: absolute;\r\n top: 16px;\r\n right: 24px;\r\n padding: 0;\r\n background: transparent;\r\n cursor: pointer;\r\n font-size: 16px;\r\n color: #909399;\r\n &:before {\r\n content: "\\2716";\r\n }\r\n }\r\n</style>\r\n' ]
  685. },
  686. media: void 0
  687. });
  688. }), g, void 0, !1, void 0, !1, s, void 0, void 0)
  689. },
  690. data: () => ({
  691. engines: n,
  692. categoryName: "search",
  693. visible: !1
  694. }),
  695. computed: {
  696. menus() {
  697. const e = this.engines.findIndex(e => e.name === this.categoryName);
  698. return e > -1 ? this.engines[e].list : this.engines[0].list;
  699. }
  700. },
  701. created() {
  702. this.categoryName = function(e) {
  703. if (window.GM_getValue) return window.GM_getValue(e);
  704. const n = window.localStorage.getItem(e);
  705. return n ? JSON.parse(n) : null;
  706. }("__allSearch__categoryName") || this.categoryName;
  707. },
  708. methods: {
  709. handleClick(e) {
  710. this.$emit("menu-click", e);
  711. },
  712. changeCategory(e) {
  713. !function(e, n) {
  714. if (window.GM_setValue) window.GM_setValue(e, n); else {
  715. const t = JSON.stringify(n);
  716. t && window.localStorage.setItem(e, t);
  717. }
  718. }("__allSearch__categoryName", e), this.categoryName = e;
  719. },
  720. openSetDialog() {
  721. this.visible = !0;
  722. }
  723. }
  724. };
  725. var f = function() {
  726. var e = this, n = e.$createElement, t = e._self._c || n;
  727. return t("header", {
  728. attrs: {
  729. id: "all-search"
  730. }
  731. }, [ t("logo"), e._v(" "), t("category", {
  732. attrs: {
  733. value: e.categoryName
  734. },
  735. on: {
  736. change: e.changeCategory
  737. }
  738. }), e._v(" "), t("site-menu", {
  739. attrs: {
  740. menus: e.menus
  741. }
  742. }), e._v(" "), t("div", {
  743. staticClass: "setting",
  744. on: {
  745. click: e.openSetDialog
  746. }
  747. }, [ e._v("设置") ]), e._v(" "), t("x-dialog", {
  748. attrs: {
  749. visible: e.visible
  750. },
  751. on: {
  752. "update:visible": function(n) {
  753. e.visible = n;
  754. }
  755. }
  756. }) ], 1);
  757. };
  758. f._withStripped = !0;
  759. const y = t({
  760. render: f,
  761. staticRenderFns: []
  762. }, (function(e) {
  763. e && e("data-v-fab43328_0", {
  764. source: 'body {\n margin-top: 30px;\n}\n#all-search {\n height: 30px;\n width: 100%;\n position: fixed;\n top: 0;\n z-index: 999999;\n display: flex;\n border-bottom: 1px #e8e8e8 solid;\n background-color: #fff;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n}\n.setting {\n padding: 0 20px;\n /*display: flex;*/\n align-items: center;\n white-space: nowrap;\n cursor: pointer;\n font-size: 14px;\n display: none;\n}\n\n/*# sourceMappingURL=App.vue.map */',
  765. map: {
  766. version: 3,
  767. sources: [ "E:\\project\\all-search\\src\\App.vue", "App.vue" ],
  768. names: [],
  769. mappings: "AAgEA;EACA,gBAAA;AC/DA;ADkEA;EACA,YAAA;EACA,WAAA;EACA,eAAA;EACA,MAAA;EACA,eAAA;EACA,aAAA;EACA,gCAAA;EACA,sBAAA;EACA,kMAAA;AC/DA;ADkEA;EACA,eAAA;EACA,iBAAA;EACA,mBAAA;EACA,mBAAA;EACA,eAAA;EACA,eAAA;EACA,aAAA;AC/DA;;AAEA,kCAAkC",
  770. file: "App.vue",
  771. sourcesContent: [ "<template>\r\n <header id=\"all-search\">\r\n <logo/>\r\n <category :value=\"categoryName\"\r\n @change=\"changeCategory\"/>\r\n <site-menu :menus=\"menus\"/>\r\n <div class=\"setting\" @click=\"openSetDialog\">设置</div>\r\n <x-dialog :visible.sync=\"visible\"></x-dialog>\r\n </header>\r\n</template>\r\n\r\n<script>\r\nimport engines from './config/engines/index.js'\r\nimport { getSession, setSession } from './util'\r\nimport logo from './components/logo.vue'\r\nimport category from './components/category.vue'\r\nimport siteMenu from './components/menu.vue'\r\nimport xDialog from './components/dialog.vue'\r\n\r\nexport default {\r\n name: 'all-search',\r\n components: {\r\n logo,\r\n category,\r\n siteMenu,\r\n xDialog\r\n },\r\n data () {\r\n return {\r\n engines,\r\n categoryName: 'search',\r\n visible: false\r\n }\r\n },\r\n computed: {\r\n menus () {\r\n const i = this.engines.findIndex(item => item.name === this.categoryName)\r\n if (i > -1) {\r\n return this.engines[i].list\r\n }\r\n return this.engines[0].list\r\n }\r\n },\r\n created () {\r\n this.categoryName = getSession('__allSearch__categoryName') || this.categoryName\r\n },\r\n methods: {\r\n handleClick (tab) {\r\n this.$emit('menu-click', tab)\r\n },\r\n changeCategory (name) {\r\n setSession('__allSearch__categoryName', name)\r\n this.categoryName = name\r\n },\r\n openSetDialog () {\r\n this.visible = true\r\n }\r\n }\r\n}\r\n<\/script>\r\n\r\n<style lang=\"scss\">\r\n @import \"./assets/common\";\r\n\r\n body {\r\n margin-top: $height;\r\n }\r\n\r\n #all-search {\r\n height: $height;\r\n width: 100%;\r\n position: fixed;\r\n top: 0;\r\n z-index: 999999;\r\n display: flex;\r\n border-bottom: 1px #e8e8e8 solid;\r\n background-color: #fff;\r\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';\r\n }\r\n\r\n .setting {\r\n padding: 0 20px;\r\n /*display: flex;*/\r\n align-items: center;\r\n white-space: nowrap;\r\n cursor: pointer;\r\n font-size: 14px;\r\n display: none;\r\n }\r\n</style>\r\n", 'body {\n margin-top: 30px;\n}\n\n#all-search {\n height: 30px;\n width: 100%;\n position: fixed;\n top: 0;\n z-index: 999999;\n display: flex;\n border-bottom: 1px #e8e8e8 solid;\n background-color: #fff;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n}\n\n.setting {\n padding: 0 20px;\n /*display: flex;*/\n align-items: center;\n white-space: nowrap;\n cursor: pointer;\n font-size: 14px;\n display: none;\n}\n\n/*# sourceMappingURL=App.vue.map */' ]
  772. },
  773. media: void 0
  774. });
  775. }), w, void 0, !1, void 0, !1, s, void 0, void 0), x = [ "endday.github.io", "endday.gitee.io", "localhost" ];
  776. const C = {
  777. url: "",
  778. enabled: !1,
  779. style: "",
  780. keyword: null
  781. }, v = [ {
  782. url: /^https?:\/\/www\.google(?:\.[A-z]{2,3}){1,2}\/[^?]+\?(?!tbm=)(?:&?q=|(?:[^#](?!&tbm=))+?&q=)(?:.(?!&tbm=))*$/,
  783. enabled: !0,
  784. style: ".srp #searchform:not(.minidiv){top: 56px !important;} .srp .minidiv{top: 36px !important;}"
  785. }, {
  786. url: /^https?:\/\/www\.google(?:\.[A-z]{2,3}){1,2}\/[^#]*#(?:&?q=|.+?&q=).+/,
  787. enabled: !0,
  788. style: ""
  789. }, {
  790. url: /^https?:\/\/www\.baidu\.com\/(?:s|baidu)/,
  791. enabled: !0,
  792. style: ""
  793. }, {
  794. url: /^https?:\/\/[^.]*\.bing\.com\/search/,
  795. enabled: !0,
  796. style: ""
  797. }, {
  798. url: /^https?:\/\/duckduckgo\.com\/*/i,
  799. enabled: !0,
  800. style: ""
  801. }, {
  802. url: /^https?:\/\/search\.yahoo\.com\/search/i,
  803. enabled: !0,
  804. style: ""
  805. }, {
  806. url: /^https?:\/\/tw\.search\.yahoo\.com\/search/i,
  807. enabled: !0,
  808. style: ""
  809. }, {
  810. url: /^https?:\/\/searx\.me\/\?q/i,
  811. enabled: !0,
  812. style: ""
  813. }, {
  814. url: /^https?:\/\/www\.sogou\.com\/(?:web|s)/,
  815. enabled: !0,
  816. style: ".header { top: 30px }"
  817. }, {
  818. url: /^https?:\/\/yandex\.com\/search/i,
  819. enabled: !0,
  820. style: "body { margin: 30px!important; }"
  821. }, {
  822. url: /^https?:\/\/www\.startpage\.com\/do\/asearch/i,
  823. enabled: !0,
  824. style: ""
  825. }, {
  826. url: /^https?:\/\/mijisou.com\/\?q/i,
  827. enabled: !0,
  828. style: ".search-page{top: 36px} .searx-navbar{top: 48px!important;}"
  829. }, {
  830. url: /^https?:\/\/google\.infinitynewtab\.com\/\?q/i,
  831. enabled: !0,
  832. style: ""
  833. }, {
  834. url: /^https?:\/\/www\.dogedoge\.com\/results\?q/i,
  835. enabled: !0,
  836. style: ""
  837. }, {
  838. url: /^https?:\/\/baike\.baidu\.com\/item/,
  839. enabled: !0,
  840. style: ""
  841. }, {
  842. url: /^https?:\/\/baike\.baidu\.com\/search/,
  843. enabled: !0,
  844. style: ""
  845. }, {
  846. url: /^https?:\/\/wenku\.baidu\.com\/search/i,
  847. enabled: !0,
  848. style: ""
  849. }, {
  850. url: /^https?:\/\/zhidao\.baidu\.com\/search/i,
  851. enabled: !0,
  852. style: ""
  853. }, {
  854. url: /^https?:\/\/\D{2,5}\.wikipedia\.org\/wiki/i,
  855. enabled: !0,
  856. style: ""
  857. }, {
  858. url: /^https?:\/\/www\.zhihu\.com\/search\?/i,
  859. enabled: !0,
  860. style: ""
  861. }, {
  862. url: /^https?:\/\/www\.so\.com\/s/i,
  863. enabled: !0,
  864. style: ""
  865. }, {
  866. url: /^https?:\/\/so\.baike\.com\/doc/i,
  867. enabled: !0,
  868. style: ""
  869. }, {
  870. url: /^https?:\/\/www\.baike\.com\/wiki/i,
  871. enabled: !0,
  872. style: ""
  873. }, {
  874. url: /^https?:\/\/www\.docin\.com\/search\.do/,
  875. enabled: !0,
  876. style: ""
  877. }, {
  878. url: /^https?:\/\/zhihu\.sogou\.com\/zhihu/,
  879. enabled: !0,
  880. style: ".header {top:30px}"
  881. }, {
  882. url: /^https?:\/\/weixin\.sogou\.com\/weixin\?/,
  883. enabled: !0,
  884. style: ""
  885. }, {
  886. url: /^https?:\/\/www\.quora\.com\/search\?/i,
  887. enabled: !0,
  888. style: ""
  889. }, {
  890. url: /^https?:\/\/stackoverflow\.com\/search\?/i,
  891. enabled: !0,
  892. style: ""
  893. }, {
  894. url: /^https?:\/\/www\.soku\.com\/search_video\//,
  895. enabled: !0,
  896. style: ""
  897. }, {
  898. url: /^https?:\/\/www\.soku\.com\/t\/nisearch\//,
  899. enabled: !0,
  900. style: ""
  901. }, {
  902. url: /^https?:\/\/search\.bilibili\.com\/all/,
  903. enabled: !0,
  904. style: ""
  905. }, {
  906. url: /^https?:\/\/www\.acfun\.cn\/search/,
  907. enabled: !0,
  908. style: ""
  909. }, {
  910. url: /^https?:\/\/www\.youtube\.com\/results/,
  911. enabled: !0,
  912. style: ""
  913. }, {
  914. url: /^https?:\/\/www\.nicovideo\.jp\/search\//,
  915. enabled: !0,
  916. style: ""
  917. }, {
  918. url: /^https?:\/\/so\.iqiyi\.com\/so\/q/,
  919. enabled: !0,
  920. style: ""
  921. }, {
  922. url: /^https?:\/\/v\.qq\.com\/x\/search/i,
  923. enabled: !0,
  924. style: ""
  925. }, {
  926. url: /^https?:\/\/music\.baidu\.com\/search/,
  927. enabled: !0,
  928. style: ""
  929. }, {
  930. url: /^https?:\/\/so\.1ting\.com\/all\.do/,
  931. enabled: !0,
  932. style: ""
  933. }, {
  934. url: /^https?:\/\/www\.xiami\.com\/search/,
  935. enabled: !0,
  936. style: ""
  937. }, {
  938. url: /^https?:\/\/s\.music\.qq\.com/i,
  939. enabled: !0,
  940. style: ""
  941. }, {
  942. url: /^https?:\/\/music\.163\.com\/.*?#\/search/i,
  943. enabled: !0,
  944. style: ""
  945. }, {
  946. url: /^https?:\/\/so\.yinyuetai\.com\/\?keyword/,
  947. enabled: !0,
  948. style: ""
  949. }, {
  950. url: /^https?:\/\/image\.baidu\.com\/search/i,
  951. enabled: !0,
  952. style: ""
  953. }, {
  954. url: /^https?:\/\/\w{2,10}\.google(?:\.\D{1,3}){1,2}\/[^?]+\?.*&tbm=isch/i,
  955. enabled: !0,
  956. style: ""
  957. }, {
  958. url: /^https?:\/\/.*\.bing\.com\/images\/search/i,
  959. enabled: !0,
  960. style: ""
  961. }, {
  962. url: /^https?:\/\/www\.flickr\.com\/search\//,
  963. enabled: !0,
  964. style: ""
  965. }, {
  966. url: /^http:\/\/www\.pixiv\.net\/search\.php/i,
  967. enabled: !0,
  968. style: ""
  969. }, {
  970. url: /^https?:\/\/huaban\.com\/search\/\?/,
  971. enabled: !0,
  972. style: ""
  973. }, {
  974. url: /^https?:\/\/www\.pinterest\.com\/search\//,
  975. enabled: !0,
  976. style: ""
  977. }, {
  978. url: /^https?:\/\/thepiratebay\.org\/search/i,
  979. enabled: !0,
  980. style: ""
  981. }, {
  982. url: /^https?:\/\/share\.dmhy\.org\/topics\/list\?keyword=/i,
  983. enabled: !0,
  984. style: ""
  985. }, {
  986. url: /^https?:\/\/www\.ed2000\.com\/filelist\.asp/i,
  987. enabled: !0,
  988. style: ""
  989. }, {
  990. url: /^https?:\/\/www\.zimuzu\.tv\/search\//,
  991. enabled: !0,
  992. style: ""
  993. }, {
  994. url: /^https?:\/\/so\.cqp\.cc\/search/i,
  995. enabled: !0,
  996. style: ""
  997. }, {
  998. url: /^https?:\/\/subhd\.com\/search/i,
  999. enabled: !0,
  1000. style: ""
  1001. }, {
  1002. url: /^https?:\/\/translate\.google(?:\.\D{1,4}){1,2}/i,
  1003. enabled: !0,
  1004. style: ""
  1005. }, {
  1006. url: /^https?:\/\/fanyi\.baidu\.com/i,
  1007. enabled: !0,
  1008. style: "",
  1009. keyword: () => document.getElementById("baidu_translate_input").value
  1010. }, {
  1011. url: /^https?:\/\/.*\.bing\.com\/dict\/search\?q=/i,
  1012. enabled: !0,
  1013. style: ""
  1014. }, {
  1015. url: /^https?:\/\/dict\.youdao\.com\/search/i,
  1016. enabled: !0,
  1017. style: ""
  1018. }, {
  1019. url: /^https?:\/\/dict\.youdao\.com\/w/i,
  1020. enabled: !0,
  1021. style: ""
  1022. }, {
  1023. url: /^https?:\/\/dict\.cn\/./,
  1024. enabled: !0,
  1025. style: ""
  1026. }, {
  1027. url: /^https?:\/\/s\.taobao\.com\/search/,
  1028. enabled: !0,
  1029. style: ""
  1030. }, {
  1031. url: /^https?:\/\/list\.tmall\.com\/search_product\.htm.*from=chaoshi/i,
  1032. enabled: !0,
  1033. style: ""
  1034. }, {
  1035. url: /^https?:\/\/list\.tmall\.com\/search_product\.htm/i,
  1036. enabled: !0,
  1037. style: ""
  1038. }, {
  1039. url: /^https?:\/\/search\.jd\.com\/Search/,
  1040. enabled: !0,
  1041. style: ""
  1042. }, {
  1043. url: /^https?:\/\/search\.suning\.com/i,
  1044. enabled: !0,
  1045. style: ""
  1046. }, {
  1047. url: /^https?:\/\/search\.yhd\.com\/c0-0\/k/i,
  1048. enabled: !0,
  1049. style: ""
  1050. }, {
  1051. url: /^https?:\/\/search\.smzdm\.com\/\?/i,
  1052. enabled: !0,
  1053. style: ""
  1054. }, {
  1055. url: /^https?:\/\/s\.weibo\.com\/weibo\//i,
  1056. enabled: !0,
  1057. style: ""
  1058. }, {
  1059. url: /^https?:\/\/tieba\.baidu\.com\/f\/search/i,
  1060. enabled: !0,
  1061. style: ""
  1062. }, {
  1063. url: /^https?:\/\/(movie|music|book)\.douban\.com\/subject_search?/,
  1064. enabled: !0,
  1065. style: ""
  1066. }, {
  1067. url: /^https?:\/\/www\.douban\.com\/search/i,
  1068. enabled: !0,
  1069. style: ""
  1070. }, {
  1071. url: /^https?:\/\/xueshu\.baidu\.com\/(?:s|baidu)/,
  1072. enabled: !0,
  1073. style: ""
  1074. }, {
  1075. url: /^https?:\/\/scholar\.google(?:\.\D{1,3}){1,2}\/scholar\?/,
  1076. enabled: !0,
  1077. style: ""
  1078. }, {
  1079. url: /^http:\/\/search\.cnki\.net\/search\.aspx/i,
  1080. enabled: !0,
  1081. style: ""
  1082. }, {
  1083. url: /^http:\/\/epub\.cnki\.net\/kns\/brief\/default_result\.aspx/i,
  1084. enabled: !0,
  1085. style: ""
  1086. }, {
  1087. url: /^https?:\/\/s\.g\.wanfangdata\.com\.cn\/Paper\.aspx/i,
  1088. enabled: !0,
  1089. style: ""
  1090. }, {
  1091. url: /^http:\/\/.*?ebscohost\.com\/.*?results/i,
  1092. enabled: !0,
  1093. style: ""
  1094. }, {
  1095. url: /^http:\/\/link\.springer\.com\/search\?query=/i,
  1096. enabled: !0,
  1097. style: ""
  1098. }, {
  1099. url: /^https?:.*?jstor.org\/action\/doAdvancedSearch/i,
  1100. enabled: !0,
  1101. style: ""
  1102. }, {
  1103. url: /^https?:.*?runoob\.com\//i,
  1104. enabled: !0,
  1105. style: ""
  1106. }, {
  1107. url: /^https?:\/\/github\.com\/search/,
  1108. enabled: !0,
  1109. style: ""
  1110. }, {
  1111. url: /^https?:\/\/developer\.mozilla\.org\/.{2,5}\/search/,
  1112. enabled: !0,
  1113. style: ""
  1114. }, {
  1115. url: /^https?:\/\/google\.infinitynewtab\.com\/\?q/,
  1116. enabled: !0,
  1117. style: ""
  1118. }, {
  1119. url: /^https?:\/\/www\.startpage\.com\/do\/search/,
  1120. enabled: !0,
  1121. style: ""
  1122. }, {
  1123. url: /^https?:\/\/127\.0\.0\.1:8090\/./,
  1124. enabled: !0,
  1125. style: ""
  1126. } ].find(e => e.url.test(window.location.href));
  1127. v && (C.url = v.url, C.enabled = v.enabled, C.style = v.style, C.keyword = v.keyword),
  1128. e.config.productionTip = !1;
  1129. const k = C;
  1130. if (C.enabled || x.findIndex(e => e === window.location.hostname) > -1) {
  1131. const n = document.createElement("div");
  1132. n.id = "all-search";
  1133. const t = new e({
  1134. data: () => ({
  1135. currentSite: k
  1136. }),
  1137. render: e => e(y)
  1138. });
  1139. (function() {
  1140. let e = 0;
  1141. return new Promise((n, t) => {
  1142. if (document.body) n(); else {
  1143. const r = setInterval((function() {
  1144. e += 1, document.body && (clearInterval(r), n()), 20 === e && (clearInterval(r),
  1145. t(new Error("timeOut")));
  1146. }), 100);
  1147. }
  1148. });
  1149. })().then(() => {
  1150. const e = document.body.parentElement.insertBefore(n, document.body);
  1151. var r;
  1152. t.$mount(e), C.style && (r = C.style, window.GM_addStyle && window.GM_addStyle(r));
  1153. });
  1154. }
  1155. }(Vue);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址