Last active
October 27, 2021 01:47
-
-
Save monoglo/a5864f58da1fcebae50cfbcf4ea9a0c6 to your computer and use it in GitHub Desktop.
Revisions
-
monoglo revised this gist
Oct 23, 2021 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ // @author rankOfMatrix // @match *://www.baidu.com/ // @match *://www.baidu.com/* // @icon https://www.google.cn/favicon.ico // @grant none // ==/UserScript== @@ -20,7 +20,7 @@ link.rel = 'icon'; document.getElementsByTagName('head')[0].appendChild(link); } link.href = 'https://www.google.cn/favicon.ico'; let logo = document.getElementById("s_lg_img") logo.src = "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png" -
monoglo created this gist
Oct 23, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,45 @@ // ==UserScript== // @name Baidu to Google // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author rankOfMatrix // @match *://www.baidu.com/ // @match *://www.baidu.com/* // @icon https://www.google.com/s2/favicons?domain=google.com // @grant none // ==/UserScript== (function() { 'use strict'; document.title = 'Google'; var link = document.querySelector("link[rel~='icon']"); if (!link) { link = document.createElement('link'); link.rel = 'icon'; document.getElementsByTagName('head')[0].appendChild(link); } link.href = 'https://www.google.com/s2/favicons?domain=google.com'; let logo = document.getElementById("s_lg_img") logo.src = "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png" logo.height = 92 logo.style.margin = "50px 0 0 0" let searchbar = document.getElementById("kw") let form = document.getElementById("form") form.onsubmit = function() { window.location.href = "https://www.google.com/search?q=" + searchbar.value } let logohref = document.getElementById("s_mp").lastElementChild logohref.href = "https://www.google.com" let button = document.getElementById("su") setTimeout(function() { button.value = "谷歌一下" }, 100) })();