Skip to content

Instantly share code, notes, and snippets.

@raa0121
Last active December 15, 2015 14:49
Show Gist options
  • Save raa0121/5277220 to your computer and use it in GitHub Desktop.
Save raa0121/5277220 to your computer and use it in GitHub Desktop.
// ==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