count of cookpad.com @ Google search

    @@ -11,6 +11,13 @@ console.log(cookpad.href); n += 1; }); - alert("cookpad: " + n); +// alert("cookpad: " + n); + var span = document.createElement("span"); + span.innerHTML = "cookpad: " + n; + span.style.marginLeft = "2em"; + span.style.fontSize = "medium"; + span.style.color = "#800"; + var target = document.getElementById("resultStats"); + target.appendChild(span); })();
  • /*
     * @title count of cookpad.com @ Google search
     * @description http://a-kuma3.hatenablog.com/entry/google_vs_cookpad
     * @include http://www.google.com/
     * @license MIT License
     * @javascript_url
     */
    (function() {
        var n = 0;
        Array.prototype.forEach.call(document.querySelectorAll('h3.r a[href*="//cookpad.com/"]'), function(cookpad) {
            console.log(cookpad.href);
            n += 1;
        });
    //  alert("cookpad: " + n);
        var span = document.createElement("span");
        span.innerHTML = "cookpad: " + n;
        span.style.marginLeft = "2em";
        span.style.fontSize = "medium";
        span.style.color = "#800";
        var target = document.getElementById("resultStats");
        target.appendChild(span);
    })();
    
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2017/01/24 09:06:52 - 2017-01-24
  2. 2017/01/21 18:57:27 - 2017-01-21