feedmeter Hash

  • /*
     * @title feedmeter Hash
     * @description feedmeter のランキングでカレント表示。ランキング外には反応しません
     * @include http://feedmeter.net/*
     * @license MIT License
     * @require 
     */
    
    // for example //feedmeter.net/detail.php?r=http%3A%2F%2Fdeveloper.cybozu.co.jp%2Fakky%2Fatom.xml
    
    (function(l){
      if (l.indexOf('?r=') < 0) return;
      var feed = decodeURIComponent(l).replace('?r=', '');
      if (feed.match(/^https?\:\/\//)) {
        var selector = 'td:nth-child(3) a[href="' + feed + '"]';
        Array.prototype.slice.call(document.querySelectorAll(selector)).forEach(function (f) {
          f.parentNode.parentNode.style.background = '#ddd';
          f.parentNode.parentNode.id = '__current';
          window.location.hash = '__current';
        });
      }
    })(window.location.search);
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2015/03/01 22:57:07 - 2015-03-01