Last active
December 15, 2015 14:49
-
-
Save raa0121/5277220 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name lingr_nicovideo | |
// @namespace raa0121 & supermomonga | |
// @description lingr_nicovideo | |
// @include http://lingr.com/* | |
// @version 1 | |
// ==/UserScript== | |
$(function(){ | |
setInterval(function(){ | |
$('.speaker[href="/bot/nicothumb"]').each(function(){$(this).parent().css('display','none')}); | |
$('.decorated a').filter(function(){ | |
return this.href.match(/^http:\/\/(www.)?nico(.ms|video.jp\/watch\/)((sm|nm)?\d+)\??/); | |
}).each(function(){ | |
this.href.match(/^http:\/\/(www.)?nico(.ms|video.jp\/watch\/)((sm|nm)?\d+)\??/); | |
$(this).replaceWith('<iframe style="width: 312px;height: 176px; border: 1px solid #333;" frameborder="0" scrolling="no" src="http://ext.nicovideo.jp/thumb/' + RegExp.$3 + '"></iframe>') | |
}) | |
$('.decorated a').filter(function(){ | |
return this.href.match(/^http:\/\/(live.)?nico(.ms|video.jp\/watch\/)(lv\d+)\??/); | |
}).each(function(){ | |
this.herf.match(/^http:\/\/(live.)?nico(.ms|video.jp\/watch\/)(lv\d+)\??/); | |
$(this).replaceWith('<iframe style="width: 312px;height: 176px; border: 1px solid #333;" frameborder="0" scrolling="no" src="http://live.nicovideo.jp/embed/' + RegExp.$3 + '"></iframe>') | |
}) | |
},1000); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment