谷歌带百度

google with baidu ok

目前为 2019-03-11 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name 谷歌带百度
  3. // @namespace https://github.com/kana112233/Tampermonkey-user-js
  4. // @version 1.0.1
  5. // @description google with baidu ok
  6. // @author makey
  7. // @grant GM_openInTab
  8. // @include https://www.google.com/*
  9. // @require https://cdn.staticfile.org/jquery/1.12.4/jquery.min.js
  10.  
  11. // ==/UserScript==
  12. (function() {
  13. 'use strict';
  14.  
  15. function getBaiduOnceUrl(searchText) {
  16. return 'https://www.baidu.com/s?wd=' + searchText;
  17. }
  18. function BaiduOnce() {
  19. var searchText = document.querySelector('.gLFyf').value;
  20. GM_openInTab( getBaiduOnceUrl(searchText), false);
  21. }
  22. $('#gbqfbb').after('<input type="button" id="baiduId" value="百度一下" class="btn self-btn bg s_btn" style="background-color:#f2f2f2;border:1px solid #f2f2f2;border-radius: 4px;width:142.5px;height:36px" />');
  23. $('#hdtb-msb').after('<input type="button" id="baiduId" value="百度一下" class="btn self-btn bg s_btn" style="background-color:#f2f2f2;border:1px solid #f2f2f2;border-radius: 4px;width:142.5px;height:36px" />');
  24.  
  25. $("#baiduId").click(function() {
  26. BaiduOnce();
  27. });
  28.  
  29. })();

QingJ © 2025

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