blomagaを見やすくする

  • /*
     * @title blomagaを見やすくする
     * @description 白いのが邪魔だったからいい機会なので広告も消すようにして若干ScrapBookとかを意識しておいた
     * @include http://ch.nicovideo.jp/*
     * @license 未定
     * @require 
     */
    
    (function(){
    	if(!(location.href.match(/ch\.nicovideo\.jp\/\w+\/blomaga\/ar\w+/))){return null;}
    	c=function(w){
    		var i=0;
    		var j=[];
    		while(i<w.length){j.push(w[i]);i+=1;}
    		return j;
    	}
    	var h=
    		'#blog section.content_body.article_watch.blog_background.user_blog article.main div.ads_list_area'
    		+',html.gecko body.ja.channel.personal footer.site'
    		+',html.gecko body.ja.channel.personal section.site_body article.content.white footer.content'
    		+',html.gecko body.ja.channel.personal section.site_body article.content.white div.notice_container div.notice_article_container_bg'
    		+',#article_blog_title_area div.article_blog_title_area_r div.btn_position';
    
    	var f=c(document.querySelectorAll(h));
    	var e;
    	while(e=f.shift()){
    		e.parentNode.removeChild(e);
    	}
    	
    	
    	function r(){
    		var z=null;
    		var y=document.querySelectorAll
    				('html.gecko body.ja.channel.personal header.site'+
    				',#blog section.content_body.article_watch.blog_background.user_blog article.main div.report_violation_btn'+
    				',#comment_area'+
    				',#blog section.content_body.article_watch.blog_background.user_blog article.main div.article_end_data');
    		document.querySelectorAll('#blog section.content_body.article_watch.blog_background.user_blog')[0].outerHTML=document.querySelectorAll('#blog section.content_body.article_watch.blog_background.user_blog article.main div.main_blog_txt')[0].outerHTML;
    		y=c(y);
    		while(z=y.shift())z.parentNode.removeChild(z);
    	}
    	(function(s,f){
    		try{
    			GM_registerMenuCommand(s.toString(),f);
    		}catch(e){
    			console.log(e);
    			f();
    		}
    	})("blomagaをScrapBook用にいろいろ減らす",r);
    })();
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2014/08/15 00:55:29 - 2014-08-15
  2. 2014/08/14 22:09:31 - 2014-08-14
  3. 2014/08/09 12:44:05 - 2014-08-09
  4. 2014/08/09 12:43:30 - 2014-08-09