Created
May 7, 2012 15:46
-
-
Save fushihara/2628534 to your computer and use it in GitHub Desktop.
ニコニコ動画Zero 外見修正
This file contains 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 ZeroFix | |
// @include http://www.nicovideo.jp/watch/* | |
// ==/UserScript== | |
(function(){ | |
var $,$$,e,t="",f1,f2,f3; | |
$=function(e){return document. querySelector(e);}; | |
$$=function(n,i){var e;e=document.createElement(n);e.innerHTML=i;return e;} | |
f1=function(){ | |
//最初に一度だけやればいい | |
//タイトル欄 | |
title=$("#videoHeaderDetail .videoDetailExpand h2").innerText; | |
$("#videoHeaderDetail").removeChild($("#videoHeaderDetail .videoDetailExpand")); | |
e=$$("h2",title);e.style.fontSize="large"; | |
$("#videoHeaderDetail").insertBefore(e,$("#videoDetailInformation")); | |
//説明文強制表示 | |
e=$("#videoDetailInformation");e.style.display="block"; | |
//説明文強制表示 | |
e=$$("div",""); | |
e.appendChild($("#videoTagContainer div"));e.appendChild($("#videoTagContainer div"));e.appendChild($("#videoTagContainer div")); | |
$("#videoHeaderDetail").appendChild(e); | |
$("#videoHeaderDetail").removeChild($("#videoTagContainer")); | |
e.id="videoTagContainer"; | |
$("#videoTagContainer").removeChild($("#videoTagContainer .filter")); | |
}; | |
f2=function(){ | |
//常にやってればいい | |
console.log("f2"); | |
e=$("#videoTagContainer"); | |
e.style.height="auto";e.style.position="static"; | |
e=$("#videoDetailInformation");e.style.display="block"; | |
}; | |
f3=function(){ | |
//URLが変わった時だけやればいい | |
if(t==$("#videoHeaderDetail>h2").innerText){return;} | |
t=$("#videoHeaderDetail>h2").innerText; | |
//市場 | |
while($("#ichibaPanel").hasChildNodes()){ | |
$("#ichibaPanel").removeChild($("#ichibaPanel").firstChild); | |
} | |
//コピー開始 | |
$("#ichibaPanel").appendChild($("#videoInfoHead").cloneNode(true)); | |
$("#ichibaPanel").appendChild($("#videoStats").cloneNode(true)); | |
$("#ichibaPanel").appendChild($("#hiddenUserProfile").cloneNode(true)); | |
$("#ichibaPanel").appendChild($("#userProfile").cloneNode(true)); | |
}; | |
f1(); | |
setInterval(f2,100); | |
setInterval(f3,100); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment