// ==UserScript== // @name all-search 全搜,一个搜索引擎快捷跳转菜单 // @version 0.1.5 // @description 在各个引擎之间跳转的顶部固定菜单,借鉴自searchEngineJump // @author endday // @license GPL-2.0 // @update 2020/4/26 // @include * // @homepageURL https://github.com/endday/all-search // @noframes // @require https://cdn.jsdelivr.net/npm/vue // @resource asStyle https://cdn.jsdelivr.net/gh/endday/all-search/build/as-style.css?v=0.1.5 // @run-at document-start // @grant GM_getValue // @grant GM_setValue // @grant GM_addStyle // @grant GM_getResourceText // @namespace https://github.com/endday // @downloadURL none // ==/UserScript== /* eslint-disable */ !function(e) { "use strict"; e = e && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; var n = [ { nameZh: "默认", name: "common", list: [ { name: "百度", url: "https://www.baidu.com/s?wd=%s&ie=utf-8" }, { name: "谷歌", url: "https://www.google.com/search?q=%s&ie=utf-8&oe=utf-8" }, { name: "必应", url: "https://cn.bing.com/search?q=%s" }, { name: "百度翻译", url: "http://fanyi.baidu.com/#auto/zh/%s" }, { name: "知乎", url: "http://www.zhihu.com/search?q=%s" }, { name: "stackoverflow", url: "https://stackoverflow.com/search?q=%s" }, { name: "掘金", url: "https://juejin.im/search?query=%s&type=all", disabled: !0 }, { name: "GitHub", url: "https://github.com/search?utf8=✓&q=%s" } ] }, { nameZh: "搜索", name: "search", list: [ { name: "百度", url: "https://www.baidu.com/s?wd=%s&ie=utf-8" }, { name: "谷歌", url: "https://www.google.com/search?q=%s&ie=utf-8&oe=utf-8" }, { name: "必应", url: "https://cn.bing.com/search?q=%s" }, { name: "多吉", url: "https://www.dogedoge.com/results?q=%s" }, { name: "DDG", url: "https://duckduckgo.com/?q=%s" }, { name: "360", url: "https://www.so.com/s?ie=utf-8&q=%s" }, { name: "雅虎", url: "https://search.yahoo.com/search;?p=%s" }, { name: "搜狗", url: "https://www.sogou.com/web?query=%s" }, { name: "Startpage", url: "https://www.startpage.com/do/asearch$post$query" }, { name: "秘迹搜索", url: "https://mijisou.com/?q=%s&category_general=on&time_range=&language=zh-CN" }, { name: "Yandex", url: "https://yandex.com/search/?text=%s" } ] }, { nameZh: "翻译", name: "translate", list: [ { name: "谷歌翻译", url: "https://translate.google.com/?q=%s" }, { name: "百度翻译", url: "http://fanyi.baidu.com/#auto/zh/%s" }, { name: "有道词典", url: "http://dict.youdao.com/search?q=%s" }, { name: "必应翻译", url: "http://cn.bing.com/dict/search?q=%s" }, { name: "DeepL", url: "https://www.deepl.com/translator#zh/en/%s" } ] }, { nameZh: "视频", name: "video", list: [ { name: "youtube", url: "https://www.youtube.com/results?search_query=%s" }, { name: "bilibili", url: "http://search.bilibili.com/all?keyword=%s" }, { name: "优酷", url: "http://www.soku.com/search_video/q_%s" }, { name: "腾讯视频", url: "https://v.qq.com/x/search/?q=%s" }, { name: "AcFun", url: "http://www.acfun.cn/search/?#query=%s" }, { name: "乐视", url: "http://so.letv.com/s?wd=%s" }, { name: "搜狐", url: "http://so.tv.sohu.com/mts?wd=%s" }, { name: "niconico", url: "http://www.nicovideo.jp/search/%s" }, { name: "爱奇艺", url: "http://so.iqiyi.com/so/q_%s" } ] }, { nameZh: "音乐", name: "music", list: [ { name: "网易音乐", url: "http://music.163.com/#/search/m/?s=%s" }, { name: "一听", url: "http://so.1ting.com/all.do?q=%s" }, { name: "虾米音乐", url: "http://www.xiami.com/search?key=%s" }, { name: "音悦Tai", url: "http://so.yinyuetai.com/?keyword=%s" }, { name: "QQ音乐", url: "https://y.qq.com/portal/search.html#page=1&searchid=1&remoteplace=txt.yqq.top&t=song&w=%s" }, { name: "百度音乐", url: "http://music.baidu.com/search?ie=utf-8&oe=utf-8&key=%s" }, { name: "酷我音乐", url: "http://sou.kuwo.cn/ws/NSearch?type=all&key=%s" }, { name: "酷狗", url: "http://search.5sing.kugou.com/?keyword=%s" } ] }, { nameZh: "开发者", name: "developer", list: [ { name: "MDN", url: "https://developer.mozilla.org/zh-CN/search?q=%s" }, { name: "stackoverflow", url: "https://stackoverflow.com/search?q=%s" }, { name: "掘金", url: "https://juejin.im/search?query=%s&type=all" }, { name: "Can I Use", url: "http://caniuse.com/#search=%s", blank: !0 }, { name: "GitHub", url: "https://github.com/search?utf8=✓&q=%s" }, { name: "w3c", url: "http://www.runoob.com/?s=%s" }, { name: "GreasyFork", url: "https://greasyfork.org/zh-CN/scripts?q=%s&utf8=✓" } ] }, { nameZh: "新闻", name: "news", list: [ { name: "谷歌中文", url: "https://news.google.com/search?q=%s&hl=zh-CN&gl=CN&ceid=CN:zh-Hans" }, { name: "百度新闻", url: "http://news.baidu.com/ns?word=%s&tn=news&from=news&cl=2&rn=20&ct=1" }, { name: "网易-百度", url: "https://www.baidu.com/s?wd=%s%20site%3Anews.163.com" }, { name: "网易-谷歌", url: "https://www.google.com.hk/search?q=site:news.163.com+%s" }, { name: "腾讯新闻", url: "https://www.sogou.com/sogou?site=news.qq.com&query=%s" }, { name: "凤凰新闻", url: "http://search.ifeng.com/sofeng/search.action?q=%s" }, { name: "CNN", url: "https://edition.cnn.com/search/?q=%s" }, { name: "BBC", url: "https://www.bbc.co.uk/search?q=%s" }, { name: "Economis", url: "https://www.google.com/search?q=site:www.economist.com%20%s" }, { name: "今日头条", url: "https://www.toutiao.com/search/?keyword=%E4%B8%96%E7%95%8C%E6%9D%AF" } ] }, { nameZh: "社交", name: "social", list: [ { name: "知乎", url: "http://www.zhihu.com/search?q=%s" }, { name: "推特", url: "https://twitter.com/search/%s" }, { name: "豆瓣", url: "http://www.douban.com/search?source=suggest&q=%s" }, { name: "百度贴吧", url: "http://tieba.baidu.com/f?kw=%s&ie=utf-8" }, { name: "新浪微博", url: "http://s.weibo.com/weibo/%s" }, { name: "脸书", url: "https://www.facebook.com/search/results.php?q=%s" }, { name: "微信搜索", url: "http://weixin.sogou.com/weixin?ie=utf8&type=2&query=%s" } ] }, { nameZh: "百科", name: "knowledge", list: [ { name: "维基", url: "http://zh.wikipedia.org/wiki/%s" }, { name: "百度百科", url: "http://baike.baidu.com/search/word?pic=1&sug=1&word=%s" }, { name: "百度文库", url: "http://wenku.baidu.com/search?word=%s&ie=utf-8" }, { name: "豆丁文档", url: "http://www.docin.com/search.do?searchcat=2&searchType_banner=p&nkey=%s" }, { name: "爱问知识", url: "http://iask.sina.com.cn/search?searchWord=%s" }, { name: "萌娘百科", url: "https://zh.moegirl.org/%s" }, { name: "果壳", url: "http://www.guokr.com/search/all/?wd=%s" }, { name: "Quora", url: "https://www.quora.com/search?q=%s" } ] }, { nameZh: "图片", name: "image", list: [ { name: "谷歌图片", url: "https://www.google.com/search?q=%s&tbm=isch" }, { name: "百度图片", url: "http://image.baidu.com/search/index?tn=baiduimage&ie=utf-8&word=%s" }, { name: "必应图片", url: "https://www.bing.com/images/search?q=%s" }, { name: "pixiv", url: "http://www.pixiv.net/search.php?word=%s" }, { name: "flickr", url: "http://www.flickr.com/search/?q=%s" }, { name: "花瓣", url: "http://huaban.com/search/?q=%s" }, { name: "easyicon", url: "http://www.easyicon.net/iconsearch/%s/", blank: !0 }, { name: "Pinterest", url: "https://www.pinterest.com/search/pins/?q=%s&rs=typed&term_meta" }, { name: "yandex", url: "https://yandex.com/images/search?text=%s" } ] } ]; document.createElement("a"); function t(e) { return e ? `__allSearch__${e}` : null; } function r(e, n, t, r, s, o, i, a, l, c) { "boolean" != typeof i && (l = a, a = i, i = !1); const p = "function" == typeof t ? t.options : t; let m; if (e && e.render && (p.render = e.render, p.staticRenderFns = e.staticRenderFns, p._compiled = !0, s && (p.functional = !0)), r && (p._scopeId = r), o ? (m = function(e) { (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__), n && n.call(this, l(e)), e && e._registeredComponents && e._registeredComponents.add(o); }, p._ssrRegister = m) : n && (m = i ? function(e) { n.call(this, c(e, this.$root.$options.shadowRoot)); } : function(e) { n.call(this, a(e)); }), m) if (p.functional) { const e = p.render; p.render = function(n, t) { return m.call(t), e(n, t); }; } else { const e = p.beforeCreate; p.beforeCreate = e ? [].concat(e, m) : [ m ]; } return t; } const s = "undefined" != typeof navigator && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase()); function o(e) { return (e, n) => function(e, n) { const t = s ? n.media || "default" : e, r = a[t] || (a[t] = { ids: new Set, styles: [] }); if (!r.ids.has(e)) { r.ids.add(e); let t = n.source; if (n.map && (t += "\n/*# sourceURL=" + n.map.sources[0] + " */", t += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(n.map)))) + " */"), r.element || (r.element = document.createElement("style"), r.element.type = "text/css", n.media && r.element.setAttribute("media", n.media), void 0 === i && (i = document.head || document.getElementsByTagName("head")[0]), i.appendChild(r.element)), "styleSheet" in r.element) r.styles.push(t), r.element.styleSheet.cssText = r.styles.filter(Boolean).join("\n"); else { const e = r.ids.size - 1, n = document.createTextNode(t), s = r.element.childNodes; s[e] && r.element.removeChild(s[e]), s.length ? r.element.insertBefore(n, s[e]) : r.element.appendChild(n); } } }(e, n); } let i; const a = {}; const l = { name: "logo" }; var c = function() { var e = this.$createElement; this._self._c; return this._m(0); }; c._withStripped = !0; const p = r({ render: c, staticRenderFns: [ function() { var e = this.$createElement, n = this._self._c || e; return n("a", { staticClass: "as-title", attrs: { href: "https://github.com/endday/all-search", target: "_blank" } }, [ n("p", { staticClass: "as-title-inner" }, [ this._v("\n All Search\n ") ]) ]); } ] }, (function(e) { e && e("data-v-78be21a8_0", { source: ".as-title {\n text-decoration: none;\n padding: 0;\n margin: 0;\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 */", map: { version: 3, sources: [ "E:\\myProject\\all-search\\src\\components\\logo.vue", "logo.vue" ], names: [], mappings: "AAoBA;EACA,qBAAA;EACA,UAAA;EACA,SAAA;ACnBA;ADqBA;EACA,eAAA;EACA,YAAA;EACA,YAAA;EACA,iBAAA;EACA,gBAAA;EACA,cAAA;EACA,SAAA;EACA,kBAAA;EACA,eAAA;ACnBA;;AAEA,mCAAmC", file: "logo.vue", sourcesContent: [ '\r\n\r\n