まるごとRSSへ登録

  • /*
     * @title まるごとRSSへ登録
     * @description ページ上からRSSのURLを探してまるごとRSSのページへ行く
     * @include http://*
     * @license MIT License
     * @require 
     */
      var el=document.getElementsByTagName("link");
      var flag=false;
      for(i=0;i<el.length;i++){
        if(!flag&&el[i].getAttribute("rel")=="alternate"&&/(xml|rss)/.test(el[i].getAttribute("type"))){
          window.open('http://mrss.dokoda.jp/analyze/?url='+encodeURIComponent(el[i].href),'_blank');
          flag=true;
        }
      }
      if(!flag){
        window.open('http://mrss.dokoda.jp/analyze/?url='+encodeURIComponent(location.href),'_blank');
      }
    
    
    
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2010/05/15 22:22:02 - 2010-05-15