Hatena::Let

  • /*
     * @title Hatena::Let
     * @description Hatena::Let用にかいたのをいろいろまとめた。たまに修正もしたけど、ちなみにUSERってのはForkして書き換えてインストールとか思ってたら作者はForkできなかったから別にもういいやっていうあれです。というかコピーしただけだし要らない気がする(←うるさい)
     * @include http*
     * @license MIT License
     * @require 
     */
    
    // http://let.hatelabo.jp/********/let/gYC-**********
    // http://let.hatelabo.jp/mafucode/let/gYC-x5SDvu69FA
    // http://let.hatelabo.jp/mafucode/let/gYC-y5XlrOu8fA
    // http://let.hatelabo.jp/mafucode/let/gYC-x8Lp6KbqaQ/rev/gYC-y8Tvpri4Bg
    // http://let.hatelabo.jp/mafucode/let/gYC-y7KWmIejFQ/rev/gYC-y8Tyory0DQ
    
    (function(){
    USER={
      userID:"",
      API_key:"",
    };
    
    if( (USER.userID.length!=0)&&(USER.API_key.length!=0) ){
    GM_registerMenuCommand('Debuglet',(function(){
    
    "http://let.hatelabo.jp/"+USER.userID+"/t/"+USER.API_key+" (arg)".
    replace(/(\S+)\s+(\S*)/,function(s,url,arg){s=document.createElement("script");s.charset="utf-8";s.src=url+"?s="+encodeURIComponent(arg);document.body.appendChild(s)});
    
    }))}
    
    GM_registerMenuCommand("Hatena::Let",(function(){window.open("http://let.hatelabo.jp/l");}));
    
    (function() {
    	if (document.getElementsByClassName('javascript').length > 0) {
    
    		newElem_000001 = document.createElement('a');
    
    		newElem_000001.innerHTML = "<nobr>Run</nobr>"
    
    		document.getElementsByClassName('information')[0]
    				.getElementsByTagName('div')[0].innerHTML = "\n      "
    				+ document.getElementsByClassName('information')[0]
    						.getElementsByTagName('div')[0].innerHTML;
    
    		newElem_000001 = document.getElementsByClassName('information')[0]
    				.getElementsByTagName('div')[0].insertBefore(newElem_000001,
    				document.getElementsByClassName('information')[0]
    						.getElementsByTagName('div')[0].firstChild);
    
    		newElem_000001.addEventListener('click', (function() {
    			(location.href + ".bookmarklet.js (arg)").replace(/(\S+)\s+(\S*)/, function(s,
    					url, arg) {
    				s = document.createElement("script");
    				s.charset = "utf-8";
    				s.src = url + "?s=" + encodeURIComponent(arg);
    				document.body.appendChild(s);
    
    			});
    		}), false);
    
    	}
    })();
    
    if (location.host == "let.hatelabo.jp") {
    	document.querySelectorAll('.menu')[0].innerHTML ='<li class="search"><form action="#" id="search_" style="display:inline;"><input type="text" id="search_q"></form></li>'+ document.querySelectorAll('.menu')[0].innerHTML;
    	document.getElementById('search_').addEventListener('submit',(function() {
    				window.open("https://www.google.co.jp/search?q="
    						+ encodeURIComponent(
    								document.getElementById('search_q').value)
    						+ "&as_sitesearch=let.hatelabo.jp/");
    			}), false);
    }
    
    if (location.host=="let.hatelabo.jp") {
     if (location.pathname.split('/').length == 6) {
     	document.querySelector('div.rev').querySelector(
     			'a[href="' + location.pathname + '"]').parentNode.innerHTML += "<strong>←これ</strong>";
     }else if(location.pathname.split('/').length == 4){
     	document.querySelector('div.rev').querySelector(
     			'a').parentNode.innerHTML += "<strong>←これ</strong>";
     }
    }
    })();
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2013/05/19 12:09:42 - 2013-05-19
  2. 2013/04/20 20:14:01 - 2013-04-20
  3. 2013/04/20 20:13:33 - 2013-04-20
  4. 2013/04/20 20:04:46 - 2013-04-20
  5. 2013/04/20 19:39:56 - 2013-04-20
  6. 2013/04/20 19:38:35 - 2013-04-20
  7. 2013/04/20 19:34:50 - 2013-04-20
  8. 2013/04/20 19:34:37 - 2013-04-20
  9. 2013/04/20 17:05:35 - 2013-04-20
  10. 2013/04/20 16:38:18 - 2013-04-20