(function(){var p,s,l,t,w,y,u,r,v,z,C,q,x,A=Array.prototype.slice,D=Object.prototype.hasOwnProperty,B=function(a,d){function b(){this.constructor=a}for(var c in d)D.call(d,c)&&(a[c]=d[c]);b.prototype=d.prototype;a.prototype=new b;a.__super__=d.prototype;return a};w=t=l=s=void 0;s={};l={};v=r=void 0;r=function(){function a(){}a.id=function(a,b){null==b&&(b=document);return b.getElementById(a)};a.className=function(){return"function"===typeof document.getElementsByClassName?function(a,b){null==b&&(b=
document);return b.getElementsByClassName(a)}:"function"===typeof document.querySelectorAll?function(a,b){null==b&&(b=document);return b.querySelectorAll("."+a)}:function(a,b){var c,f,e,h,g,k;null==b&&(b=document);f=RegExp("(?:^| )"+a+"(?: |$)");g=b.getElementsByTagName("*");k=[];e=0;for(h=g.length;e<h;e++)c=g[e],null!=c.className&&f.test(c.className)&&k.push(c);return k}}();a.tagName=function(a,b){null==b&&(b=document);return b.getElementsByTagName(a)};a.tagAndClassName=function(){return"function"===
typeof document.getElementsByClassName||"function"===typeof document.querySelectorAll?function(d,b,c){var f,e,h,g;d=d.toUpperCase();e=a.className(b);g=[];c=0;for(f=e.length;c<f;c++)b=e[c],(null!=(h=b.nodeName)?h.toUpperCase():void 0)===d&&g.push(b);return g}:function(a,b,c){var f,e,h;null==c&&(c=document);b=RegExp("(?:^| )"+b+"(?: |$)");e=c.getElementsByTagName(a);h=[];c=0;for(f=e.length;c<f;c++)a=e[c],null!=a.className&&b.test(a.className)&&h.push(a);return h}}();return a}();y=void 0;q=function(a){var d;
d={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;","&":"&amp;"};return String(null!=a?a:"").replace(/[<>"'&]/g,function(b){return d[b]})};y=function(){function a(b,c){this.swfURL=b;this.attrs={};this.params={};this.swfId=null!=c?c:"external_flash"+Math.ceil(1E4*Math.random())}var d;d=!navigator.plugins||!navigator.mimeTypes||!navigator.mimeTypes.length;a.prototype.setAttribute=function(b,c){return this.attrs[b]=c};a.prototype.setParameter=function(b,c){return this.params[b]=c};a.prototype.setWidth=
function(b){return this.attrs.width=b};a.prototype.setHeight=function(b){return this.attrs.height=b};a.prototype.setFlashVars=function(b){return this.params.flashvars=this._objectToQuery(b)};a.prototype.setAllowScriptAccess=function(b){return this.params.allowScriptAccess=b};a.prototype.setAllowFullScreen=function(b){return this.params.allowFullScreen=String(b)};a.prototype.setBgcolor=function(b){return this.params.bgcolor=b};a.prototype.setQuality=function(b){return this.params.quality};a.prototype._objectToQuery=
function(b){var c,f,e;e=[];for(c in b)f=b[c],e.push(encodeURIComponent(c)+"="+encodeURIComponent(f));return e.join("&")};a.prototype._objectToAttributes=function(b){var c,f,e;e=[];for(c in b)f=b[c],e.push(c+'="'+q(f)+'"');return e.join(" ")};a.prototype.html=function(){return d?this.htmlByObjectTag():this.htmlByEmbedTag()};a.prototype.htmlByObjectTag=function(){var b,c,f,e;b=['<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ','id="',q(this.swfId),'" name="',q(this.swfId),'" ',this._objectToAttributes(this.attrs),
">",'<param name="movie" value="',q(this.swfURL),'"/>'];e=this.params;for(c in e)f=e[c],b.push('<param name="'+q(c)+'" value="'+q(f)+'"/>');b.push("</object>");return b.join("")};a.prototype.htmlByEmbedTag=function(){return['<embed type="application/x-shockwave-flash" id="',q(this.swfId),'" name="',q(this.swfId),'" src="',q(this.swfURL),'" ',this._objectToAttributes(this.attrs)," ",this._objectToAttributes(this.params),"/>"].join("")};a.prototype.embed=function(b){return b.innerHTML=this.html()};
return a}();t={};t.URL=function(){function a(){}var d,b;d={nicovideo:"http://www.nicovideo.jp/",nimg:"http://res.nimg.jp/"};b={nicoruswf:function(){return this.get("nimg")+"swf/nicoru.swf?0.0.5"},nicorucss:function(){return this.get("nimg")+"css/nicoru.css?0.0.6"}};a.get=function(){var c,f,e,a;f=arguments[0];c=2<=arguments.length?A.call(arguments,1):[];e=null!=(a=b[f])?a:d[f];if(null==e)throw Error("unknown URL type: "+f);return"function"===typeof e?e.apply(this,c):0<c.length?e.replace(/%s/g,function(){return encodeURIComponent(c.shift())}):
e};return a}();l.NicoruSWF=function(){function a(b){this.swf=b}var d,b,c;d=t.URL;b=0;c=function(c,e){var a;a=null!=e?e:"__nicoru_swf_fn_"+b++;window[a]=function(b,e){window[a]=void 0;try{delete window[a]}catch(d){}if(e){e=decodeURIComponent(e);try{e=eval("("+e+")")}catch(n){e=void 0}}return c.call(this,b,e)};return a};a.prototype.getItems=function(b,e){var a;a=null!=e?c(e):null;return this.swf.getItems(b,a)};a.prototype.postNicoru=function(b,e){var a;a=null!=e?c(e):null;return this.swf.postNicoru(b,
a)};a.prototype.isPostNicoruBuffering=function(){return this.swf.isPostNicoruBuffering()};a.prototype.findNicoriedItemIdsByPrefix=function(b,c){null==c&&(c=!0);return this.swf.findNicoriedItemIdsByPrefix(b,c)};a.embed=function(b,e){var h,g;null!=e&&c(function(b){b=r.id(b);return e(new a(b))},"onNicoruSwfReady");h=r.id("external_nicoru_swf_1");null==h&&(h=document.createElement("div"),h.id="external_nicoru_swf_1",h.style.position="absolute",h.style.left="-1000px",h.style.top="-1000px",h.style.width=
"1px",h.style.height="1px",document.body.appendChild(h));g=new y(d.get("nicoruswf"));g.setFlashVars({token:b});g.setWidth(1);g.setHeight(1);g.setAllowScriptAccess("always");return g.embed(h)};return a}();u=void 0;u=function(){function a(){this.listeners={}}a.prototype.addListener=function(a,b,c){null==c&&(c=!1);null==this.listeners[a]&&(this.listeners[a]=[]);return this.listeners[a].push({listener:b,once:c})};a.prototype.on=function(a,b){return this.addListener(a,b)};a.prototype.once=function(a,b){return this.addListener(a,
b,!0)};a.prototype.removeListener=function(a,b){var c,f,e,h,g;if(null!=this.listeners[a]){h=this.listeners[a];g=[];c=0;for(e=h.length;c<e;c++)if(f=h[c],f.listener===b){this.listeners[a].splice(c,1);break}else g.push(void 0);return g}};a.prototype.removeAllListeners=function(a){return null!=a?delete this.listeners[a]:this.listeners={}};a.prototype.emit=function(){var a,b,c,f,e;b=arguments[0];a=2<=arguments.length?A.call(arguments,1):[];f=this.listeners[b];if(null!=f){b=f.length;for(e=[];0<=--b;)c=
f[b],c.listener.apply(null,a),c.once?e.push(f.splice(b,1)):e.push(void 0);return e}};return a}();l.Item=function(a){function d(b){this.itemId=b;d.__super__.constructor.call(this);this.counter=null;this.nicoried=!1}B(d,a);d.prototype.getItemId=function(){return this.itemId};d.prototype.hasCounter=function(){return null!=this.counter};d.prototype.getCounter=function(){return this.counter};d.prototype.setCounter=function(b){this.counter=b;return this.emit("update",this)};d.prototype.isNicoried=function(){return this.nicoried};
d.prototype.setNicoried=function(b){this.nicoried=b;return this.emit("update",this)};d.prototype.update=function(b){null!=b.count&&(this.counter=b.count);null!=b.nicoried&&(this.nicoried=b.nicoried);return this.emit("update",this)};return d}(u);z=function(){};l.ItemFactory=function(){function a(){this.pool={}}var d,b,c,f;d=l.Item;c={VIDEO:0,TAG:7,COMMENT:8,NICOREPO:9,ICHIBA:10,VIDEO_REVIEW:11,NICOMMEND:12};b={VIDEO:["thread"],TAG:["video","tag"],COMMENT:["thread","comment"],NICOREPO:["nicorepo"],
ICHIBA:["video","ichiba"],VIDEO_REVIEW:["nicorepo"],NICOMMEND:["nicommend"]};for(f in c);a.prototype.has=function(b){return null!=this.pool[b]};a.prototype.get=function(b){return null!=this.pool[b]?this.pool[b]:this.pool[b]=new d(b)};a.prototype.create=function(){var b,c,f;f=arguments[0];b=2<=arguments.length?A.call(arguments,1):[];c=a.getItemTypeByName(f);z(null!=c,"unknown item type name: "+f);z(0<b.length,"no item parameters");b=c+":"+b.join(":");return this.get(b)};a.prototype.createByElement=
function(c){var f,d,k,m,n;f=function(b){var a;a=c.getAttribute("data-"+b);if(null==a)throw Error("missing attribute: data-"+b);return a};n=f("type").toUpperCase();k=a.getItemTypeByName(n);if(null==k)throw Error("unknown data-type: "+n);d=function(){var c,a,e,d;e=b[n];d=[];c=0;for(a=e.length;c<a;c++)m=e[c],d.push(f(m));return d}();d=k+":"+d.join(":");return this.get(d)};a.getItemTypeByName=function(b){return c[b.toUpperCase()]};return a}();x=function(a){return setTimeout(a,1)};l.Client=function(){function a(){this.nicoruSWF=
null;this.initialized=this.embedded=!1}var d;d=l.NicoruSWF;a.prototype.init=function(b,c){var a=this;if(this.embedded)null!=c&&this.waitForInitialized(function(){return c(a)});else return this.embedded=!0,d.embed(b,function(b){a.nicoruSWF=b;a.initialized=!0;return"function"===typeof c?c(a):void 0})};a.prototype.getItems=function(b,c){var a=this;0===b.length&&x(function(){return"function"===typeof c?c(null,{}):void 0});return this.waitForInitialized(function(){return a.nicoruSWF.getItems(b,function(b,
a){return"function"===typeof c?c(b,a):void 0})})};a.prototype.postNicoru=function(b,c){var a=this;return this.waitForInitialized(function(){return a.nicoruSWF.postNicoru(b,function(b){return"function"===typeof c?c(b):void 0})})};a.prototype.isPostNicoruBuffering=function(){return this.nicoruSWF&&this.nicoruSWF.isPostNicoruBuffering()};a.prototype.findNicoriedItemIdsByPrefix=function(b,c,a){var e=this;return this.waitForInitialized(function(){var d;d=e.nicoruSWF.findNicoriedItemIdsByPrefix(b,c);return"function"===
typeof a?a(null,d):void 0})};a.prototype.waitForInitialized=function(b){var c,a=this;if(this.initialized)return b();c=function(){if(a.initialized)b();else return setTimeout(c,10)};return c()};return a}();l.Button=function(a){function d(b){this.item=b;d.__super__.constructor.call(this);this.attach();this.failed=this.pressed=!1}B(d,a);d.prototype.attach=function(){var b=this;return this.item.on("update",this.updateHandler=function(){return b.emit("update",b)})};d.prototype.detach=function(){return this.item.removeListener("update",
this.updateHandler)};d.prototype.getItem=function(){return this.item};d.prototype.press=function(){if(!this.isPressed())return this.pressed=!0,this.failed=!1,this.emit("update",this),this.emit("press",this)};d.prototype.gotError=function(){this.pressed=!1;this.failed=!0;return this.emit("update",this)};d.prototype.isPressed=function(){return this.pressed};d.prototype.isFailed=function(){return this.failed};return d}(u);w={};v=function(){function a(){}a.addEventListener=function(){var a;a=function(b,
a){return null!=b.__wrappedForEventListener?b.__wrappedForEventListener:b.__wrappedForEventListener=function(f){var e;null==f&&(f=window.event);e=b.call(a,f);!1===e&&("function"===typeof f.preventDefault&&f.preventDefault(),null!=f.stopPropagation?f.stopPropagation():f.cancelBubble=!0);if(void 0!==e)return f.returnValue=e}};return"function"===typeof window.addEventListener?function(b,c,f){return b.addEventListener(c,a(f,b),!1)}:"function"===typeof window.attachEvent?function(b,c,f){return b.attachEvent("on"+
c,a(f,b))}:function(b,c,f){return b["on"+c]=a(f,b)}}();a.removeEventListener=function(){var a;a=function(b){var a;return null!=(a=b.__wrappedForEventListener)?a:b};return"function"===typeof window.removeEventListener?function(b,c,f){return b.removeEventListener(c,a(f),!1)}:"function"===typeof window.detachEvent?function(b,c,f){return b.detachEvent("on"+c,a(f))}:function(b,c,f){f=a(f);if(b["on"+c]===f)return b["on"+c]=null}}();return a}();p=void 0;p={localized:{}};p.localized.ja={NICORU:"\u30cb\u30b3\u308b\uff01",
NICORU_DONE:"\u30cb\u30b3\u3063\u305f\uff01",NICORU_FAILED:"\u5931\u6557\uff01",CLOSE_QUERY:"\u73fe\u5728\u3001\u3042\u306a\u305f\u306e\u30cb\u30b3\u308a\u3092\u53d7\u3051\u4ed8\u3051\u3066\u3044\u307e\u3059\u3002\n\u3053\u306e\u307e\u307e\u79fb\u52d5\u307e\u305f\u306f\u9589\u3058\u305f\u5834\u5408\u3001\u30cb\u30b3\u308a\u304c\u53cd\u6620\u3055\u308c\u306a\u3044\u6050\u308c\u304c\u3042\u308a\u307e\u3059\u3002"};p.localized.en={NICORU:"nico!",NICORU_DONE:"done!",NICORU_FAILED:"failed!",CLOSE_QUERY:"We are still processing your nico!\nIf you leave the page, your nico might not register."};
p.localized.zh_tw={NICORU:"nico\uff01",NICORU_DONE:"done\uff01",NICORU_FAILED:"\u5931\u6557\uff01",CLOSE_QUERY:"\u73fe\u5728\u6b63\u8655\u7406\u60a8\u7d66\u7684nico\u3002\u82e5\u60a8\u96e2\u958b\u9801\u9762\u6216\u95dc\u9589\u8996\u7a97\uff0c\u6709\u53ef\u80fd\u7121\u6cd5\u6b63\u5e38\u53cd\u6620\u60a8\u7d66\u7684nico\u3002"};p.messages=function(a){a=a.toLowerCase().replace("-","_");p.localized[a]||(a=a.slice(0,2),p.localized[a]||(a="en"));return p.localized[a]};p.button=function(a){var d,b;null==
a&&(a={});d=p.messages(a.language);return'<a href="#" class="nicorub-link '+(a.loaded?"nicorub-loaded":"")+'" rel="like">\n  <span class="nicorub-icon"></span>\n</a>\n<span class="nicorub-balloon">\n  <span class="nicorub-u"></span>\n  <span class="nicorub-d"></span>\n  <span class="nicorub-messages">\n    <span class="nicorub-caption">'+d.NICORU+'</span>\n    <span class="nicorub-done">'+d.NICORU_DONE+'</span>\n    <span class="nicorub-failed">'+d.NICORU_FAILED+'</span>\n    <span class="nicorub-counter">'+
(null!=(b=a.counter)?b:"")+"</span>\n  </span>\n</span>"};C=function(a){a=parseInt(a);a=isNaN(a)?"0":String(a);return a.replace(/(\d)(?=(?:\d{3})+$)/,"$1,")};w.ButtonView=function(){function a(a,f,e){this.elem=a;this.buttonModel=f;a=this.buttonModel.getItem();this.elem.innerHTML=d({counter:a.getCounter(),loaded:a.hasCounter(),nicoried:a.isNicoried(),language:e});this.elemIcon=r.className("nicorub-icon",this.elem)[0];this.elemCounter=r.className("nicorub-counter",this.elem)[0];this.elemLink=r.className("nicorub-link",
this.elem)[0];this.elemBalloon=r.className("nicorub-balloon",this.elem)[0];b&&this.addClass("nicorub-rotatefix");/full-clickable/.test(this.elem.className)&&(this.elemBalloon.parentNode.removeChild(this.elemBalloon),this.elemLink.appendChild(this.elemBalloon));this.attach();this.update()}var d,b;d=p.button;b=function(){var b,a,e,d,g;a=document.createElement("span").style;g=["transform","WebkitTransform","msTransform","MozTransform","OTransform"];e=0;for(d=g.length;e<d;e++)if(b=g[e],"undefined"!==
typeof a[b])return!1;return!0}();a.prototype.attach=function(){var b=this;v.addEventListener(this.elemLink,"click",this.clickHandler=function(){b.buttonModel.press();return!1});return this.buttonModel.on("update",this.updateHandler=function(){return b.update()})};a.prototype.detach=function(){v.removeEventListener(this.elemLink,"click",this.clickHandler);return this.buttonModel.removeListener("update",this.updateHandler)};a.prototype.update=function(){var b,a;a=this.buttonModel.getItem();this.toggleClass("nicorub-clicked",
this.buttonModel.isPressed()&&!a.isNicoried());this.toggleClass("nicorub-error",this.buttonModel.isFailed());this.toggleClass("nicorub-nicoried",a.isNicoried());this.toggleClass("nicorub-loaded",a.hasCounter());if(a.hasCounter())return b=a.getCounter(),this.elemCounter.innerHTML=C(b),this.elem.setAttribute("data-nicorub-itemId",a.getItemId())};a.prototype.toggleClass=function(b,a){return a?this.addClass(b):this.removeClass(b)};a.prototype.addClass=function(b){b=" "+b+" ";if(null!=this.elem.className){if(0>
this.elem.className.indexOf(b))return this.elem.className+=b}else return this.elem.className=b};a.prototype.removeClass=function(b){var a,e;b=" "+b+" ";if(null!=this.elem.className&&(a=this.elem.className,0<=(e=a.indexOf(b))))return this.elem.className=a.substr(0,e)+" "+a.substr(e+b.length)};return a}();l.ButtonManager=function(a){function d(b,a){var c,g,k;this.itemFactory=b;null==a&&(a={});d.__super__.constructor.call(this);this.tagName=null!=(c=a.tagName)?c:"span";this.className=null!=(g=a.className)?
g:"nicoru-button";this.context=null!=(k=a.context)?k:document;this.elements={};this.buttons={};this.guid=0;this.customKey="_nicoru_"+Math.random().toString().replace(/\D/g,"");this.language="ja-jp"}var b,c;B(d,a);b=l.Button;c=w.ButtonView;d.prototype.setLanguage=function(b){return this.language=b};d.prototype.refresh=function(b){var a,c,d,k,m,n,l;null==b&&(b=null);c={};m={};l=r.tagAndClassName(this.tagName,this.className,this.context);k=0;for(n=l.length;k<n;k++)a=l[k],d=a[this.customKey]||(a[this.customKey]=
this.guid++),c[d]=a,null==this.elements[d]&&(m[d]=a);k=[];for(d in m)a=m[d],k.push(this.initButton(d,a,this.language));m=[];n=this.elements;for(d in n)a=n[d],null==c[d]&&(a=this.removeButton(d,a),null!=a&&m.push(a));this.elements=c;(0<k.length||0<m.length)&&this.emit("refresh",k,m);return"function"===typeof b?b(k,m):void 0};d.prototype.manageButtonElement=function(b){var a;a=b[this.customKey]||(b[this.customKey]=this.guid++);null==this.elements[a]&&(this.initButton(a,b,this.language),this.elements[a]=
b);return this.buttons[a].model};d.prototype.initButton=function(a,e,d){var g;g=this.itemFactory.createByElement(e);g=new b(g);e=new c(e,g,d);this.buttons[a]={model:g,view:e};return g};d.prototype.removeButton=function(b,a){var c;c=this.buttons[b];return null!=c?(c.view.detach(),c.model.detach(),delete this.buttons[b],c.model):null};return d}(u);s.Controller=function(){function a(b){var a,f,e,h=this;null==b&&(b={});this.client=null!=(a=b.client)?a:new l.Client;this.itemFactory=null!=(f=b.itemFactory)?
f:new d;this.buttonManager=null!=(e=b.buttonManager)?e:new l.ButtonManager(this.itemFactory);this.refreshing=!1;this.language="ja-jp";v.addEventListener(window,"beforeunload",function(){if(h.client.isPostNicoruBuffering())return p.messages(h.language).CLOSE_QUERY});this.embedCSS()}var d;d=l.ItemFactory;a.prototype.init=function(b,a,f){this.client.init(b);null!=a&&("function"===typeof a?f=a:(this.language=a,this.buttonManager.setLanguage(a)));return this.refresh(f)};a.prototype.refresh=function(b){var a=
this;this.refreshing=!0;return this.buttonManager.refresh(function(f,e){var d,g,k;a.refreshing=!1;g=0;for(k=f.length;g<k;g++)d=f[g],a.attachButton(d);g=0;for(k=e.length;g<k;g++)d=e[g],a.detachButton(d);return a.loadButtons(f,b)})};a.prototype.attachButton=function(b,a){var d,e=this;b.on("press",null!=(d=this.buttonPressHandler)?d:this.buttonPressHandler=function(a){return e.onButtonPressed(a)});if(null!=a)return null==this.buttonUpdateHandlers&&(this.buttonUpdateHandlers=[]),d=function(){var d;d=
b.getItem();return a({itemId:d.getItemId(),counter:d.getCounter(),nicoried:d.isNicoried(),pressed:b.isPressed(),failed:b.isFailed()})},this.buttonUpdateHandlers.push(d),b.on("update",d)};a.prototype.detachButton=function(a){var c,d,e,h;a.removeListener(this.buttonPressHandler);if(null!=this.buttonUpdateHandlers){h=this.buttonUpdateHandlers;d=0;for(e=h.length;d<e;d++)c=h[d],a.removeListener(c);return this.buttonUpdateHandlers=void 0}};a.prototype.onButtonPressed=function(a){return this.onItemNicori(a.getItem(),
function(c,d){if(c)return a.gotError()})};a.prototype.onItemNicori=function(a,c){var d;if(a.isNicoried())null!=c&&x(function(){return c(null,a)});else if(!a.isNicoried())return d=a.getItemId(),this.client.postNicoru(d,function(d){if(d)return"function"===typeof c?c(d,a):void 0;a.update({count:a.getCounter()+1,nicoried:!0});return"function"===typeof c?c(null,a):void 0})};a.prototype.loadButtons=function(a,c){var d,e,h,g,k,m,l;k={};g=[];m=0;for(l=a.length;m<l;m++)d=a[m],e=d.getItem(),h=e.getItemId(),
e.hasCounter()||(null==k[h]&&(k[h]={item:e,buttons:[]},g.push(h)),k[h].buttons.push(d));if(0===g.length)null!=c&&x(function(){return c(null,[])});else return this.client.getItems(g,function(a,b){var d,e,f,g,h,l,m;if(!a){l=b.items;e=0;for(g=l.length;e<g;e++)d=l[e],k[d.itemId].item.update(d);l=b.errors;e=0;for(g=l.length;e<g;e++)for(d=l[e],m=k[d.itemId].buttons,f=0,h=m.length;f<h;f++)d=m[f],d.gotError()}return"function"===typeof c?c(a,b.items):void 0})};a.prototype.newButton=function(a){var c,d,e;null==
a&&(a={});c=document.createElement("span");c.className=this.buttonManager.className;for(d in a)e=a[d],c.setAttribute("data-"+d,e);return c};a.prototype.commentPost=function(a,c,d){a=this.itemFactory.create("comment",a,c);return this.onItemNicori(a,d)};a.prototype.commentHistory=function(a,c){var f;f=d.getItemTypeByName("comment")+":"+a+":";return this.client.findNicoriedItemIdsByPrefix(f,!1,function(a,b){var d,f,l,n;n=[];f=0;for(l=b.length;f<l;f++)d=b[f],n.push(parseInt(d));return"function"===typeof c?
c(a,n):void 0})};a.prototype.newCommentButton=function(a,c,d,e,h){var g;null==d&&(d=null);null==e&&(e=null);null==h&&(h=null);if(null!=d||null!=e)g=this.itemFactory.create("comment",a,c),null!=d&&g.setCounter(d),null!=e&&g.setNicoried(e);a=this.newButton({type:"comment",thread:a,comment:c});c=this.buttonManager.manageButtonElement(a);this.attachButton(c,h);return a};a.prototype.embedCSS=function(){var a,c;c=document.createElement("link");c.rel="stylesheet";c.type="text/css";c.href=t.URL.get("nicorucss");
return(a=document.getElementsByTagName("head"))&&a[0]&&a[0].appendChild(c)};return a}();s.Export=function(){var a,d;d=new s.Controller;a=function(a){return function(){return a.apply(d,arguments)}};return{init:a(d.init),refresh:a(d.refresh),newButton:a(d.newButton),commentPost:a(d.commentPost),commentHistory:a(d.commentHistory),newCommentButton:a(d.newCommentButton)}}();window.nicoru=s.Export}).call(this);
