// ==UserScript==
// @name all-search 全搜,一个搜索引擎快捷跳转菜单
// @version 0.1.4d
// @description 在各个引擎之间跳转的顶部固定菜单,借鉴自searchEngineJump
// @author endday
// @license GPL-2.0
// @update 2020/3/30
// @include *
// @homepageURL https://github.com/endday/all-search
// @require https://cdn.jsdelivr.net/npm/vue
// @run-at document-body
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_addStyle
// @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: "baidu",
nameZh: "百度",
url: "https://www.baidu.com/s?wd=%s&ie=utf-8"
}, {
name: "google",
nameZh: "谷歌",
url: "https://www.google.com/search?q=%s&ie=utf-8&oe=utf-8"
}, {
name: "bing",
nameZh: "必应",
url: "https://cn.bing.com/search?q=%s"
}, {
name: "baidu",
nameZh: "百度翻译",
url: "http://fanyi.baidu.com/#auto/zh/%s"
}, {
name: "zhihu",
nameZh: "知乎",
url: "http://www.zhihu.com/search?q=%s"
}, {
name: "stackoverflow",
nameZh: "stackoverflow",
url: "https://stackoverflow.com/search?q=%s"
}, {
name: "juejin",
nameZh: "掘金",
url: "https://juejin.im/search?query=%s&type=all"
}, {
name: "GitHub",
nameZh: "GitHub",
url: "https://github.com/search?utf8=✓&q=%s",
blank: !0
} ]
}, {
nameZh: "搜索",
name: "search",
list: [ {
name: "baidu",
nameZh: "百度",
url: "https://www.baidu.com/s?wd=%s&ie=utf-8"
}, {
name: "google",
nameZh: "谷歌",
url: "https://www.google.com/search?q=%s&ie=utf-8&oe=utf-8"
}, {
name: "bing",
nameZh: "必应",
url: "https://cn.bing.com/search?q=%s"
}, {
name: "DDG",
nameZh: "DDG",
url: "https://duckduckgo.com/?q=%s",
disable: !0
}, {
name: "360",
nameZh: "360",
url: "https://www.so.com/s?ie=utf-8&q=%s"
}, {
name: "yahoo",
nameZh: "雅虎",
url: "https://search.yahoo.com/search;?p=%s",
disable: !0
}, {
name: "sogou",
nameZh: "搜狗",
url: "https://www.sogou.com/web?query=%s",
disable: !1
}, {
name: "startpage",
nameZh: "Startpage",
url: "https://www.startpage.com/do/asearch$post$query",
disable: !0
}, {
name: "mijisou",
nameZh: "秘迹搜索",
url: "https://mijisou.com/?q=%s&category_general=on&time_range=&language=zh-CN"
}, {
name: "Yandex",
nameZh: "Yandex",
url: "https://yandex.com/search/?text=%s",
disabled: !0
} ]
}, {
nameZh: "翻译",
name: "translate",
list: [ {
name: "google",
nameZh: "谷歌翻译",
url: "https://translate.google.com/?q=%s"
}, {
name: "baidu",
nameZh: "百度翻译",
url: "http://fanyi.baidu.com/#auto/zh/%s"
}, {
name: "youdao",
nameZh: "有道词典",
url: "http://dict.youdao.com/search?q=%s",
blank: !0
}, {
name: "bing",
nameZh: "必应翻译",
url: "http://cn.bing.com/dict/search?q=%s"
}, {
name: "forvo",
nameZh: "Forvo发音",
url: "https://zh.forvo.com/search/%s",
blank: !0
}, {
name: "cnki",
nameZh: "CNKI翻译",
url: "http://dict.cnki.net/dict_result.aspx?searchword=%s",
disable: !0
}, {
name: "zdic",
nameZh: "汉典",
url: "http://www.zdic.net/sousuo/?q=%s",
disable: !0
}, {
name: "dict",
nameZh: "海词",
url: "http://dict.cn/%s"
} ]
}, {
nameZh: "开发者",
name: "developer",
list: [ {
name: "MDN",
nameZh: "MDN",
url: "https://developer.mozilla.org/zh-CN/search?q=%s"
}, {
name: "stackoverflow",
nameZh: "stackoverflow",
url: "https://stackoverflow.com/search?q=%s"
}, {
name: "juejin",
nameZh: "掘金",
url: "https://juejin.im/search?query=%s&type=all"
}, {
name: "Can I Use",
nameZh: "Can I Use",
url: "http://caniuse.com/#search=%s",
blank: !0
}, {
name: "GitHub",
nameZh: "GitHub",
url: "https://github.com/search?utf8=✓&q=%s",
blank: !0
}, {
name: "w3c",
nameZh: "w3c",
url: "http://www.runoob.com/?s=%s"
}, {
name: "GreasyFork",
nameZh: "GreasyFork",
url: "https://greasyfork.org/zh-CN/scripts?q=%s&utf8=✓",
blank: !0
} ]
}, {
nameZh: "音乐",
name: "music",
list: [ {
name: "NetEase",
nameZh: "网易音乐",
url: "http://music.163.com/#/search/m/?s=%s"
}, {
name: "1ting",
nameZh: "一听",
url: "http://so.1ting.com/all.do?q=%s"
}, {
name: "xiami",
nameZh: "虾米音乐",
url: "http://www.xiami.com/search?key=%s"
}, {
name: "yinyuetai",
nameZh: "音悦Tai",
url: "http://so.yinyuetai.com/?keyword=%s"
}, {
name: "qq",
nameZh: "QQ音乐",
url: "https://y.qq.com/portal/search.html#page=1&searchid=1&remoteplace=txt.yqq.top&t=song&w=%s",
blank: !0
}, {
name: "baidu",
nameZh: "百度音乐",
url: "http://music.baidu.com/search?ie=utf-8&oe=utf-8&key=%s"
}, {
name: "kuwo",
nameZh: "酷我音乐",
url: "http://sou.kuwo.cn/ws/NSearch?type=all&key=%s",
blank: !0
}, {
name: "kugou",
nameZh: "酷狗",
url: "http://search.5sing.kugou.com/?keyword=%s",
blank: !0
} ]
}, {
nameZh: "新闻",
name: "news",
list: [ {
name: "google",
nameZh: "谷歌中文",
url: "https://news.google.com/search?q=%s&hl=zh-CN&gl=CN&ceid=CN:zh-Hans",
blank: !0
}, {
name: "baidu",
nameZh: "百度新闻",
url: "http://news.baidu.com/ns?word=%s&tn=news&from=news&cl=2&rn=20&ct=1",
blank: !0
}, {
name: "163-baidu",
nameZh: "网易-百度",
url: "https://www.baidu.com/s?wd=%s%20site%3Anews.163.com",
blank: !0
}, {
name: "163-google",
nameZh: "网易-谷歌",
url: "https://www.google.com.hk/search?q=site:news.163.com+%s",
blank: !0
}, {
name: "qq",
nameZh: "腾讯新闻",
url: "https://www.sogou.com/sogou?site=news.qq.com&query=%s",
blank: !0
}, {
name: "ifeng",
nameZh: "凤凰新闻",
url: "http://search.ifeng.com/sofeng/search.action?q=%s",
blank: !0
}, {
name: "CNN",
nameZh: "CNN",
url: "https://edition.cnn.com/search/?q=%s",
blank: !0
}, {
name: "BBC",
nameZh: "BBC",
url: "https://www.bbc.co.uk/search?q=%s",
blank: !0
}, {
name: "Economis",
nameZh: "Economis",
url: "https://www.google.com/search?q=site:www.economist.com%20%s",
blank: !0
}, {
name: "toutiao",
nameZh: "今日头条",
url: "https://www.toutiao.com/search/?keyword=%E4%B8%96%E7%95%8C%E6%9D%AF",
blank: !0
} ]
}, {
nameZh: "社交",
name: "social",
list: [ {
name: "zhihu",
nameZh: "知乎",
url: "http://www.zhihu.com/search?q=%s"
}, {
name: "Twitter",
nameZh: "推特",
url: "https://twitter.com/search/%s"
}, {
name: "douban",
nameZh: "豆瓣",
url: "http://www.douban.com/search?source=suggest&q=%s"
}, {
name: "tieba",
nameZh: "百度贴吧",
url: "http://tieba.baidu.com/f?kw=%s&ie=utf-8",
blank: !0
}, {
name: "qq",
nameZh: "腾讯微博",
url: "http://search.t.qq.com/index.php?k=%s"
}, {
name: "sina",
nameZh: "新浪微博",
url: "http://s.weibo.com/weibo/%s"
}, {
name: "Facebook",
nameZh: "脸书",
url: "https://www.facebook.com/search/results.php?q=%s"
}, {
name: "weixin",
nameZh: "微信搜索",
url: "http://weixin.sogou.com/weixin?ie=utf8&type=2&query=%s"
} ]
}, {
nameZh: "百科",
name: "knowledge",
list: [ {
name: "wiki",
nameZh: "维基",
url: "http://zh.wikipedia.org/wiki/%s"
}, {
name: "baike",
nameZh: "百度百科",
url: "http://baike.baidu.com/search/word?pic=1&sug=1&word=%s",
disable: !1
}, {
name: "wenku",
nameZh: "百度文库",
url: "http://wenku.baidu.com/search?word=%s&ie=utf-8"
}, {
name: "docin",
nameZh: "豆丁文档",
url: "http://www.docin.com/search.do?searchcat=2&searchType_banner=p&nkey=%s",
disable: !0
}, {
name: "iask",
nameZh: "爱问知识",
url: "http://iask.sina.com.cn/search?searchWord=%s",
disable: !0
}, {
name: "moegirl",
nameZh: "萌娘百科",
url: "https://zh.moegirl.org/%s",
blank: !0
}, {
name: "guokr",
nameZh: "果壳",
url: "http://www.guokr.com/search/all/?wd=%s",
blank: !0
}, {
name: "Quora",
nameZh: "Quora",
url: "https://www.quora.com/search?q=%s"
} ]
} ];
document.createElement("a");
function t(e, n, t, r, s, a, o, i, l, c) {
"boolean" != typeof o && (l = i, i = o, o = !1);
const A = "function" == typeof t ? t.options : t;
let d;
if (e && e.render && (A.render = e.render, A.staticRenderFns = e.staticRenderFns,
A._compiled = !0, s && (A.functional = !0)), r && (A._scopeId = r), a ? (d = 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(a);
}, A._ssrRegister = d) : n && (d = o ? function(e) {
n.call(this, c(e, this.$root.$options.shadowRoot));
} : function(e) {
n.call(this, i(e));
}), d) if (A.functional) {
const e = A.render;
A.render = function(n, t) {
return d.call(t), e(n, t);
};
} else {
const e = A.beforeCreate;
A.beforeCreate = e ? [].concat(e, d) : [ d ];
}
return t;
}
const r = "undefined" != typeof navigator && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());
function s(e) {
return (e, n) => function(e, n) {
const t = r ? n.media || "default" : e, s = o[t] || (o[t] = {
ids: new Set,
styles: []
});
if (!s.ids.has(e)) {
s.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)))) + " */"),
s.element || (s.element = document.createElement("style"), s.element.type = "text/css",
n.media && s.element.setAttribute("media", n.media), void 0 === a && (a = document.head || document.getElementsByTagName("head")[0]),
a.appendChild(s.element)), "styleSheet" in s.element) s.styles.push(t), s.element.styleSheet.cssText = s.styles.filter(Boolean).join("\n"); else {
const e = s.ids.size - 1, n = document.createTextNode(t), r = s.element.childNodes;
r[e] && s.element.removeChild(r[e]), r.length ? s.element.insertBefore(n, r[e]) : s.element.appendChild(n);
}
}
}(e, n);
}
let a;
const o = {};
const i = {
name: "logo"
};
var l = function() {
var e = this.$createElement;
this._self._c;
return this._m(0);
};
l._withStripped = !0;
const c = t({
render: l,
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-5c453d41_0", {
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 */",
map: {
version: 3,
sources: [ "E:\\project\\all-search\\src\\components\\logo.vue", "logo.vue" ],
names: [],
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",
file: "logo.vue",
sourcesContent: [ '\r\n \r\n \r\n All Search\r\n
\r\n \r\n\r\n\r\n