google_http_warning2

Google検索結果でhttpは警告色で目立つようにする。(新デザイン用2020.1.15)

Stan na 16-01-2020. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name        google_http_warning2
// @namespace   https://catherine.v0cyc1pp.com/
// @include     https://www.google.co.jp/search?*
// @include     https://www.google.com/search?*
// @author      greg10
// @run-at      document-end
// @license     GPL 3.0
// @version     0.4
// @grant       none
// @description Google検索結果でhttpは警告色で目立つようにする。(新デザイン用2020.1.15)
// ==/UserScript==

console.log("google_http_warning2 start");


function sub() {

    document.querySelectorAll(".r > a").forEach(function(elem) {
        var href = elem.href;
        if (href == "") return;
        var index = href.indexOf("https");
        if (index == 0) return;
        elem.style.color = "#cc6600";
        elem.style.backgroundColor = "#eeeeee";

    });


    document.querySelectorAll("cite").forEach(function(elem) {
        var parent = elem.parentNode;
        var img = parent.firstElementChild;
        var href = img.alt;
        if (href == "") return;
        var index = href.indexOf("https");
        if (index == 0) return;
        elem.style.color = "#cc6600";
        elem.style.backgroundColor = "#eeeeee";
    });

}

function main() {
    sub();
}


main();