Google検索に英語だけの検索結果を表示させるボタンを追加

Google検索にはツール機能を使うことで日本語のみの検索結果にはできるが、英語のみの検索結果を表示できないため作成した。

// ==UserScript==
// @namespace    http://tampermonkey.net/
// @name         Google検索に英語だけの検索結果を表示させるボタンを追加
// @description  Google検索にはツール機能を使うことで日本語のみの検索結果にはできるが、英語のみの検索結果を表示できないため作成した。
// @author       2001Y
// @include      https://www.google.com/search?*
// @version      1.0
// ==/UserScript==

(function() {
    'use strict';

    var html = '<div id="us_ctrlcenter"><div><a href="javascript:urlPara(&quot;lr&quot;,&quot;lang_en&quot;);">英語</a><a href="javascript:urlPara(&quot;lr&quot;,&quot;lang_ja&quot;);">日本語</a></div><div></div><a href="javascript:urlPara(&quot;tbs&quot;,&quot;qdr:w1&quot;);">1週間</a><a href="javascript:urlPara(&quot;tbs&quot;,&quot;qdr:m1&quot;);">1ヶ月</a><a href="javascript:urlPara(&quot;tbs&quot;,&quot;qdr:m6&quot;);">6ヶ月</a><a href="javascript:urlPara(&quot;tbs&quot;,&quot;qdr:y1&quot;);">1年間</a><a href="javascript:urlPara(&quot;tbs&quot;,&quot;qdr:y3&quot;);">3年間</a></div><style>#us_ctrlcenter {position: absolute;top: 150px;left: 24px;}#us_ctrlcenter a {color: #70757a;display: block;}#us_ctrlcenter div {margin-bottom:10px;}</style><script>function urlPara(e1,e2){    let url = new URL(window.location);    url.searchParams.set(e1, e2);    window.location.href = url;}</script>';

    var table = document.body;
    var range = document.createRange();
    range.selectNodeContents(table);
    var frag = range.createContextualFragment(html);
    table.appendChild(frag);
})();