Greasy Fork

来自缓存

Greasy Fork is available in English.

Google搜索网址还原/Change Google URL back

将Google搜索结果隐藏不显示的url还原,让其继续显示。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name     Google搜索网址还原/Change Google URL back
// @version  1.0.3
// @icon         https://www.iconfinder.com/icons/682665/download/png/32
// @description  将Google搜索结果隐藏不显示的url还原,让其继续显示。
// @author       Mrxn
// @homepage     https://mrxn.net/
// @namespace    http://tampermonkey.net/
// @include    /(http|https):\/\/www\.google\.(ca|co\.in|co\.uk|com|com\.br|de|es|fr|it|pl|ru)\/search\?/
// @grant    none
// ==/UserScript==

(function () {
    'use strict';
    Array.from(document.querySelectorAll('cite')).forEach(el => el.textContent = el.parentElement.parentElement.href);
    // forEach method, could be shipped as part of an Object Literal/Module
    var forEach = function (array, callback, scope) {
        for (var i = 0; i < array.length; i++) {
            callback.call(scope, i, array[i]); // passes back stuff we need
        }
    };
    // optionally change the scope as final parameter too, like ECMA5
    var all_cites = document.querySelectorAll('cite');
    forEach(all_cites, function (index) {
        all_cites[index].setAttribute("style", "word-break: break-word; white-space: pre-wrap;display: inline-block;");
    })
})();