百度搜索加Google、头条搜索按钮

Add Google on Baidu searcher

// ==UserScript==
// @name         百度搜索加Google、头条搜索按钮
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Add Google on Baidu searcher
// @author       aniu
// @match        https://www.baidu.com/*
// @grant        GM_openInTab
// ==/UserScript==
(function() {
    'use strict';
    $('#su').after('<div style="position: absolute;left: 115px;top: 0px;"><input type="button" id="google" value="Google搜索" class="btn bg s_btn" style="background-color:orange;" /></div><div style="position: absolute;left: 230px;top: 0px;"><input type="button" id="toutiao" value="头条搜索" class="btn bg s_btn" style="background-color:red;" /></div>');
    $("#google").click(function() {
        var searchText = $('#kw').val();
        GM_openInTab('https://www.google.com/search?q=' + document.getElementById('kw').value, false);
    });
    $("#toutiao").click(function() {
        var searchText = $('#kw').val();
        GM_openInTab('https://www.toutiao.com/search/?keyword=' + document.getElementById('kw').value, false);
    });
})();