RulesForSearchEngineJumpPlus

SearchEngineJumpPlus Rules

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greatest.deepsurf.us/scripts/484072/1453229/RulesForSearchEngineJumpPlus.js

  1. /*
  2. Rules for inserting the search engine toolbar into a specified website
  3.  
  4. name: string, the name of the website to be loaded, easy to find
  5. enabled: Boolean, whether to enable
  6. url: regular expression, used to match URLs
  7. engineList: string, search engine type, optional value ['web','music','video','image','download','shopping','translate','knowledge','sociality']
  8. class: string, add a class to use the style of the target website
  9. fixedTop: number, optional, fixed height at the top, unit px
  10. style: CSS style, optional, custom style
  11. style_ACBaidu: CSS style, optional, custom style, enabled in forced center mode, compatible with AC_Baidu script
  12. style_ZhihuChenglinzhi: CSS style, optional, custom style, enabled in forced centering mode, compatible with Zhihu layout optimization script
  13. insertIntoDoc: object, related to inserting documents
  14. target: string, select the positioning element used when inserting into the original web page
  15. You can use xpath matching, such as: '//*[@id="subform_ctrl"]'
  16. Or you can use css matching (need to be prefixed with 'css;'), such as: 'css;#subform_ctrl'
  17. Or pass in a function and use the return value to select, such as: () => document.querySelector('#subform_ctrl')
  18. keyword: string or function, select the get search box
  19. You can use xpath to select a form input element
  20. Or you can use css to select the input element (need to be prefixed with 'css;')
  21. Or pass in a function and use the return value to select the input element
  22. where: string, inserted into the position of the target element, optional value ['beforeBegin', 'afterBegin', 'beforeEnd', 'afterEnd']
  23. 'beforeBegin'(insert before the given element)
  24. 'afterBegin' (as the first child element of the given element)
  25. 'beforeEnd' (as the last child element of the given element)
  26. 'afterEnd'(insert after the given element);
  27. stylish: CSS style, optional, modify the original web page style to adapt to the search engine jump toolbar
  28. */
  29.  
  30. const webRules = [
  31. {
  32. name: "google网页搜索",
  33. enabled: true,
  34. url: /^https?:\/\/www\.google(?:\.[A-z]{2,3}){1,2}\/[^?]+\?(?!tbm=)(?:&?q=|(?:[^#](?!&tbm=))+?&q=)(?:.(?!&tbm=))*$|(^https?:\/\/xn--flw351e\.ml\/search\?q=)/,
  35. engineList: "web",
  36. class: "s6JM6d",
  37. fixedTop: 52,
  38. style: `
  39. z-index: 100;
  40. margin-top:15px;
  41. margin-bottom:5px;
  42. position:sticky;
  43. top: 57px;
  44. `,
  45. style_ACBaidu: `
  46. text-align: center;
  47. z-index: 100;
  48. margin-top:5px;
  49. margin: auto;
  50. `,
  51. insertIntoDoc: {
  52. target: "css;#appbar",
  53. keyword: "css;[name=q]",
  54. where: "beforeBegin",
  55. },
  56. stylish:
  57. "#appbar.hdtb-ab-o{height:0px !important;} #hdtbMenus{position:unset}",
  58. },
  59. {
  60. name: "google-hash-query", // 不刷新页面显示搜索结果的google
  61. enabled: true,
  62. url: /^https?:\/\/www\.google(?:\.[A-z]{2,3}){1,2}\/[^#]*#(?:&?q=|.+?&q=).+/,
  63. engineList: "web",
  64. style: `
  65. left: 142px;
  66. z-index: 100;
  67. margin-top:5px;
  68. `,
  69. style_ACBaidu: `
  70. text-align: center;
  71. z-index: 100;
  72. margin:5px auto 0;
  73. `,
  74. insertIntoDoc: {
  75. target: "css;#appbar",
  76. keyword: function () {
  77. var input = document.getElementById("lst-ib");
  78. if (input) return input.value;
  79. },
  80. where: "beforeBegin",
  81. },
  82. stylish: "body.vasq #hdtbMenus.hdtb-td-o{top:100px !important}",
  83. },
  84. {
  85. name: "百度网页搜索",
  86. url: /^https?:\/\/www\.baidu\.com\/(?:s|baidu)/,
  87. enabled: true,
  88. engineList: "web",
  89. fixedTop: 80,
  90. fixedTop2: 88,
  91. fixedTopTarget: "css;#wrapper_wrapper",
  92. fixedTopWhere: "beforeBegin",
  93. style: `
  94. margin-top:8px;
  95. z-index: 101;
  96. left: 145px;
  97. `,
  98. style_ACBaidu: `
  99. margin: 8px auto -5px;
  100. z-index: 99;
  101. text-align: center;
  102. padding-left:0px !important;
  103. background: rgba(248,248,248,0.4);
  104. backdrop-filter: blur(10px);
  105. `,
  106. insertIntoDoc: {
  107. keyword: "css;input#kw",
  108. target: "css;#wrapper_wrapper",
  109. where: "afterBegin",
  110. },
  111. stylish: `.headBlock,.se_common_hint{
  112. display:none !important
  113. }
  114. #wrapper>.result-molecule{
  115. z-index:300 !important
  116. }
  117. @media screen and (min-width: 1921px){
  118. #sej-container{
  119. left: calc(50vw - 439px) !important;
  120. }
  121. }
  122. `,
  123. },
  124. {
  125. name: "必应网页搜索",
  126. url: /^https?:\/\/[^.]*\.bing\.com\/search/,
  127. enabled: true,
  128. engineList: "web",
  129. style: `
  130. margin-top: 1em;
  131. left: 190px;
  132. position: sticky;
  133. top: 0.5em;
  134. `,
  135. style_ACBaidu: `
  136. text-align: center;
  137. margin: 0 auto -10px;
  138. position: sticky;
  139. top: 0.5em;
  140. `,
  141. insertIntoDoc: {
  142. keyword: "css;#sb_form_q",
  143. target: "css;#b_content",
  144. where: "beforeBegin",
  145. },
  146. },
  147. {
  148. name: "DDG",
  149. url: /^https?:\/\/duckduckgo\.com\/*/i,
  150. enabled: true,
  151. engineList: "web",
  152. style: `
  153. margin-top:5px;
  154. `,
  155. insertIntoDoc: {
  156. keyword: '//input[@name="q"]',
  157. target: "css;.results--main",
  158. where: "beforeBegin",
  159. },
  160. },
  161. {
  162. name: "360",
  163. url: /^https?:\/\/www\.so\.com\/s\?/,
  164. enabled: true,
  165. engineList: "web",
  166. fixedTop: 50,
  167. style: "margin: 1em 0 0 135px;position:sticky;top:55px;z-index:3001;",
  168. insertIntoDoc: {
  169. keyword: "//input[@name='q']",
  170. target: "css;#tabs-wrap",
  171. where: "afterEnd",
  172. },
  173. },
  174. {
  175. name: "雅虎网页搜索",
  176. url: /^https?:\/\/search\.yahoo\.com\/search/i,
  177. engineList: "web",
  178. enabled: true,
  179. fixedTop: 72,
  180. style: `z-index:11;`,
  181. insertIntoDoc: {
  182. keyword: "css;#yschsp",
  183. target: "css;#horizontal-bar",
  184. where: "afterBegin",
  185. },
  186. },
  187. {
  188. name: "雅虎日本网页搜索",
  189. url: /^https?:\/\/search\.yahoo\.co\.jp\/search/i,
  190. engineList: "web",
  191. enabled: true,
  192. style: `
  193. left:0px;
  194. width:1050px;
  195. display:flex;
  196. -webkit-box-orient: vertical;
  197. -webkit-box-direction: normal;
  198. margin: auto;
  199. `,
  200. insertIntoDoc: {
  201. keyword: '//input[@name="p"]',
  202. target: "css;.Header__inner",
  203. where: "afterEnd",
  204. },
  205. },
  206. {
  207. name: "台湾雅虎网页搜索",
  208. url: /^https?:\/\/tw\.search\.yahoo\.com\/search/i,
  209. engineList: "web",
  210. enabled: true,
  211. fixedTop: 52,
  212. style: `
  213. left:-10px;
  214. margin-bottom:10px;
  215. `,
  216. insertIntoDoc: {
  217. keyword: "css;#yschsp",
  218. target: "css;#results",
  219. where: "afterBegin",
  220. },
  221. },
  222. {
  223. name: "searx",
  224. url: /^https?:\/\/searx\.me\/\?q/i,
  225. engineList: "web",
  226. enabled: true,
  227. style: `
  228. left:-10px;
  229. margin-bottom:10px;
  230. `,
  231. insertIntoDoc: {
  232. keyword: "css;#q",
  233. target: "css;#categories",
  234. where: "beforeBegin",
  235. },
  236. },
  237. {
  238. name: "搜狗",
  239. url: /^https?:\/\/www\.sogou\.com\/(?:web|s)/,
  240. enabled: true,
  241. engineList: "web",
  242. fixedTop: 60,
  243. style: `
  244. top:-46px;
  245. z-index:99;
  246. left:-5px;
  247. `,
  248. style_ACBaidu: `
  249. top:-46px;
  250. z-index:99;
  251. margin: auto;
  252. padding-left: 0px !important;
  253. `,
  254. insertIntoDoc: {
  255. keyword: "css;#upquery",
  256. target: "css;#wrapper",
  257. where: "afterBegin",
  258. },
  259. stylish: "#float_uphint{display:none;}",
  260. },
  261. {
  262. name: "yandex",
  263. url: /^https?:\/\/yandex\.(?:com|ru)\/search/i,
  264. engineList: "web",
  265. enabled: true,
  266. fixedTop: 96,
  267. class: "main__center",
  268. style: `
  269. margin:1em 0;
  270. `,
  271. insertIntoDoc: {
  272. keyword: "css;.input__control",
  273. target: "css;.main__center",
  274. where: "afterBegin",
  275. },
  276. stylish: ".main .main__center{padding-top:0px}",
  277. },
  278. {
  279. name: "google网页分类搜索",
  280. enabled: true,
  281. url: /^https?:\/\/www\.google(?:\.[A-z]{2,3}){1,2}\/[^?]+\?(?:tbm=)(?:&?q=|(?:[^#](?!&tbm=))+?&q=)(?:.(?!&tbm=))*$/,
  282. engineList: "web",
  283. style: `
  284. left: 142px;
  285. z-index: 100;
  286. margin-top:5px;
  287. `,
  288. insertIntoDoc: {
  289. target: "css;#appbar",
  290. keyword: '//input[@name="q"]',
  291. where: "beforeBegin",
  292. },
  293. stylish: "body.vasq #hdtbMenus.hdtb-td-o{top:100px !important}",
  294. },
  295. {
  296. name: "startpage",
  297. enabled: true,
  298. url: /^https?:\/\/(www\.)?startpage\.com\/[a-zA-Z]{2,3}\/search/,
  299. engineList: "web",
  300. fixedTop: 103,
  301. style: `
  302. z-index: 100;
  303. `,
  304. insertIntoDoc: {
  305. target: "css;.layout-web__mainline",
  306. keyword: '//input[@name="query"]',
  307. where: "afterBegin",
  308. },
  309. },
  310. {
  311. name: "infinitynewtab",
  312. enabled: true,
  313. url: /^https?:\/\/google\.infinitynewtab\.com\/\?q/i,
  314. engineList: "web",
  315. style: `
  316. z-index: 100;
  317. margin-top: 20px;
  318. `,
  319. insertIntoDoc: {
  320. target: "css;.search-types",
  321. keyword: '//input[@name="search"]',
  322. where: "afterBegin",
  323. },
  324. },
  325. {
  326. name: "ecosia",
  327. enabled: true,
  328. url: /^https?:\/\/www\.ecosia\.org\/search\?/i,
  329. engineList: "web",
  330. style: `
  331. left: -10px;
  332. margin-top: -20px;
  333. z-index:1;
  334. background-color:#fff;
  335. `,
  336. insertIntoDoc: {
  337. target: "css;.mainline",
  338. keyword: '//input[@name="q"]',
  339. where: "afterBegin",
  340. },
  341. },
  342. {
  343. name: "f搜",
  344. enabled: true,
  345. url: /^https?:\/\/fsoufsou\.com\/search/,
  346. engineList: "web",
  347. fixedTop: 111,
  348. style: `
  349. left: 50px;
  350. z-index: -99999;
  351. margin-top:5px;
  352. `,
  353. style_ACBaidu: `
  354. text-align: center;
  355. z-index: -99999;
  356. margin:5px auto 0;
  357. `,
  358. insertIntoDoc: {
  359. target: "css;.input-with-suggestion",
  360. keyword: function () {
  361. var input = document.getElementById("search-input");
  362. if (input) return input.value;
  363. },
  364. where: "beforeEnd",
  365. },
  366. stylish: ".tabs-bottom-border{transform: translate(0, 32px); !important}",
  367. },
  368. {
  369. name: "brave",
  370. enabled: true,
  371. url: /^https?:\/\/search\.brave\.com\/search\?/i,
  372. engineList: "web",
  373. class: "container-80",
  374. style: `
  375. z-index:1;
  376. `,
  377. insertIntoDoc: {
  378. target: "css;#search-main",
  379. keyword: '//input[@name="q"]',
  380. where: "beforeBegin",
  381. },
  382. },
  383. {
  384. name: "neeva",
  385. enabled: true,
  386. url: /^https?:\/\/neeva\.com\/search\?/i,
  387. engineList: "web",
  388. fixedTop: 80,
  389. style: `
  390. z-index:1;
  391. `,
  392. insertIntoDoc: {
  393. target: "css;#search header",
  394. keyword: '//input[@name="q"]',
  395. where: "afterEnd",
  396. },
  397. },
  398. {
  399. name: "infinitynewtab",
  400. enabled: true,
  401. url: /^https?:\/\/google\.infinitynewtab\.com\/\?q/,
  402. engineList: "web",
  403. style: `
  404. text-align:center;
  405. position:fixed;
  406. z-index:99999;
  407. top:0;
  408. `,
  409. insertIntoDoc: {
  410. target: "css;.searchbox-results",
  411. keyword: "css;input.gsc-input",
  412. where: "beforeBegin",
  413. },
  414. },
  415. {
  416. name: "头条搜索",
  417. url: /^https?:\/\/so\.toutiao\.com\/search/,
  418. engineList: "web",
  419. enabled: true,
  420. fixedTop: 75,
  421. style: `
  422. left:146px;
  423. z-index:99999;
  424. `,
  425. insertIntoDoc: {
  426. target: "css;.result-content",
  427. keyword: '//input[@type="search"]',
  428. where: "beforeEnd",
  429. },
  430. },
  431. {
  432. name: "抖音搜索",
  433. url: /^https?:\/\/www\.douyin\.com\/search/,
  434. engineList: "web",
  435. enabled: true,
  436. fixedTop: 192,
  437. fixedTopColor: "rgb(22,23,34)",
  438. style: `
  439. margin:-10px 0 0 -6px;
  440. z-index:99999;
  441. margin-top:8px;
  442. `,
  443. insertIntoDoc: {
  444. target: "css;.CHUUyANc",
  445. keyword: function () {
  446. var input = document.querySelector('input[type="text"]');
  447. if (input) return input.value;
  448. },
  449. where: "beforeEnd",
  450. },
  451. stylish: `
  452. .J122YuOM{
  453. padding-top:14px
  454. }
  455. .IFYTLgyk.FMy9BImq {
  456. margin-top: 170px;
  457. }
  458. body {
  459. --font-color-qxin: #bdc1bc;
  460. --background-color-qxin: #202124f0;
  461. --background-avtive-color-qxin: #424242;
  462. --background-active-enable-qxin: #274144;
  463. --background-active-disable-qxin: #583535;
  464. --background-hover-color-qxin: #424242;
  465. --trigger-shown-qxin: #424242 !important;
  466. --background-btn-qxin: #292f36;
  467. --background-setting-qxin: #202124;
  468. --box-shadow-color-sej: hsla(0, 0%, 70%, 10%);
  469. --border-color-sej: #3b4547;
  470. }
  471. `,
  472. },
  473. ];
  474. const knowledgeRules = [
  475. {
  476. name: "百度百科词条",
  477. url: /^https?:\/\/baike\.baidu\.com\/item/,
  478. engineList: "knowledge",
  479. fixedTop: 65,
  480. enabled: true,
  481. style: `
  482. text-align: center;
  483. background: #fff;
  484. margin: auto;
  485. width: 100% !important;
  486. position: sticky;
  487. top: 66px;
  488. z-index: 1001;
  489. border-top-right-radius: 0;
  490. border-top-left-radius: 0;
  491. `,
  492. insertIntoDoc: {
  493. keyword: "css;#query",
  494. target: "css;.navbar-wrapper",
  495. where: "beforeBegin",
  496. },
  497. },
  498. {
  499. name: "百度百科搜索",
  500. url: /^https?:\/\/baike\.baidu\.com\/search/,
  501. engineList: "knowledge",
  502. enabled: true,
  503. fixedTop: 56,
  504. style: `
  505. padding-left: 120px;
  506. margin: 5px 0 -10px 0px;
  507. `,
  508. insertIntoDoc: {
  509. keyword: "css;#query",
  510. target: "css;.header-wrapper",
  511. where: "afterEnd",
  512. },
  513. },
  514. {
  515. name: "百度文库",
  516. url: /^https?:\/\/wenku\.baidu\.com\/search/i,
  517. engineList: "knowledge",
  518. enabled: true,
  519. fixedTop: 104,
  520. style: `
  521. top:20px;
  522. margin-bottom:25px;
  523. left:145px;
  524. z-index:202;
  525. `,
  526. insertIntoDoc: {
  527. keyword: "css;#kw",
  528. target: "css;#app > div.base-layout-content",
  529. where: "afterBegin",
  530. },
  531. },
  532. {
  533. name: "百度知道",
  534. url: /^https?:\/\/zhidao\.baidu\.com\/search/i,
  535. engineList: "knowledge",
  536. enabled: true,
  537. style: `
  538. border-top: 1px solid #e5e5e5;
  539. border-bottom: 1px solid #e5e5e5;
  540. margin-bottom: 1px;
  541. left:112px;
  542. `,
  543. insertIntoDoc: {
  544. keyword: "css;#kw",
  545. target: "css;#header",
  546. where: "afterEnd",
  547. },
  548. },
  549. {
  550. name: "维基百科",
  551. url: /^https?:\/\/\D{2,5}\.wikipedia\.org\/wiki/i,
  552. engineList: "knowledge",
  553. enabled: true,
  554. style: `
  555. position: fixed;
  556. margin: 0.1em auto;
  557. left: 0;
  558. right: 0;
  559. `,
  560. insertIntoDoc: {
  561. keyword: function () {
  562. var url = window.location.href.substring(
  563. window.location.href.lastIndexOf("/") + 1
  564. );
  565. return decodeURIComponent(url);
  566. },
  567. target: "css;#mw-head",
  568. where: "afterBegin",
  569. },
  570. },
  571. {
  572. name: "萌娘百科",
  573. url: /^https?:\/\/.*\.?moegirl\.org\.cn/i,
  574. engineList: "knowledge",
  575. enabled: true,
  576. fixedTop: 52,
  577. style: `
  578. margin: -0.8em auto 0;
  579. z-index: 3;
  580. width: 1200px !important;
  581. top: 12px;
  582. `,
  583. insertIntoDoc: {
  584. keyword: "css;#firstHeading",
  585. target: "css;#moe-topbanner-container",
  586. where: "afterEnd",
  587. },
  588. },
  589. {
  590. name: "知乎",
  591. url: /^https?:\/\/www\.zhihu\.com\/search\?/i,
  592. engineList: "knowledge",
  593. enabled: true,
  594. fixedTop: 52,
  595. style: `
  596. margin: 10px auto 0px;
  597. width:1000px !important;
  598. z-index:19;
  599. background: #fff;
  600. box-shadow: 0 1px 3px 0 rgba(0,34,77,.05);
  601. `,
  602. style_ZhihuChenglinz: `
  603. margin: 10px auto 0px;
  604. width:654px;
  605. z-index:19;
  606. background: #fff;
  607. box-shadow: 0 1px 3px 0 rgba(0,34,77,.05);
  608. `,
  609. insertIntoDoc: {
  610. keyword: "css;.Input",
  611. target: "css;.Search-container",
  612. where: "beforeBegin",
  613. },
  614. stylish: ".TopSearch.Card{margin:30px auto;}",
  615. },
  616. {
  617. name: "互动百科搜索页",
  618. url: /^https?:\/\/so\.baike\.com\/doc/i,
  619. engineList: "knowledge",
  620. enabled: true,
  621. style: `
  622. border-top: 1px solid #e5e5e5;
  623. text-align: center;
  624. border-bottom: 1px solid #e5e5e5;
  625. margin-bottom: 1px;
  626. `,
  627. insertIntoDoc: {
  628. keyword: "css;.ac_input",
  629. target: "css;.bk-head",
  630. where: "afterEnd",
  631. },
  632. },
  633. {
  634. name: "互动百科词条页",
  635. url: /^https?:\/\/www\.baike\.com\/wiki/i,
  636. engineList: "knowledge",
  637. enabled: true,
  638. style: `
  639. border-top: 1px solid #e5e5e5;
  640. text-align: center;
  641. border-bottom: 1px solid #e5e5e5;
  642. margin-bottom: 1px;
  643. `,
  644. insertIntoDoc: {
  645. keyword: "css;.ac_input",
  646. target: "css;.bk-head",
  647. where: "afterEnd",
  648. },
  649. },
  650. {
  651. name: "豆丁文档",
  652. url: /^https?:\/\/www\.docin\.com\/search\.do/,
  653. engineList: "knowledge",
  654. enabled: true,
  655. style: `
  656. text-align: center;
  657. margin:0 auto;
  658. padding-top:1px;
  659. border-top:1px solid #00000;
  660. border-bottom:1px solid #D9E1F7;
  661. `,
  662. insertIntoDoc: {
  663. keyword: "css;#topsearch",
  664. target: "css;.doc_hd_mini",
  665. where: "afterEnd",
  666. },
  667. },
  668. {
  669. name: "Quora",
  670. url: /^https?:\/\/www\.quora\.com\/search\?/i,
  671. enabled: true,
  672. engineList: "knowledge",
  673. fixedTop: 53,
  674. style: `
  675. left:calc((100% - 1120px) / 2);
  676. margin-top: 30px;
  677. `,
  678. insertIntoDoc: {
  679. keyword:
  680. "css;#root > div > div.q-box > div > div.q-fixed.qu-fullX.qu-zIndex--header.qu-bg--raised.qu-borderBottom.qu-boxShadow--medium.qu-borderColor--raised > div > div:nth-child(2) > div > div.q-box.qu-flex--auto.qu-mx--small.qu-alignItems--center > div > div > form > div > div > div > div > div > input",
  681. target:
  682. "css;#root > div > div.q-box > div > div:nth-child(3) > div > div",
  683. where: "beforeBegin",
  684. },
  685. },
  686. {
  687. name: "StackOverflow",
  688. url: /^https?:\/\/stackoverflow\.com\/search\?/i,
  689. enabled: true,
  690. engineList: "knowledge",
  691. fixedTop: 50,
  692. style:
  693. "width: min(100%, 1264px) !important;position: sticky;top: 50px;z-index:1001;margin:auto",
  694. insertIntoDoc: {
  695. keyword: "css; #search > div > input",
  696. target: "css;body > div.container",
  697. where: "beforeBegin",
  698. },
  699. },
  700. {
  701. name: "知乎(搜狗)",
  702. url: /^https?:\/\/zhihu\.sogou\.com\/zhihu/,
  703. enabled: true,
  704. engineList: "knowledge",
  705. fixedTop: 55,
  706. style: `
  707. margin: auto;
  708. width: 1000px;
  709. z-index:99;
  710. `,
  711. insertIntoDoc: {
  712. keyword: "css;#upquery",
  713. target: "css;#header",
  714. where: "afterEnd",
  715. },
  716. stylish: ".header{ margin-bottom: 5px; }",
  717. },
  718. ];
  719. const videoRules = [
  720. {
  721. name: "优酷",
  722. url: /^https?:\/\/www\.soku\.com\/search_video\//,
  723. engineList: "video",
  724. enabled: true,
  725. fixedTop: 54,
  726. style: `
  727. width:1190px;
  728. margin:0 auto;
  729. z-index:99999;
  730. `,
  731. insertIntoDoc: {
  732. keyword: "css;#headq",
  733. target: "css;.sk_container",
  734. where: "beforeBegin",
  735. },
  736. },
  737. {
  738. name: "土豆",
  739. url: /^https?:\/\/www\.soku\.com\/t\/nisearch\//,
  740. enabled: true,
  741. engineList: "video",
  742. style: `
  743. padding-left: 10px;
  744. border-top: 1px solid #FC6500;
  745. border-bottom: 1px solid #FC6500;
  746. text-align: center;
  747. `,
  748. insertIntoDoc: {
  749. keyword: "css;#headq",
  750. target: "css;body > .sk_container",
  751. where: "beforeBegin",
  752. },
  753. },
  754. {
  755. name: "哔哩哔哩",
  756. url: /^https?:\/\/search\.bilibili\.com\/*/,
  757. enabled: true,
  758. engineList: "video",
  759. fixedTop: 74,
  760. style: `
  761. width:980px;
  762. margin:10px auto 10px;
  763. `,
  764. insertIntoDoc: {
  765. keyword: function () {
  766. if (document.querySelector("#search-keyword")) {
  767. return document.querySelector("#search-keyword").value;
  768. } else {
  769. return document.querySelector(".search-input-el").value;
  770. }
  771. },
  772. target: function () {
  773. if (document.querySelector(".head-contain")) {
  774. return document.querySelector(".head-contain");
  775. } else {
  776. return document.querySelector(".search-input");
  777. }
  778. },
  779. where: "afterEnd",
  780. },
  781. },
  782. {
  783. name: "AcFun",
  784. url: /^https?:\/\/www\.acfun\.cn\/search/,
  785. enabled: true,
  786. engineList: "video",
  787. fixedTop: 46,
  788. style: `
  789. width:980px;
  790. margin: -30px 0 10px 0;
  791. text-align:center;
  792. position:sticky;
  793. top: 65px;
  794. `,
  795. insertIntoDoc: {
  796. keyword: "css;#search-text--standalone",
  797. target: "css;.search__main__container",
  798. where: "afterEnd",
  799. },
  800. },
  801. {
  802. name: "YouTube",
  803. url: /^https?:\/\/www\.youtube\.com\/results/,
  804. enabled: true,
  805. engineList: "video",
  806. fixedTop: 58,
  807. style: `
  808. z-index:9;
  809. margin: 60px auto -60px;
  810. text-align: center;
  811. backgroud:#fff;
  812. position: relative;
  813. `,
  814. insertIntoDoc: {
  815. keyword: "css;input#search",
  816. target: "css;#page-manager",
  817. where: "beforeBegin",
  818. },
  819. },
  820. {
  821. name: "niconico",
  822. url: /^https?:\/\/www\.nicovideo\.jp\/search\//,
  823. enabled: true,
  824. engineList: "video",
  825. style: `
  826. border-top: 1px solid #E8E8E8;
  827. border-bottom: 1px solid #E8E8E8;
  828. text-align: center;
  829. `,
  830. insertIntoDoc: {
  831. keyword: "css;#search_united",
  832. target: "css;.tagListBox",
  833. where: "beforeBegin",
  834. },
  835. },
  836. {
  837. name: "Iqiyi",
  838. url: /^https?:\/\/so\.iqiyi\.com\/so\/q/,
  839. enabled: true,
  840. engineList: "video",
  841. fixedTop: 60,
  842. style: `
  843. margin:0 auto;
  844. width:1180px;
  845. `,
  846. insertIntoDoc: {
  847. keyword: "css;#data-widget-searchword",
  848. target: "css;.mod_search_header",
  849. where: "afterEnd",
  850. },
  851. },
  852. {
  853. name: "腾讯视频",
  854. url: /^https?:\/\/v\.qq\.com\/x\/search/i,
  855. engineList: "video",
  856. enabled: true,
  857. fixedTop: 60,
  858. style: "width:1140px;margin:1em auto;z-index: 11;position:sticky;top:70px;",
  859. insertIntoDoc: {
  860. keyword: "css;#keywords",
  861. target: "css;#search_container > div.wrapper > div.wrapper_main",
  862. where: "afterBegin",
  863. },
  864. },
  865. {
  866. name: "樱花动漫",
  867. url: /^https?:\/\/www\.imomoe\.ai\/search/,
  868. engineList: "video",
  869. enabled: true,
  870. style: `
  871. width:1140px;
  872. margin:-10px auto 10px;,
  873. `,
  874. insertIntoDoc: {
  875. keyword: '//input[@name="searchword"]',
  876. target: "css;.head",
  877. where: "afterEnd",
  878. },
  879. },
  880. ];
  881. const musicRules = [
  882. {
  883. name: "百度音乐",
  884. url: /^https?:\/\/music\.baidu\.com\/search/,
  885. enabled: true,
  886. engineList: "music",
  887. style: `
  888. border-top: 0px solid #0064C4;
  889. margin-bottom: 5px;
  890. `,
  891. insertIntoDoc: {
  892. keyword: "css;#ww",
  893. target: "css;.nav-wrapper",
  894. where: "beforeBegin",
  895. },
  896. },
  897. {
  898. name: "一听音乐",
  899. url: /^https?:\/\/so\.1ting\.com\/song/i,
  900. enabled: true,
  901. engineList: "music",
  902. style: `
  903. text-align: center;
  904. border-bottom: 1px solid #13B310;
  905. border-top: 1px solid #13B310;
  906. margin:auto;
  907. `,
  908. insertIntoDoc: {
  909. keyword: "css;#keyword",
  910. target: "css;.nav",
  911. where: "beforeBegin",
  912. },
  913. },
  914. {
  915. name: "xiami",
  916. url: /^https?:\/\/www\.xiami\.com\/search/,
  917. enabled: true,
  918. engineList: "music",
  919. style: `
  920. text-align: center;
  921. `,
  922. insertIntoDoc: {
  923. keyword: "css;#search_text",
  924. target: "css;.search_result",
  925. where: "beforeBegin",
  926. },
  927. },
  928. {
  929. name: "QQ音乐",
  930. url: /^https?:\/\/y\.qq\.com\/n\/ryqq\/search/i,
  931. enabled: true,
  932. engineList: "music",
  933. style: `
  934. margin: 1em auto;
  935. position: sticky;
  936. top: 68px;
  937. `,
  938. insertIntoDoc: {
  939. keyword: "css;#app>div>div.mod_search>div.mod_search_input>input",
  940. target: "css;#app > div > div.main > div > div",
  941. where: "afterBegin",
  942. },
  943. },
  944. {
  945. name: "网易云音乐",
  946. url: /^https?:\/\/music\.163\.com\/.*?#\/search/i,
  947. enabled: true,
  948. engineList: "music",
  949. fixedTop: 0,
  950. style: `
  951. margin:auto;
  952. top:3px;
  953. `,
  954. insertIntoDoc: {
  955. keyword: function () {
  956. return decodeURI(document.URL.match(/s=(.+?)(&|$)/)[1]);
  957. },
  958. target: "css;.m-subnav.m-subnav-up.f-pr.j-tflag",
  959. where: "afterEnd",
  960. },
  961. },
  962. {
  963. name: "音悦台",
  964. url: /^https?:\/\/so\.yinyuetai\.com\/\?keyword/,
  965. enabled: true,
  966. engineList: "music",
  967. style: `
  968. border-bottom: 1px solid #2B6DAE;
  969. border-top: 1px solid #2B6DAE;
  970. text-align: center;
  971. `,
  972. insertIntoDoc: {
  973. keyword: function () {
  974. var url = window.location.href.substring(
  975. window.location.href.lastIndexOf("=") + 1
  976. );
  977. return decodeURIComponent(url);
  978. },
  979. target: "css;.content",
  980. where: "afterEnd",
  981. },
  982. },
  983. ];
  984. const imageRules = [
  985. {
  986. name: "百度图片",
  987. url: /^https?:\/\/image\.baidu\.com\/search/i,
  988. enabled: true,
  989. engineList: "image",
  990. fixedTop: 72, //关闭关联联想的情况下
  991. // fixedTop:135, //
  992. style: `
  993. left:127px;
  994. z-index:1000;
  995. margin-top:10px;
  996. `,
  997. insertIntoDoc: {
  998. keyword: "css;input#kw",
  999. target: "css;.s_tab",
  1000. where: "afterEnd",
  1001. },
  1002. },
  1003. {
  1004. name: "谷歌图片",
  1005. url: /^https?:\/\/\w{2,10}\.google(?:\.\D{1,3}){1,2}\/[^?]+\?.*&tbm=isch/i,
  1006. enabled: true,
  1007. engineList: "image",
  1008. fixedTop: 52,
  1009. style: `
  1010. left: 160px;
  1011. margin: 10px 0;
  1012. `,
  1013. insertIntoDoc: {
  1014. keyword: "css;input[name=q]",
  1015. target: "css;#yDmH0d > div.T1diZc.KWE8qe > c-wiz > div.ndYZfc",
  1016. where: "afterEnd",
  1017. },
  1018. },
  1019. {
  1020. name: "必应图片",
  1021. url: /^https?:\/\/.*\.bing\.com\/images\/search/i,
  1022. enabled: true,
  1023. fixedTop: 88,
  1024. engineList: "image",
  1025. style: `
  1026. left:160px;
  1027. margin-top:15px;
  1028. `,
  1029. insertIntoDoc: {
  1030. keyword: "css;#sb_form_q",
  1031. target: "css;#b_content",
  1032. where: "afterBegin",
  1033. },
  1034. },
  1035. {
  1036. name: "flickr",
  1037. url: /^https?:\/\/www\.flickr\.com\/search\//,
  1038. engineList: "image",
  1039. enabled: true,
  1040. style: `
  1041. z-index:1999;
  1042. width:100%;
  1043. border-top:1px solid #EBF1FF;
  1044. border-bottom:0px solid #EBF1FF;
  1045. `,
  1046. insertIntoDoc: {
  1047. keyword: function () {
  1048. var input = document.getElementById("autosuggest-input");
  1049. if (input) {
  1050. return input.value;
  1051. } else {
  1052. var m = location.search.match(/q=([^&]+)/i);
  1053. if (m) {
  1054. return decodeURIComponent(m[1]);
  1055. }
  1056. }
  1057. },
  1058. target: "css;.using-slender-advanced-panel",
  1059. where: "afterBegin",
  1060. },
  1061. },
  1062. {
  1063. name: "pixiv",
  1064. url: /^https?:\/\/www\.pixiv\.net\/search\.php/i,
  1065. engineList: "image",
  1066. enabled: true,
  1067. style: `
  1068. margin: 0 auto;
  1069. text-align: center;
  1070. font-family: 微软雅黑;
  1071. `,
  1072. insertIntoDoc: {
  1073. keyword: "css;input[name=word]",
  1074. target: "css;body",
  1075. where: "beforeBegin",
  1076. },
  1077. },
  1078. {
  1079. name: "花瓣",
  1080. url: /^https?:\/\/huaban\.com\/search\/\?/,
  1081. engineList: "image",
  1082. enabled: true,
  1083. style: `
  1084. border-top:1px solid #EBF1FF;
  1085. text-align: center;
  1086. `,
  1087. insertIntoDoc: {
  1088. keyword: "css;#query",
  1089. target: "css;#search_switch",
  1090. where: "afterEnd",
  1091. },
  1092. },
  1093. {
  1094. name: "Pinterest",
  1095. url: /^https?:\/\/www\.pinterest\.com\/search\//,
  1096. engineList: "image",
  1097. enabled: true,
  1098. style: `
  1099. text-align: center;
  1100. margin-top:-11px;
  1101. `,
  1102. insertIntoDoc: {
  1103. keyword: '//input[@name="q"]',
  1104. target: "css;.headerContainer",
  1105. where: "afterEnd",
  1106. },
  1107. },
  1108. ];
  1109. const downloadRules = [
  1110. {
  1111. name: "海盗湾thepiratebay",
  1112. url: /^https?:\/\/thepiratebay\.org\/search/i,
  1113. engineList: "bittorrent",
  1114. enabled: true,
  1115. style: `
  1116. text-align: center;
  1117. z-index: 9999;
  1118. `,
  1119. insertIntoDoc: {
  1120. keyword: "css;.inputbox",
  1121. target: "css;#SearchResults",
  1122. where: "beforeBegin",
  1123. },
  1124. },
  1125. {
  1126. name: "动漫花园",
  1127. url: /^https?:\/\/share\.dmhy\.org\/topics\/list\?keyword\=/i,
  1128. engineList: "download",
  1129. enabled: true,
  1130. style: `
  1131. text-align: center;
  1132. `,
  1133. insertIntoDoc: {
  1134. keyword: "css;#keyword",
  1135. target: "css;.table.clear",
  1136. where: "beforeBegin",
  1137. },
  1138. },
  1139. {
  1140. name: "ED2K",
  1141. url: /^https?:\/\/www\.ed2000\.com\/filelist\.asp/i,
  1142. engineList: "download",
  1143. enabled: true,
  1144. insertIntoDoc: {
  1145. keyword: "css;.searchtxt",
  1146. target: "css;.topsearch",
  1147. where: "afterEnd",
  1148. },
  1149. },
  1150. {
  1151. name: "人人影视",
  1152. url: /^https?:\/\/www\.zimuzu\.tv\/search\//,
  1153. engineList: "download",
  1154. enabled: true,
  1155. style: `
  1156. border-bottom: 1px solid #00AFFF;
  1157. text-align: center;
  1158. `,
  1159. insertIntoDoc: {
  1160. keyword: '//input[@name="q"]',
  1161. target: "css;.Header",
  1162. where: "afterEnd",
  1163. },
  1164. },
  1165. {
  1166. name: "subHD字幕",
  1167. url: /^https?:\/\/subhd\.com\/search/i,
  1168. engineList: "download",
  1169. enabled: true,
  1170. style: `
  1171. border-bottom: 0px solid #CAD9EA;
  1172. border-top: 0px solid #CAD9EA;
  1173. text-align: center;
  1174. top: -20px;
  1175. `,
  1176. insertIntoDoc: {
  1177. keyword: "css;#sn",
  1178. target: "css;.navbar.navbar-inverse",
  1179. where: "afterEnd",
  1180. },
  1181. },
  1182. ];
  1183. const translateRules = [
  1184. {
  1185. name: "谷歌翻译",
  1186. url: /^https?:\/\/translate\.google(?:\.\D{1,4}){1,2}/i,
  1187. enabled: true,
  1188. engineList: "translate",
  1189. style: `
  1190. margin:10px 0px 0px 0px;
  1191. `,
  1192. insertIntoDoc: {
  1193. keyword: "css;.D5aOJc ",
  1194. target: "css;.MOkH4e ",
  1195. where: "afterBegin",
  1196. },
  1197. },
  1198. {
  1199. name: "百度翻译",
  1200. url: /^https?:\/\/fanyi\.baidu\.com/i,
  1201. enabled: true,
  1202. engineList: "translate",
  1203. style: `
  1204. margin: -20px 0 10px 0;
  1205. `,
  1206. insertIntoDoc: {
  1207. keyword: function () {
  1208. return document.querySelector("#baidu_translate_input").value;
  1209. },
  1210. target: "css;.inner",
  1211. where: "afterBegin",
  1212. },
  1213. },
  1214. {
  1215. name: "必应词典",
  1216. url: /^https?:\/\/.*\.bing\.com\/dict\/search\?q\=/i,
  1217. enabled: true,
  1218. engineList: "translate",
  1219. style: `
  1220. margin-top:6px;
  1221. left: 148px;
  1222. `,
  1223. insertIntoDoc: {
  1224. keyword: "css;#sb_form_q",
  1225. target: "css;#b_header",
  1226. where: "beforeEnd",
  1227. },
  1228. },
  1229. {
  1230. name: "有道翻译",
  1231. url: /^https?:\/\/dict\.youdao\.com\/search/i,
  1232. enabled: true,
  1233. engineList: "translate",
  1234. fixedTop: 94,
  1235. style: `
  1236. margin:auto;
  1237. `,
  1238. insertIntoDoc: {
  1239. keyword: "css;#query",
  1240. target: "css;#container",
  1241. where: "beforeBegin",
  1242. },
  1243. },
  1244. {
  1245. name: "有道翻译2",
  1246. url: /^https?:\/\/dict\.youdao\.com\/w/i,
  1247. enabled: true,
  1248. engineList: "translate",
  1249. fixedTop: 64,
  1250. style: `
  1251. padding-left:0px;
  1252. text-align:center;
  1253. margin: 2px auto 0;
  1254. `,
  1255. insertIntoDoc: {
  1256. keyword: "css;#query",
  1257. target: "css;.c-topbar-wrapper",
  1258. where: "beforeEnd",
  1259. },
  1260. },
  1261. {
  1262. name: "海词",
  1263. url: /^https?:\/\/dict\.cn\/./,
  1264. enabled: true,
  1265. engineList: "translate",
  1266. style: `
  1267. z-index: 99;
  1268. text-align: center;
  1269. `,
  1270. insertIntoDoc: {
  1271. keyword: "css;#q",
  1272. target: "css;.main",
  1273. where: "afterBegin",
  1274. },
  1275. },
  1276. {
  1277. name: "金山词霸",
  1278. url: /^https?:\/\/www\.iciba\.com\/word/i,
  1279. enabled: true,
  1280. engineList: "translate",
  1281. fixedTop: 122,
  1282. style: `
  1283. z-index: 0;
  1284. `,
  1285. insertIntoDoc: {
  1286. keyword: '//input[@type="search"]',
  1287. target: "css;.Search_input__1qgiU",
  1288. where: "afterEnd",
  1289. },
  1290. },
  1291. ];
  1292. const shoppingRules = [
  1293. {
  1294. name: "淘宝搜索",
  1295. url: /^https?:\/\/s\.taobao\.com\/search/,
  1296. enabled: true,
  1297. engineList: "shopping",
  1298. fixedTop: 56,
  1299. style: `
  1300. margin:1em auto 0;
  1301. width: 1446px !important;
  1302. justify-content: center;
  1303. z-index: 99999;
  1304. `,
  1305. insertIntoDoc: {
  1306. keyword: function () {
  1307. var input = document.querySelector("#q");
  1308. if (input) {
  1309. return input.value;
  1310. } else {
  1311. var m = location.search.match(/q=([^&]+)/);
  1312. if (m) {
  1313. return decodeURIComponent(m[1]);
  1314. }
  1315. }
  1316. },
  1317. target: "css;div.PageContent--contentWrap--mep7AEm",
  1318. where: "beforeBegin",
  1319. },
  1320. },
  1321. {
  1322. name: "天猫超市搜索",
  1323. url: /^https?:\/\/list\.tmall\.com\/search_product\.htm.*from=chaoshi/i,
  1324. enabled: true,
  1325. engineList: "shopping",
  1326. fixedTop: 37,
  1327. style: `
  1328. z-index:9999;
  1329. margin: 2px auto -10px;
  1330. left:0;
  1331. right:0;
  1332. text-align:center;
  1333. position:absolute;
  1334. `,
  1335. insertIntoDoc: {
  1336. keyword: "css;#mq",
  1337. target: "css;.headerCon",
  1338. where: "beforeBegin",
  1339. },
  1340. },
  1341. {
  1342. name: "天猫搜索",
  1343. url: /^https?:\/\/list\.tmall\.com\/search_product\.htm/i,
  1344. enabled: true,
  1345. engineList: "shopping",
  1346. fixedTop: 34,
  1347. style: `
  1348. margin: 10px auto -10px;
  1349. text-align:center;
  1350. `,
  1351. insertIntoDoc: {
  1352. keyword: "css;#mq",
  1353. target: "css;.headerCon",
  1354. where: "beforeBegin",
  1355. },
  1356. },
  1357. {
  1358. name: "京东",
  1359. url: /^https?:\/\/search\.jd\.com\/Search/,
  1360. enabled: true,
  1361. engineList: "shopping",
  1362. style: `
  1363. text-align:center;
  1364. margin: 1em auto -0.5em auto;
  1365. `,
  1366. insertIntoDoc: {
  1367. keyword: "css;#key",
  1368. target: "css;#J_searchWrap",
  1369. where: "beforeBegin",
  1370. },
  1371. },
  1372. {
  1373. name: "苏宁",
  1374. url: /^https?:\/\/search\.suning\.com/i,
  1375. enabled: true,
  1376. engineList: "shopping",
  1377. style: `
  1378. border-bottom: 1px solid #E5E5E5;
  1379. border-top: 1px solid #E5E5E5;
  1380. margin: 1em auto;
  1381. width: 1390px !important;
  1382. text-align: center;
  1383. `,
  1384. insertIntoDoc: {
  1385. keyword: "css;#searchKeywordsHidden",
  1386. target: "css;.ng-header",
  1387. where: "afterEnd",
  1388. },
  1389. },
  1390. {
  1391. name: "1号店",
  1392. url: /^https?:\/\/search\.yhd\.com\/c0-0\/k/i,
  1393. enabled: true,
  1394. engineList: "shopping",
  1395. style: `
  1396. border-bottom: 1px solid #E5E5E5;
  1397. border-top: 1px solid #E5E5E5;
  1398. text-align: center;
  1399. `,
  1400. insertIntoDoc: {
  1401. keyword: "css;#keyword",
  1402. target: "css;#global_top_bar",
  1403. where: "afterEnd",
  1404. },
  1405. },
  1406. {
  1407. name: "什么值得买",
  1408. url: /^https?:\/\/search\.smzdm\.com\/\?/i,
  1409. enabled: true,
  1410. engineList: "shopping",
  1411. fixedTop: 40,
  1412. style: `
  1413. width: 100% !important;
  1414. margin: 0 auto 1em auto;
  1415. position: sticky;
  1416. top: 42px;
  1417. z-index: 100;
  1418. `,
  1419. insertIntoDoc: {
  1420. keyword: "css;#J_search_input",
  1421. target: "css;#content > div.content-inner",
  1422. where: "afterBegin",
  1423. },
  1424. },
  1425. {
  1426. name: "亚马逊",
  1427. url: /^https?:\/\/www\.amazon\.cn\/s\?k/i,
  1428. enabled: true,
  1429. engineList: "shopping",
  1430. style: `
  1431. margin:2px 0 -10px 0;
  1432. `,
  1433. insertIntoDoc: {
  1434. keyword: "css;#twotabsearchtextbox",
  1435. target: "css;.sg-row",
  1436. where: "afterBegin",
  1437. },
  1438. },
  1439. {
  1440. name: "1688",
  1441. url: /^https?:\/\/s\.1688\.com\/selloffer\/offer_search/i,
  1442. enabled: true,
  1443. engineList: "shopping",
  1444. fixedTop: 88,
  1445. style: `
  1446. margin:-10px auto 5px;
  1447. `,
  1448. insertIntoDoc: {
  1449. keyword: '//input[@name="keywords"]',
  1450. target: "css;.header-container",
  1451. where: "afterEnd",
  1452. },
  1453. },
  1454. {
  1455. name: "慢慢买",
  1456. url: /^https?:\/\/ss\.manmanbuy\.com\/Default\.aspx\?key/i,
  1457. enabled: true,
  1458. engineList: "shopping",
  1459. style: `
  1460. text-align:center;
  1461. `,
  1462. insertIntoDoc: {
  1463. keyword: '//input[@name="key"]',
  1464. target: "css;#resultcomment",
  1465. where: "beforeBegin",
  1466. },
  1467. },
  1468. ];
  1469. const socialityRules = [
  1470. {
  1471. name: "新浪微博",
  1472. url: /^https?:\/\/s\.weibo\.com\/weibo\//i,
  1473. enabled: true,
  1474. engineList: "sociality",
  1475. fixedTop: 48,
  1476. style: `
  1477. width: auto !important;
  1478. position: sticky;
  1479. top:70px;
  1480. margin: 1em 0 0.6em 15em;
  1481. z-index: 10;
  1482. `,
  1483. insertIntoDoc: {
  1484. keyword: "css;.woo-input-main",
  1485. target: "css;.m-main .woo-box-flex",
  1486. where: "beforeBegin",
  1487. },
  1488. },
  1489. {
  1490. name: "百度贴吧全吧搜索",
  1491. url: /^https?:\/\/tieba\.baidu\.com\/f\/search/i,
  1492. enabled: true,
  1493. engineList: "sociality",
  1494. fixedTop: 60,
  1495. style: `
  1496. left: 121px;
  1497. `,
  1498. insertIntoDoc: {
  1499. keyword: "css;#wd1",
  1500. target: "css;#head > div.search_main_wrap",
  1501. where: "afterEnd",
  1502. },
  1503. stylish: `@media screen and (min-width: 1920px){#sej-container{left:424px !important;}}`,
  1504. },
  1505. {
  1506. name: "百度贴吧",
  1507. url: /^https?:\/\/tieba\.baidu\.com\/f/i,
  1508. enabled: true,
  1509. engineList: "sociality",
  1510. fixedTop: 60,
  1511. style: `
  1512. margin: 0 auto 1em;
  1513. z-index: 10;
  1514. `,
  1515. insertIntoDoc: {
  1516. keyword: "css;#wd1",
  1517. target: "css;#head",
  1518. where: "afterEnd",
  1519. },
  1520. },
  1521. {
  1522. name: "豆瓣1",
  1523. url: /^https?:\/\/(movie|music|book)\.douban\.com\/subject_search?/,
  1524. enabled: true,
  1525. engineList: "sociality",
  1526. style: `
  1527. border-top: 1px solid #e5e5e5;
  1528. text-align: center;
  1529. border-bottom: 1px solid #e5e5e5;
  1530. margin-bottom: 1px;
  1531. `,
  1532. insertIntoDoc: {
  1533. keyword: "css;#inp-query",
  1534. target: "css;.nav-secondary",
  1535. where: "afterEnd",
  1536. },
  1537. },
  1538. {
  1539. name: "豆瓣2",
  1540. url: /^https?:\/\/www\.douban\.com\/search/i,
  1541. enabled: true,
  1542. engineList: "sociality",
  1543. style: `
  1544. margin: -1em 0 1em 7em;
  1545. position: sticky;
  1546. top: 0.1em;
  1547. `,
  1548. insertIntoDoc: {
  1549. keyword:
  1550. "css;#content > div > div.article > div.mod-search > form > fieldset > div.inp > input",
  1551. target: "css;#content > div > div.article > div.mod-search",
  1552. where: "afterEnd",
  1553. },
  1554. },
  1555. {
  1556. name: "微信(搜狗)",
  1557. url: /^https?:\/\/weixin\.sogou\.com\/weixin\?/,
  1558. enabled: true,
  1559. engineList: "sociality",
  1560. fixedTop: 55,
  1561. style: "width: 1000px !important;margin: 8px auto -5px;z-index:99;",
  1562. insertIntoDoc: {
  1563. keyword: "//input[@name='query']",
  1564. target: "css;#main",
  1565. where: "afterBegin",
  1566. },
  1567. },
  1568. {
  1569. name: "小红书",
  1570. url: /^https?:\/\/www\.xiaohongshu\.com\/search_result/,
  1571. enabled: true,
  1572. engineList: "sociality",
  1573. style: `
  1574. margin: -1em auto 1em;
  1575. position: sticky;
  1576. top: -1em;
  1577. `,
  1578. insertIntoDoc: {
  1579. keyword:
  1580. "css;#app > div.layout > div.header-container.showSearchBoxOrHeaderFixed > header > div.input-box > input",
  1581. target:
  1582. "css;#app > div.layout > div.main-container > div.feeds-page > div.middle",
  1583. where: "beforeBegin",
  1584. },
  1585. },
  1586. ];
  1587. const scholarRules = [
  1588. {
  1589. name: "百度学术",
  1590. url: /^https?:\/\/xueshu\.baidu\.com\/(?:s|baidu)/,
  1591. enabled: true,
  1592. engineList: "scholar",
  1593. style: `
  1594. text-align: center;
  1595. position: sticky;
  1596. top:62px;
  1597. z-index:99999;
  1598. `,
  1599. insertIntoDoc: {
  1600. keyword: "css;input#kw",
  1601. target: "css;#container",
  1602. where: "afterBegin",
  1603. },
  1604. },
  1605. {
  1606. name: "谷歌学术",
  1607. enabled: true,
  1608. url: /^https?:\/\/scholar\.google(?:\.\D{1,3}){1,2}\/scholar\?/,
  1609. engineList: "scholar",
  1610. style: `
  1611. z-index:1001;
  1612. position:relative;
  1613. margin: 1em 0 0.5em 11em;
  1614. position: sticky;
  1615. top: 0.1em;
  1616. `,
  1617. insertIntoDoc: {
  1618. target: "css;#gs_ab",
  1619. keyword: '//input[@name="q"]',
  1620. where: "beforeBegin",
  1621. },
  1622. },
  1623. {
  1624. name: "cnki",
  1625. url: /^https?:\/\/kns\.cnki\.net\/kns8\/defaultresult\/index/i,
  1626. enabled: true,
  1627. engineList: "scholar",
  1628. style: `
  1629. border-top:1px solid #D9E1F7;
  1630. border-bottom:1px solid #D9E1F7;
  1631. margin:0.6em 0 0.5em 465px;
  1632. position: sticky;
  1633. top: 0.1em;
  1634. `,
  1635. insertIntoDoc: {
  1636. keyword: "css;#txt_search.search-input",
  1637. target: "css;.search-box",
  1638. where: "afterEnd",
  1639. },
  1640. },
  1641. {
  1642. name: "知网",
  1643. enabled: true,
  1644. url: /^https?:\/\/epub\.cnki\.net\/kns\/brief\/default_result\.aspx/i,
  1645. engineList: "scholar",
  1646. style: `
  1647. border-bottom:1px solid #E5E5E5;
  1648. border-top:1px solid #E5E5E5;
  1649. z-index:999;
  1650. position:relative;
  1651. `,
  1652. insertIntoDoc: {
  1653. keyword: "css;#txt_1_value1",
  1654. target: "css;#TopSearchBar",
  1655. where: "afterEnd",
  1656. },
  1657. },
  1658. {
  1659. name: "万方",
  1660. enabled: true,
  1661. url: /^https?:\/\/s\.wanfangdata\.com\.cn\/Paper/i,
  1662. engineList: "scholar",
  1663. style: `
  1664. z-index:999;
  1665. width: 1200px !important;
  1666. margin: 1em auto 1em;
  1667. position:sticky;
  1668. top: 0.1em;
  1669. justify-content: center;
  1670. `,
  1671. insertIntoDoc: {
  1672. keyword: "css;input.search-input",
  1673. target: "css;.me-container.container-wrapper",
  1674. where: "beforeBegin",
  1675. },
  1676. },
  1677. {
  1678. name: "EBSCO",
  1679. enabled: true,
  1680. url: /^https?:\/\/.*?ebscohost\.com\/.*?results/i,
  1681. engineList: "scholar",
  1682. style: `
  1683. border-bottom:1px solid #E5E5E5;
  1684. border-top:1px solid #E5E5E5;
  1685. position:relative;
  1686. `,
  1687. insertIntoDoc: {
  1688. keyword: "css;#SearchTerm1",
  1689. target: "css;#findFieldOuter",
  1690. where: "afterend",
  1691. },
  1692. },
  1693. {
  1694. name: "Springer",
  1695. enabled: true,
  1696. url: /^https?:\/\/link\.springer\.com\/search\?query=/i,
  1697. engineList: "scholar",
  1698. style: `
  1699. border-bottom:1px solid #E5E5E5;
  1700. border-top:1px solid #E5E5E5;
  1701. position:relative;
  1702. `,
  1703. insertIntoDoc: {
  1704. keyword: "css;#query",
  1705. target: "css;#content",
  1706. where: "beforeBegin",
  1707. },
  1708. },
  1709. {
  1710. name: "JSTOR",
  1711. enabled: true,
  1712. url: /^https?:.*?jstor.org\/action\/doAdvancedSearch/i,
  1713. engineList: "scholar",
  1714. style: `
  1715. border-bottom:1px solid #E5E5E5;
  1716. border-top:1px solid #E5E5E5;
  1717. position:relative;
  1718. `,
  1719. insertIntoDoc: {
  1720. keyword: "css;#searchBox",
  1721. target: "css;.tabs-search-results",
  1722. where: "beforeBegin",
  1723. },
  1724. },
  1725. ];
  1726. const enterpriseRules = [
  1727. // 用户补充: kidzgy
  1728. // https://greatest.deepsurf.us/zh-CN/scripts/27752/discussions/90497
  1729. {
  1730. name: "企查查",
  1731. url: /^https?:\/\/www\.qcc\.com\/(?:web|firm|)/,
  1732. engineList: "enterprise",
  1733. enabled: true,
  1734. fixedTop: 56,
  1735. style: `
  1736. width:1250px;
  1737. margin: 0 auto;
  1738. padding-left: 15px;
  1739. `,
  1740. insertIntoDoc: {
  1741. keyword: "css;#searchKey",
  1742. target: "css;.app-nheader",
  1743. where: "AfterEnd",
  1744. },
  1745. stylish:
  1746. " .bigsearch-nav.fixed > .nav-wrap { position: static !important; }",
  1747. },
  1748. {
  1749. name: "天眼查",
  1750. url: /^https?:\/\/www\.tianyancha\.com\/(?:search|company)/,
  1751. engineList: "enterprise",
  1752. enabled: true,
  1753. fixedTop: 73,
  1754. style: `
  1755. top:80px;
  1756. margin: 0 auto;
  1757. width:1248px;
  1758. `,
  1759. insertIntoDoc: {
  1760. keyword: "css;#header-company-search",
  1761. target: "css;.tyc-header",
  1762. where: "AfterEnd",
  1763. },
  1764. stylish:
  1765. "#web-content.mt122{margin-top:90px !important} .search-bar{position:static !important}",
  1766. },
  1767. ];
  1768. const codingRules = [
  1769. {
  1770. name: "Runoob",
  1771. enabled: true,
  1772. url: /^https?:.*?runoob\.com\//i,
  1773. engineList: "mine",
  1774. style: `
  1775. border-bottom:1px solid #E5E5E5;
  1776. border-top:1px solid #E5E5E5;
  1777. position:relative;
  1778. text-align:center;
  1779. margin: 0 auto 2em;
  1780. `,
  1781. insertIntoDoc: {
  1782. keyword: function () {
  1783. var url = window.location.href.substring(
  1784. window.location.href.lastIndexOf("=") + 1
  1785. );
  1786. return decodeURIComponent(url);
  1787. },
  1788. target: "css;.main>.row",
  1789. where: "afterBegin",
  1790. },
  1791. },
  1792. {
  1793. name: "GitHub",
  1794. enabled: true,
  1795. url: /^https?:\/\/github\.com\/search/i,
  1796. engineList: "mine",
  1797. fixedTop: 2,
  1798. style: `
  1799. margin: 1em auto;
  1800. `,
  1801. insertIntoDoc: {
  1802. keyword: 'css;span[data-target="search-input.inputButtonText"]',
  1803. target:
  1804. "css;body > div.logged-in.env-production.page-responsive.full-width > div.application-main > main",
  1805. where: "beforeBegin",
  1806. },
  1807. },
  1808. {
  1809. name: "MDN",
  1810. enabled: true,
  1811. url: /^https?:\/\/developer\.mozilla\.org\/.{2,5}\/search/,
  1812. engineList: "mine",
  1813. style: `
  1814. position:relative;
  1815. text-align:center;
  1816. `,
  1817. insertIntoDoc: {
  1818. keyword: function () {
  1819. var url = window.location.href.substring(
  1820. window.location.href.lastIndexOf("=") + 1
  1821. );
  1822. return decodeURIComponent(url);
  1823. },
  1824. target: "css;.results-search-form",
  1825. where: "afterEnd",
  1826. },
  1827. },
  1828. ];
  1829.  
  1830. const searchEngineJumpPlusRules = [
  1831. ...webRules,
  1832. ...knowledgeRules,
  1833. ...videoRules,
  1834. ...musicRules,
  1835. ...imageRules,
  1836. ...downloadRules,
  1837. ...translateRules,
  1838. ...shoppingRules,
  1839. ...socialityRules,
  1840. ...scholarRules,
  1841. ...enterpriseRules,
  1842. ...codingRules,
  1843. ];