spacevillain (spacevillain) wrote in changelog,
spacevillain
spacevillain
changelog

[livejournal] r22200: LJSUP-12512: there is no Repost button i...

Committer: atyurin
LJSUP-12512: there is no Repost button in Like menu
U   trunk/htdocs/js/ck/ckeditor.js
U   trunk/htdocs/js/ck/plugins/livejournal/plugin.js
Modified: trunk/htdocs/js/ck/ckeditor.js
===================================================================
--- trunk/htdocs/js/ck/ckeditor.js	2012-06-07 12:49:22 UTC (rev 22199)
+++ trunk/htdocs/js/ck/ckeditor.js	2012-06-07 12:59:40 UTC (rev 22200)
@@ -3,7 +3,7 @@
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
-(function(){window.CKEDITOR_BASEPATH='/js/ck/';if(window.CKEDITOR&&window.CKEDITOR.dom)return;if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'4fcf657e8',version:'3.6.2',revision:'7275',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f<e.length;f++){var g=e[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(g){d=g[1];break;}}}if(d.indexOf(':/')==-1)if(d.indexOf('/')===0)d=location.href.match(/^.*?:\/\/[^\/]*/)[0]+d;else d=location.href.match(/^[^\?]*\/(?:)/)[0]+d;if(!d)throw 'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return d;})(),getUrl:function(d){if(d.indexOf(':/')==-1&&d.indexOf('/')!==0)d=this.basePath+d;if(this.timestamp&&d.charAt(d.length-1)!='/'&&!/[&?]t=/.test(d))d+=(d.indexOf('?')>=0?'&':'?')+'t='+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})();var a=CKEDITOR;if(!a.event){a.event=function(){};a.event.implementOn=function(b){var c=a.event.prototype;for(var d in c){if(b[d]==undefined)b[d]=c[d];}};a.event.prototype=(function(){var b=function(d){var e=d.getPrivate&&d.getPrivate()||d._||(d._={});return e.events||(e.events={});},c=function(d){this.name=d;this.listeners=[];};c.prototype={getListenerIndex:function(d){for(var e=0,f=this.listeners;e<f.length;e++){if(f[e].fn==d)return e;}return-1;}};return{on:function(d,e,f,g,h){var i=b(this),j=i[d]||(i[d]=new c(d));if(j.getListenerIndex(e)<0){var k=j.listeners;if(!f)f=this;if(isNaN(h))h=10;var l=this,m=function(o,p,q,r){var s={name:d,sender:this,editor:o,data:p,listenerData:g,stop:q,cancel:r,removeListener:function(){l.removeListener(d,e);}};e.call(f,s);return s.data;};m.fn=e;m.priority=h;for(var n=k.length-1;n>=0;n--){if(k[n].priority<=h){k.splice(n+1,0,m);return;}}k.unshift(m);}},fire:(function(){var d=false,e=function(){d=true;},f=false,g=function(){f=true;};return function(h,i,j){var k=b(this)[h],l=d,m=f;d=f=false;if(k){var n=k.listeners;if(n.length){n=n.slice(0);for(var o=0;o<n.length;o++){var p=n[o].call(this,j,i,e,g);if(typeof p!='undefined')i=p;if(d||f)break;}}}var q=f||(typeof i=='undefined'?false:i);d=l;f=m;return q;};})(),fireOnce:function(d,e,f){var g=this.fire(d,e,f);delete b(this)[d];return g;},removeListener:function(d,e){var f=b(this)[d];if(f){var g=f.getListenerIndex(e);
+(function(){window.CKEDITOR_BASEPATH='/js/ck/';if(window.CKEDITOR&&window.CKEDITOR.dom)return;if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'B8DJ5M3',version:'3.6.2',revision:'7275',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f<e.length;f++){var g=e[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(g){d=g[1];break;}}}if(d.indexOf(':/')==-1)if(d.indexOf('/')===0)d=location.href.match(/^.*?:\/\/[^\/]*/)[0]+d;else d=location.href.match(/^[^\?]*\/(?:)/)[0]+d;if(!d)throw 'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return d;})(),getUrl:function(d){if(d.indexOf(':/')==-1&&d.indexOf('/')!==0)d=this.basePath+d;if(this.timestamp&&d.charAt(d.length-1)!='/'&&!/[&?]t=/.test(d))d+=(d.indexOf('?')>=0?'&':'?')+'t='+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})();var a=CKEDITOR;if(!a.event){a.event=function(){};a.event.implementOn=function(b){var c=a.event.prototype;for(var d in c){if(b[d]==undefined)b[d]=c[d];}};a.event.prototype=(function(){var b=function(d){var e=d.getPrivate&&d.getPrivate()||d._||(d._={});return e.events||(e.events={});},c=function(d){this.name=d;this.listeners=[];};c.prototype={getListenerIndex:function(d){for(var e=0,f=this.listeners;e<f.length;e++){if(f[e].fn==d)return e;}return-1;}};return{on:function(d,e,f,g,h){var i=b(this),j=i[d]||(i[d]=new c(d));if(j.getListenerIndex(e)<0){var k=j.listeners;if(!f)f=this;if(isNaN(h))h=10;var l=this,m=function(o,p,q,r){var s={name:d,sender:this,editor:o,data:p,listenerData:g,stop:q,cancel:r,removeListener:function(){l.removeListener(d,e);}};e.call(f,s);return s.data;};m.fn=e;m.priority=h;for(var n=k.length-1;n>=0;n--){if(k[n].priority<=h){k.splice(n+1,0,m);return;}}k.unshift(m);}},fire:(function(){var d=false,e=function(){d=true;},f=false,g=function(){f=true;};return function(h,i,j){var k=b(this)[h],l=d,m=f;d=f=false;if(k){var n=k.listeners;if(n.length){n=n.slice(0);for(var o=0;o<n.length;o++){var p=n[o].call(this,j,i,e,g);if(typeof p!='undefined')i=p;if(d||f)break;}}}var q=f||(typeof i=='undefined'?false:i);d=l;f=m;return q;};})(),fireOnce:function(d,e,f){var g=this.fire(d,e,f);delete b(this)[d];return g;},removeListener:function(d,e){var f=b(this)[d];if(f){var g=f.getListenerIndex(e);
 if(g>=0)f.listeners.splice(g,1);}},hasListeners:function(d){var e=b(this)[d];return e&&e.listeners.length>0;}};})();}if(!a.editor){a.ELEMENT_MODE_NONE=0;a.ELEMENT_MODE_REPLACE=1;a.ELEMENT_MODE_APPENDTO=2;a.editor=function(b,c,d,e){var f=this;f._={instanceConfig:b,element:c,data:e};f.elementMode=d||0;a.event.call(f);f._init();};a.editor.replace=function(b,c){var d=b;if(typeof d!='object'){d=document.getElementById(b);if(d&&d.tagName.toLowerCase() in {style:1,script:1,base:1,link:1,meta:1,title:1})d=null;if(!d){var e=0,f=document.getElementsByName(b);while((d=f[e++])&&d.tagName.toLowerCase()!='textarea'){}}if(!d)throw '[CKEDITOR.editor.replace] The element with id or name "'+b+'" was not found.';}d.style.visibility='hidden';return new a.editor(c,d,1);};a.editor.appendTo=function(b,c,d){var e=b;if(typeof e!='object'){e=document.getElementById(b);if(!e)throw '[CKEDITOR.editor.appendTo] The element with id "'+b+'" was not found.';}return new a.editor(c,e,2,d);};a.editor.prototype={_init:function(){var b=a.editor._pending||(a.editor._pending=[]);b.push(this);},fire:function(b,c){return a.event.prototype.fire.call(this,b,c,this);},fireOnce:function(b,c){return a.event.prototype.fireOnce.call(this,b,c,this);}};a.event.implementOn(a.editor.prototype,true);}if(!a.env)a.env=(function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,d={ie:/*@cc_on!@*/false,opera:!!c&&c.version,webkit:b.indexOf(' applewebkit/')>-1,air:b.indexOf(' adobeair/')>-1,mac:b.indexOf('macintosh')>-1,quirks:document.compatMode=='BackCompat',mobile:b.indexOf('mobile')>-1,iOS:/(ipad|iphone|ipod)/.test(b),isCustomDomain:function(){if(!this.ie)return false;var g=document.domain,h=window.location.hostname;return g!=h&&g!='['+h+']';},secure:location.protocol=='https:'};d.gecko=navigator.product=='Gecko'&&!d.webkit&&!d.opera;var e=0;if(d.ie){e=parseFloat(b.match(/msie (\d+)/)[1]);d.ie8=!!document.documentMode;d.ie8Compat=document.documentMode==8;d.ie9Compat=document.documentMode==9;d.ie7Compat=e==7&&!document.documentMode||document.documentMode==7;d.ie6Compat=e<7||d.quirks;}if(d.gecko){var f=b.match(/rv:([\d\.]+)/);if(f){f=f[1].split('.');e=f[0]*10000+(f[1]||0)*100+ +(f[2]||0);}}if(d.opera)e=parseFloat(c.version());if(d.air)e=parseFloat(b.match(/ adobeair\/(\d+)/)[1]);if(d.webkit)e=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]);d.version=e;d.isCompatible=d.iOS&&e>=534||!d.mobile&&(d.ie&&e>=6||d.gecko&&e>=10801||d.opera&&e>=9.5||d.air&&e>=1||d.webkit&&e>=522||false);d.cssClass='cke_browser_'+(d.ie?'ie':d.gecko?'gecko':d.opera?'opera':d.webkit?'webkit':'unknown');
 if(d.quirks)d.cssClass+=' cke_browser_quirks';if(d.ie){d.cssClass+=' cke_browser_ie'+(d.version<7?'6':d.version>=8?document.documentMode:'7');if(d.quirks)d.cssClass+=' cke_browser_iequirks';}if(d.gecko&&e<10900)d.cssClass+=' cke_browser_gecko18';if(d.air)d.cssClass+=' cke_browser_air';return d;})();var b=a.env;var c=b.ie;if(a.status=='unloaded')(function(){a.event.implementOn(a);a.loadFullCore=function(){if(a.status!='basic_ready'){a.loadFullCore._load=1;return;}delete a.loadFullCore;var e=document.createElement('script');e.type='text/javascript';e.src=a.basePath+'ckeditor.js';document.getElementsByTagName('head')[0].appendChild(e);};a.loadFullCoreTimeout=0;a.replaceClass='ckeditor';a.replaceByClassEnabled=1;var d=function(e,f,g,h){if(b.isCompatible){if(a.loadFullCore)a.loadFullCore();var i=g(e,f,h);a.add(i);return i;}return null;};a.replace=function(e,f){return d(e,f,a.editor.replace);};a.appendTo=function(e,f,g){return d(e,f,a.editor.appendTo,g);};a.add=function(e){var f=this._.pending||(this._.pending=[]);f.push(e);};a.replaceAll=function(){var e=document.getElementsByTagName('textarea');for(var f=0;f<e.length;f++){var g=null,h=e[f];if(!h.name&&!h.id)continue;if(typeof arguments[0]=='string'){var i=new RegExp('(?:^|\\s)'+arguments[0]+'(?:$|\\s)');if(!i.test(h.className))continue;}else if(typeof arguments[0]=='function'){g={};if(arguments[0](h,g)===false)continue;}this.replace(h,g);}};(function(){var e=function(){var f=a.loadFullCore,g=a.loadFullCoreTimeout;if(a.replaceByClassEnabled)a.replaceAll(a.replaceClass);a.status='basic_ready';if(f&&f._load)f();else if(g)setTimeout(function(){if(a.loadFullCore)a.loadFullCore();},g*1000);};if(window.addEventListener)window.addEventListener('load',e,false);else if(window.attachEvent)window.attachEvent('onload',e);})();a.status='basic_loaded';})();a.dom={};var d=a.dom;(function(){var e=[];a.on('reset',function(){e=[];});a.tools={arrayCompare:function(f,g){if(!f&&!g)return true;if(!f||!g||f.length!=g.length)return false;for(var h=0;h<f.length;h++){if(f[h]!=g[h])return false;}return true;},clone:function(f){var g;if(f&&f instanceof Array){g=[];for(var h=0;h<f.length;h++)g[h]=this.clone(f[h]);return g;}if(f===null||typeof f!='object'||f instanceof String||f instanceof Number||f instanceof Boolean||f instanceof Date||f instanceof RegExp)return f;g=new f.constructor();for(var i in f){var j=f[i];g[i]=this.clone(j);}return g;},capitalize:function(f){return f.charAt(0).toUpperCase()+f.substring(1).toLowerCase();},extend:function(f){var g=arguments.length,h,i;
 if(typeof (h=arguments[g-1])=='boolean')g--;else if(typeof (h=arguments[g-2])=='boolean'){i=arguments[g-1];g-=2;}for(var j=1;j<g;j++){var k=arguments[j];for(var l in k){if(h===true||f[l]==undefined)if(!i||l in i)f[l]=k[l];}}return f;},prototypedCopy:function(f){var g=function(){};g.prototype=f;return new g();},isArray:function(f){return!!f&&f instanceof Array;},isEmpty:function(f){for(var g in f){if(f.hasOwnProperty(g))return false;}return true;},cssStyleToDomStyle:(function(){var f=document.createElement('div').style,g=typeof f.cssFloat!='undefined'?'cssFloat':typeof f.styleFloat!='undefined'?'styleFloat':'float';return function(h){if(h=='float')return g;else return h.replace(/-./g,function(i){return i.substr(1).toUpperCase();});};})(),buildStyleHtml:function(f){f=[].concat(f);var g,h=[];for(var i=0;i<f.length;i++){g=f[i];if(/@import|[{}]/.test(g))h.push('<style>'+g+'</style>');else h.push('<link type="text/css" rel=stylesheet href="'+g+'">');}return h.join('');},htmlEncode:function(f){var g=function(k){var l=new d.element('span');l.setText(k);return l.getHtml();},h=g('\n').toLowerCase()=='<br>'?function(k){return g(k).replace(/<br>/gi,'\n');}:g,i=g('>')=='>'?function(k){return h(k).replace(/>/g,'&gt;');}:h,j=g('  ')=='&nbsp; '?function(k){return i(k).replace(/&nbsp;/g,' ');}:i;this.htmlEncode=j;return this.htmlEncode(f);},htmlEncodeAttr:function(f){return f.replace(/"/g,'&quot;').replace(/</g,'&lt;').replace(/>/g,'&gt;');},getNextNumber:(function(){var f=0;return function(){return++f;};})(),getNextId:function(){return 'cke_'+this.getNextNumber();},override:function(f,g){return g(f);},setTimeout:function(f,g,h,i,j){if(!j)j=window;if(!h)h=j;return j.setTimeout(function(){if(i)f.apply(h,[].concat(i));else f.apply(h);},g||0);},trim:(function(){var f=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(g){return g.replace(f,'');};})(),ltrim:(function(){var f=/^[ \t\n\r]+/g;return function(g){return g.replace(f,'');};})(),rtrim:(function(){var f=/[ \t\n\r]+$/g;return function(g){return g.replace(f,'');};})(),indexOf:Array.prototype.indexOf?function(f,g){return f.indexOf(g);}:function(f,g){for(var h=0,i=f.length;h<i;h++){if(f[h]===g)return h;}return-1;},bind:function(f,g){return function(){return f.apply(g,arguments);};},createClass:function(f){var g=f.$,h=f.base,i=f.privates||f._,j=f.proto,k=f.statics;if(i){var l=g;g=function(){var p=this;var m=p._||(p._={});for(var n in i){var o=i[n];m[n]=typeof o=='function'?a.tools.bind(o,p):o;}l.apply(p,arguments);};}if(h){g.prototype=this.prototypedCopy(h.prototype);
@@ -124,16 +124,16 @@
 var q=p.data.$.keyCode;if(q==8||q==13||q==32||q>=46&&q<=90||q>=96&&q<=111||q>=186&&q<=222)o();});m.document.on('drop',o);m.document.getBody().on('drop',o);});m.on('mode',function(p){if(m.mode!='source')return;m.textarea.on('keydown',function(q){if(!q.data.$.ctrlKey&&!q.data.$.metaKey)o();});m.textarea.on('drop',o);m.textarea.on('input',o);});m.on('afterCommandExec',function(p){if(p.data.name=='source')return;if(p.data.command.canUndo!==false)o();});}});(function(){j.add('ajax',{requires:['xml']});a.ajax=(function(){var m=function(){if(!c||location.protocol!='file:')try{return new XMLHttpRequest();}catch(r){}try{return new ActiveXObject('Msxml2.XMLHTTP');}catch(s){}try{return new ActiveXObject('Microsoft.XMLHTTP');}catch(t){}return null;},n=function(r){return r.readyState==4&&(r.status>=200&&r.status<300||r.status==304||r.status===0||r.status==1223);},o=function(r){if(n(r))return r.responseText;return null;},p=function(r){if(n(r)){var s=r.responseXML;return new a.xml(s&&s.firstChild?s:r.responseText);}return null;},q=function(r,s,t){var u=!!s,v=m();if(!v)return null;v.open('GET',r,u);if(u)v.onreadystatechange=function(){if(v.readyState==4){s(t(v));v=null;}};v.send(null);return u?'':t(v);};return{load:function(r,s){return q(r,s,o);},loadXml:function(r,s){return q(r,s,p);}};})();})();a.themes.add('default',(function(){var m={};function n(o,p){var q,r;r=o.config.sharedSpaces;r=r&&r[p];r=r&&a.document.getById(r);if(r){var s='<span class="cke_shared " dir="'+o.lang.dir+'"'+'>'+'<span class="'+o.skinClass+' '+o.id+' cke_editor_'+o.name+'">'+'<span class="'+b.cssClass+'">'+'<span class="cke_wrapper cke_'+o.lang.dir+'">'+'<span class="cke_editor">'+'<div class="cke_'+p+'">'+'</div></span></span></span></span></span>',t=r.append(h.createFromHtml(s,r.getDocument()));if(r.getCustomData('cke_hasshared'))t.hide();else r.setCustomData('cke_hasshared',1);q=t.getChild([0,0,0,0]);!o.sharedSpaces&&(o.sharedSpaces={});o.sharedSpaces[p]=q;o.on('focus',function(){for(var u=0,v,w=r.getChildren();v=w.getItem(u);u++){if(v.type==1&&!v.equals(t)&&v.hasClass('cke_shared'))v.hide();}t.show();});o.on('destroy',function(){t.remove();});}return q;};return{build:function(o,p){var q=o.name,r=o.element,s=o.elementMode;if(!r||s==0)return;if(s==1)r.hide();var t=o.fire('themeSpace',{space:'top',html:''}).html,u=o.fire('themeSpace',{space:'contents',html:''}).html,v=o.fireOnce('themeSpace',{space:'bottom',html:''}).html,w=u&&o.config.height,x=o.config.tabIndex||o.element.getAttribute('tabindex')||0;
 if(!u)w='auto';else if(!isNaN(w))w+='px';var y='',z=o.config.width;if(z){if(!isNaN(z))z+='px';y+='width: '+z+';';}var A=t&&n(o,'top'),B=n(o,'bottom');A&&(A.setHtml(t),t='');B&&(B.setHtml(v),v='');var C='<style>.'+o.skinClass+'{visibility:hidden;}</style>';if(m[o.skinClass])C='';else m[o.skinClass]=1;var D=h.createFromHtml(['<span id="cke_',q,'" class="',o.skinClass,' ',o.id,' cke_editor_',q,'" dir="',o.lang.dir,'" title="',b.gecko?' ':'','" lang="',o.langCode,'"'+(b.webkit?' tabindex="'+x+'"':'')+' role="application"'+' aria-labelledby="cke_',q,'_arialbl"'+(y?' style="'+y+'"':'')+'>'+'<span id="cke_',q,'_arialbl" class="cke_voice_label">'+o.lang.editor+'</span>'+'<span class="',b.cssClass,'" role="presentation"><span class="cke_wrapper cke_',o.lang.dir,'" role="presentation"><table class="cke_editor" border="0" cellspacing="0" cellpadding="0" role="presentation"><tbody><tr',t?'':' style="display:none"',' role="presentation"><td id="cke_top_',q,'" class="cke_top" role="presentation">',t,'</td></tr><tr',u?'':' style="display:none"',' role="presentation"><td id="cke_contents_',q,'" class="cke_contents" style="height:',w,'" role="presentation">',u,'</td></tr><tr',v?'':' style="display:none"',' role="presentation"><td id="cke_bottom_',q,'" class="cke_bottom" role="presentation">',v,'</td></tr></tbody></table>'+C+'</span>'+'</span>'+'</span>'].join(''));D.getChild([1,0,0,0,0]).unselectable();D.getChild([1,0,0,0,2]).unselectable();if(s==1)D.insertAfter(r);else r.append(D);o.container=D;D.disableContextMenu();o.on('contentDirChanged',function(E){var F=(o.lang.dir!=E.data?'add':'remove')+'Class';D.getChild(1)[F]('cke_mixed_dir_content');var G=this.sharedSpaces&&this.sharedSpaces[this.config.toolbarLocation];G&&G.getParent().getParent()[F]('cke_mixed_dir_content');});o.fireOnce('themeLoaded');o.fireOnce('uiReady');},buildDialog:function(o){var p=e.getNextNumber(),q=h.createFromHtml(['<div class="',o.id,'_dialog cke_editor_',o.name.replace('.','\\.'),'_dialog cke_skin_',o.skinName,'" dir="',o.lang.dir,'" lang="',o.langCode,'" role="dialog" aria-labelledby="%title#"><table class="cke_dialog',' '+b.cssClass,' cke_',o.lang.dir,'" style="position:absolute" role="presentation"><tr><td role="presentation"><div class="%body" role="presentation"><div id="%title#" class="%title" role="presentation"></div><a id="%close_button#" class="%close_button" href="javascript:void(0)" title="'+o.lang.common.close+'" role="button"><span class="cke_label">X</span></a>'+'<div id="%tabs#" class="%tabs" role="tablist"></div>'+'<table class="%contents" role="presentation">'+'<tr>'+'<td id="%contents#" class="%contents" role="presentation"></td>'+'</tr>'+'<tr>'+'<td id="%footer#" class="%footer" role="presentation"></td>'+'</tr>'+'</table>'+'</div>'+'<div id="%tl#" class="%tl"></div>'+'<div id="%tc#" class="%tc"></div>'+'<div id="%tr#" class="%tr"></div>'+'<div id="%ml#" class="%ml"></div>'+'<div id="%mr#" class="%mr"></div>'+'<div id="%bl#" class="%bl"></div>'+'<div id="%bc#" class="%bc"></div>'+'<div id="%br#" class="%br"></div>'+'</td></tr>'+'</table>',c?'':'<style>.cke_dialog{visibility:hidden;}</style>','</div>'].join('').replace(/#/g,'_'+p).replace(/%/g,'cke_dialog_')),r=q.getChild([0,0,0,0,0]),s=r.getChild(0),t=r.getChild(1);
 if(c&&!b.ie6Compat){var u=b.isCustomDomain(),v='javascript:void(function(){'+encodeURIComponent('document.open();'+(u?'document.domain="'+document.domain+'";':'')+'document.close();')+'}())',w=h.createFromHtml('<iframe frameBorder="0" class="cke_iframe_shim" src="'+v+'"'+' tabIndex="-1"'+'></iframe>');w.appendTo(r.getParent());}s.unselectable();t.unselectable();return{element:q,parts:{dialog:q.getChild(0),title:s,close:t,tabs:r.getChild(2),contents:r.getChild([3,0,0,0]),footer:r.getChild([3,0,1,0])}};},destroy:function(o){var p=o.container,q=o.element;if(p){p.clearCustomData();p.remove();}if(q){q.clearCustomData();o.elementMode==1&&q.show();delete o.element;}}};})());a.editor.prototype.getThemeSpace=function(m){var n='cke_'+m,o=this._[n]||(this._[n]=a.document.getById(n+'_'+this.name));return o;};a.editor.prototype.resize=function(m,n,o,p){var v=this;var q=v.container,r=a.document.getById('cke_contents_'+v.name),s=b.webkit&&v.document&&v.document.getWindow().$.frameElement,t=p?q.getChild(1):q;t.setSize('width',m,true);s&&(s.style.width='1%');var u=o?0:(t.$.offsetHeight||0)-(r.$.clientHeight||0);r.setStyle('height',Math.max(n-u,0)+'px');s&&(s.style.width='100%');v.fire('resize');};a.editor.prototype.getResizable=function(m){return m?a.document.getById('cke_contents_'+this.name):this.container;};(function(){j.add('xml',{});a.xml=function(m){var n=null;if(typeof m=='object')n=m;else{var o=(m||'').replace(/&nbsp;/g,'\xa0');if(window.DOMParser)n=new DOMParser().parseFromString(o,'text/xml');else if(window.ActiveXObject){try{n=new ActiveXObject('MSXML2.DOMDocument');}catch(p){try{n=new ActiveXObject('Microsoft.XmlDom');}catch(p){}}if(n){n.async=false;n.resolveExternals=false;n.validateOnParse=false;n.loadXML(o);}}}this.baseXml=n;};a.xml.prototype={selectSingleNode:function(m,n){var o=this.baseXml;if(n||(n=o))if(c||n.selectSingleNode)return n.selectSingleNode(m);else if(o.evaluate){var p=o.evaluate(m,n,null,9,null);return p&&p.singleNodeValue||null;}return null;},selectNodes:function(m,n){var o=this.baseXml,p=[];if(n||(n=o))if(c||n.selectNodes)return n.selectNodes(m);else if(o.evaluate){var q=o.evaluate(m,n,null,5,null);if(q){var r;while(r=q.iterateNext())p.push(r);}}return p;},getInnerXml:function(m,n){var o=this.selectSingleNode(m,n),p=[];if(o){o=o.firstChild;while(o){if(o.xml)p.push(o.xml);else if(window.XMLSerializer)p.push(new XMLSerializer().serializeToString(o));o=o.nextSibling;}}return p.length?p.join(''):null;}};})();(function(){var m=a.lang[a.lang.detect()]||{};
-jQuery.extend(m,LJ.pageVar('rtedata'));var n=[{label:m.LJLike_button_facebook,id:'facebook',abbr:'fb',html:'<span class="lj-like-item fb">'+m.LJLike_button_facebook+'</span>',htmlOpt:'<li class="like-fb"><input type="checkbox" id="like-fb" /><label for="like-fb">'+m.LJLike_button_facebook+'</label></li>'},{label:m.LJLike_button_twitter,id:'twitter',abbr:'tw',html:'<span class="lj-like-item tw">'+m.LJLike_button_twitter+'</span>',htmlOpt:'<li class="like-tw"><input type="checkbox" id="like-tw" /><label for="like-tw">'+m.LJLike_button_twitter+'</label></li>'},{label:m.LJLike_button_google,id:'google',abbr:'go',html:'<span class="lj-like-item go">'+m.LJLike_button_google+'</span>',htmlOpt:'<li class="like-go"><input type="checkbox" id="like-go" /><label for="like-go">'+m.LJLike_button_google+'</label></li>'},{label:m.LJLike_button_vkontakte,id:'vkontakte',abbr:'vk',html:'<span class="lj-like-item vk">'+m.LJLike_button_vkontakte+'</span>',htmlOpt:window.isSupUser?'<li class="like-vk"><input type="checkbox" id="like-vk" /><label for="like-vk">'+m.LJLike_button_vkontakte+'</label></li>':''},{label:m.LJLike_button_give,id:'livejournal',abbr:'lj',html:'<span class="lj-like-item lj">'+m.LJLike_button_give+'</span>',htmlOpt:'<li class="like-lj"><input type="checkbox" id="like-lj" /><label for="like-lj">'+m.LJLike_button_give+'</label></li>'}],o={LJPollLink:{html:encodeURIComponent(m.Poll_PollWizardNotice+'<br /><a href="#" lj-cmd="LJPollLink">'+m.Poll_PollWizardNoticeLink+'</a>')},LJLike:{html:encodeURIComponent(m.LJLike_WizardNotice+'<br /><a href="#" lj-cmd="LJLike">'+m.LJLike_WizardNoticeLink+'</a>')},LJUserLink:{html:encodeURIComponent(m.LJUser_WizardNotice+'<br /><a href="#" lj-cmd="LJUserLink">'+m.LJUser_WizardNoticeLink+'</a>')},LJLink:{html:encodeURIComponent(m.LJLink_WizardNotice+'<br /><a href="#" lj-cmd="LJLink">'+m.LJLink_WizardNoticeLink+'</a>')},image:{html:encodeURIComponent(m.LJImage_WizardNotice+'<br /><a href="#" lj-cmd="image">'+m.LJImage_WizardNoticeLink+'</a>')},LJCut:{html:encodeURIComponent(m.LJCut_WizardNotice+'<br /><a href="#" lj-cmd="LJCut">'+m.LJCut_WizardNoticeLink+'</a>')},LJSpoiler:{html:encodeURIComponent(m.LJSpoiler_WizardNotice+'<br /><a href="#" lj-cmd="LJSpoiler">'+m.LJSpoiler_WizardNoticeLink+'</a>')}},p={},q;function r(t){var u,v,w,x,y=document.createElement('lj-note'),z=typeof document.body.style.opacity!='string',A=(function(){var D=60,E=100,F=E*D/1000,G=[],H,I=document.getElementById('draft-container')||document.body;function J(){var K=G.shift(),L=(H?K.time/E:-(K.time/E-1)).toFixed(1);
-if(!G.length)L=H?1:0;if(z)y.style.filter=L>=1?null:'progid:DXImageTransform.Microsoft.Alpha(opacity='+L*100+')';else y.style.opacity=L;if(L==0&&y&&y.parentNode)y.parentNode.removeChild(y);};return function(K){H=K;if(H&&y.parentNode){if(z)y.style.filter=null;else y.style.opacity=1;}else for(var L=1;L<=F;L++){var M=Math.floor(1000/D)*L;G.push({time:M,timer:setTimeout(J,M)});}I.appendChild(y);y.style.marginTop=-y.offsetHeight/2+'px';y.style.marginLeft=-y.offsetWidth/2+'px';};})();y.className='note-popup';y.onmouseout=function(){if(!w||!w.cmd)a.note.hide();};y.onmouseover=function(){if(u&&!v){v=1;u=clearTimeout(u);}};if(z)y.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity=0)';else y.style.opacity=0;function B(){var D=this.getAttribute('lj-cmd');if(w.hasOwnProperty(D)){o[D].node=w[D].node;var E=new d.selection(t.document);E.selectElement(o[D].node);q=true;t.execCommand(D);a.note.hide(true);}return false;};function C(){if(!window.switchedRteOn)a.note.hide(true);if(v){w=x;x=null;var D='';for(var E in w){if(w.hasOwnProperty(E))D+='<div class="noteItem">'+w[E].content+'</div>';}y.innerHTML=decodeURIComponent(D);var F=y.getElementsByTagName('a');for(var G=0,H=F.length;G<H;G++){var I=F[G];if(o.hasOwnProperty(I.getAttribute('lj-cmd')))I.onclick=B;}}else w=null;A(v);u=null;};a.note={show:function(D,E){if(!E&&D==x||!window.switchedRteOn)return;if(u)u=clearTimeout(u);v=1;x=D;E===true?C():u=setTimeout(C,1000);},hide:function(D){if(v){v=0;if(u)u=clearTimeout(u);if(y.parentNode)D===true?C():u=setTimeout(C,500);}}};};var s=f;s.$block['lj-template']=1;s.$block['lj-raw']=1;s.$block['lj-cut']=1;s.$block['lj-spoiler']=1;s.$block['lj-poll']=1;s.$block['lj-repost']=1;s.$block['lj-pq']=1;s.$block['lj-pi']=1;s.$nonEditable['lj-template']=1;s['lj-template']={};s['lj-map']={};s['lj-repost']={};s['lj-raw']=s.div;s['lj-poll']={'lj-pq':1};s['lj-pq']={'#':1,'lj-pi':1};s['lj-pi']={'#':1};s.$block.iframe=s.$inline.iframe;delete s.$inline.iframe;e.extend(s['lj-cut']={},s.$block);e.extend(s['lj-spoiler']={},s.$block);e.extend(s['lj-cut'],s.$inline);e.extend(s['lj-spoiler'],s.$inline);e.extend(s.div,s.$block);e.extend(s.$body,s.$block);delete s['lj-cut']['lj-cut'];j.add('livejournal',{init:function(t){function u(C){var D=C.data.element||C.data.getTarget();if(D.type!=1)D=D.getParent();while(D){var E=D.getAttribute('lj-cmd');if(o.hasOwnProperty(E)){var F=t.getCommand(E);if(F.state==1){var G=new d.selection(t.document);o[E].node=D.is('body')?new h.get(D.getWindow().$.frameElement):D;G.selectElement(o[E].node);
-C.data.dialog='';q=true;F.exec();break;}}D=D.getParent();}};function v(C){var D=this;if(D.$!=t.document.$){D.$.className=(D.frame.getAttribute('lj-class')||'')+' lj-selected';if(D.getAttribute('lj-cmd')=='LJPollLink')D.frame.setStyle('height',D.getDocument().$.body.scrollHeight+'px');new d.selection(t.document).selectElement(D.frame);}C.data.getKey()==1&&C.data.preventDefault();};function w(C){if(C.data.getKey()==46){var D=new d.selection(t.document).getRanges(),E=D.length;while(E--)D[E].deleteContents();}};function x(){var F=this;var C=F.$.contentWindow,D=C.document,E=new h.get(D.body);if(E.on){E.on('dblclick',u);E.on('click',v);E.on('keyup',w);if(F.getAttribute('lj-cmd')=='LJPollLink'&&F.hasAttribute('style'))D.body.className='lj-poll lj-poll-open';}D=new h.get(D);D.frame=E.frame=F;};function y(){var C=t.document.getElementsByTag('iframe'),D=C.count(),E,F,G,H,I;q=false;while(D--){E=C.getItem(D),F=E.getAttribute('lj-cmd'),G=E.$.contentWindow,H=G.document,I=E.getAttribute('lj-style')||'';E.removeListener('load',x);E.on('load',x);H.open();H.write('<!DOCTYPE html><html style="'+I+'">'+'<head><link rel="stylesheet" href="'+a.styleText+'" /></head>'+'<body scroll="no" class="'+(E.getAttribute('lj-class')||'')+'" style="'+I+'" '+(F?'lj-cmd="'+F+'"':'')+'>'+decodeURIComponent(E.getAttribute('lj-content')||'')+'</body>'+'</html>');H.close();}};function z(C){if(t.onSwitch===true){delete t.onSwitch;return;}var D,E=C.name=='click',F=C.name=='selectionChange'||E,G=C.data.element||C.data.getTarget(),H,I;if(E&&(C.data.getKey()==1||C.data.$.button==0))C.data.preventDefault();if(G.type!=1)G=G.getParent();H=G;if(F){var J=t.document.getElementsByTag('iframe'),K,L;if(E&&H.is('iframe')){L=H.$.contentWindow.document.body;L.className=(H.getAttribute('lj-class')||'')+' lj-selected';if(H.getAttribute('lj-cmd')=='LJPollLink')H.setStyle('height',L.scrollHeight+'px');}for(var M=0,N=J.count();M<N;M++){K=J.getItem(M);if(K.$!=H.$){L=K.$.contentWindow.document.body;L.className=K.getAttribute('lj-class')||'';if(K.getAttribute('lj-cmd')=='LJPollLink'&&L.className=='lj-poll')K.removeAttribute('style');}}}do{var O=H.getAttribute('lj-cmd');if(!O&&H.type==1){var P=H.getParent();if(H.is('img')&&P.getParent()&&!P.getParent().hasAttribute('lj:user')){O='image';H.setAttribute('lj-cmd',O);}else if(H.is('a')&&!P.hasAttribute('lj:user')){O='LJLink';H.setAttribute('lj-cmd',O);}}if(O&&o.hasOwnProperty(O)){if(F){o[O].node=H;t.getCommand(O).setState(1);}(D||(D={}))[O]={content:o[O].html,node:H};}}while(H=H.getParent());
-if(F)for(I in o){if(o.hasOwnProperty(I)&&(!D||!D.hasOwnProperty(I))){delete o[I].node;t.getCommand(I).setState(2);}}D?a.note.show(D):a.note.hide();};(function(){function C(H){return H.slice(-2)=='/>'?H:H.slice(0,-1)+'/>';};function D(H){var I=new Poll(H);return '<iframe class="lj-poll-wrap" lj-class="lj-poll" frameborder="0" lj-cmd="LJPollLink" allowTransparency="true" lj-data="'+I.outputLJtags()+'" lj-content="'+I.outputHTML()+'"></iframe>';};function E(H,I,J){return '<iframe class="lj-embed-wrap" lj-class="lj-embed" frameborder="0" allowTransparency="true" lj-data="'+encodeURIComponent(J)+'"'+I+'></iframe>';};function F(H,I,J,K){return I+J.replace(/\n/g,'')+K;};function G(H,I,J,K){var L=I||J||m.LJRepost_Value,M=K.replace(/"/g,'&quot;');K=M+('<br /><input type="button" value="'+L+'" />').replace(/"/g,'&quot;');return '<iframe class="lj-repost-wrap" lj-class="lj-repost" frameborder="0" allowTransparency="true" lj-text="'+M+'" lj-button="'+L+'" lj-content="'+K+'"></iframe>';};t.dataProcessor.toHtml=function(H,I){H=H.replace(/<lj [^>]*?>/gi,C).replace(/<lj-map [^>]*?>/gi,C).replace(/<lj-template[^>]*?>/gi,C).replace(/(<lj-cut[^>]*?)\/>/gi,'$1>').replace(/<((?!br)[^\s>]+)([^>]*?)\/>/gi,'<$1$2></$1>').replace(/<lj-poll.*?>[\s\S]*?<\/lj-poll>/gi,D).replace(/<lj-repost\s*(?:button\s*=\s*(?:"([^"]*?)")|(?:"([^']*?)"))?.*?>([\s\S]*?)<\/lj-repost>/gi,G).replace(/<lj-embed(.*?)>([\s\S]*?)<\/lj-embed>/gi,E);if(!$('event_format').checked){H=H.replace(/(<lj-raw.*?>)([\s\S]*?)(<\/lj-raw>)/gi,F);if(!window.switchedRteOn)H=H.replace(/\n/g,'<br />');}H=a.htmlDataProcessor.prototype.toHtml.call(this,H,I);if(c)H='<xml:namespace ns="livejournal" prefix="lj" />'+H;return H;};})();t.dataProcessor.toDataFormat=function(C,D){C=a.htmlDataProcessor.prototype.toDataFormat.call(this,C,D);if(!$('event_format').checked)C=C.replace(/<br\s*\/>/gi,'\n');return C.replace(/\t/g,' ');};t.dataProcessor.writer.indentationChars='';t.dataProcessor.writer.lineBreakChars='';t.on('selectionChange',z);t.on('doubleclick',u);t.on('afterCommandExec',y);t.on('dialogHide',y);t.on('dataReady',function(){if(!a.note)r(t);if(c){t.document.getBody().on('dragend',y);t.document.getBody().on('paste',function(){setTimeout(y,0);});}t.document.on('click',z);t.document.on('mouseout',a.note.hide);t.document.on('mouseover',z);t.document.getBody().on('keyup',w);y();});(function(){var C=top.Site.siteroot+'/tools/endpoints/ljuser.bml';function D(E,F,G){if(E.error){alert(E.error);return;}if(E.success){E.ljuser=E.ljuser.replace('<span class="useralias-value">*</span>','');
-p[F]=E.ljuser;var H=new h.createFromHtml(E.ljuser);H.setAttribute('lj-cmd','LJUserLink');if(G)G.$.parentNode.replaceChild(H.$,G.$);else t.insertElement(H);}};t.addCommand('LJUserLink',{exec:function(E){var F='',G=new d.selection(E.document),H=o.LJUserLink.node,I;if(H){a.note&&a.note.hide(true);I=o.LJUserLink.node.getElementsByTag('b').getItem(0).getText();F=prompt(m.UserPrompt,I);}else if(G.getType()==2)F=G.getSelectedText();if(F=='')F=prompt(m.UserPrompt,F);if(!F||I==F)return;parent.HTTPReq.getJSON({data:parent.HTTPReq.formEncoded({username:F}),method:'POST',url:C,onData:function(J){D(J,F,H);}});}});t.ui.addButton('LJUserLink',{label:m.LJUser,command:'LJUserLink'});})();if(window.ljphotoEnabled&&window.ljphotoMigrationStatus===LJ.getConst('LJPHOTO_MIGRATION_NONE'))t.ui.addButton('image',{label:m.LJImage_Title,command:'image'});else{t.addCommand('LJImage',{exec:function(){if(typeof InOb!=='undefined')InOb.handleInsertImageBeta('upload');else jQuery('.b-updatepage-event-section').editor('handleImageUpload','upload');},editorFocus:false});t.ui.addButton('image',{label:m.LJImage_Title,command:'LJImage'});}t.addCommand('LJLink',{exec:function(C){!q&&this.state==1?C.execCommand('unlink'):C.openDialog('link');a.note&&a.note.hide(true);},editorFocus:false});t.ui.addButton('LJLink',{label:t.lang.link.toolbar,command:'LJLink'});(function(){function C(D){if(D&&D.length&&window.switchedRteOn){var E=new h('iframe',t.document);E.setAttribute('lj-data',encodeURIComponent(D));E.setAttribute('lj-class','lj-embed');E.setAttribute('class','lj-embed-wrap');E.setAttribute('frameBorder',0);E.setAttribute('allowTransparency','true');t.insertElement(E);y();}};t.addCommand('LJEmbedLink',{exec:function(){top.LJ_IPPU.textPrompt(m.LJEmbedPromptTitle,m.LJEmbedPrompt,C,{width:'350px'});}});t.ui.addButton('LJEmbedLink',{label:m.LJEmbed,command:'LJEmbedLink'});})();function A(C,D,E){var F,G=o[D].node;if(G){if(F=prompt(E.title,G.getAttribute('text')||E.text))if(F==E.text)G.removeAttribute('text');else G.setAttribute('text',F);}else{if(F=prompt(E.title,E.text)){t.focus();var H=new d.selection(t.document),I=H.getRanges(),J=new h('iframe',t.document),K=J.clone();J.setAttribute('lj-cmd',D);J.setAttribute('lj-class',C+' '+C+'-open');J.setAttribute('class',C+'-wrap');J.setAttribute('frameBorder',0);J.setAttribute('allowTransparency','true');if(F!=E.text)J.setAttribute('text',F);K.setAttribute('lj-class',C+' '+C+'-close');K.setAttribute('class',C+'-wrap');K.setAttribute('frameBorder',0);K.setAttribute('allowTransparency','true');
-var L=I[0];H.lock();var M=new h('br',t.document),N=M.clone(),O=M.clone(),P=new d.documentFragment(t.document);P.append(M.clone());P.append(J);P.append(N);if(L.collapsed===false)for(var Q=0,R=I.length;Q<R;Q++)P.append(I[Q].extractContents());P.append(O);t.insertElement(K);M.clone().insertAfter(K);K.insertBeforeMe(P);L.setStart(N,0);L.setEnd(O,0);H.unlock();H.selectRanges(I);}a.note&&a.note.hide(true);}};t.addCommand('LJCut',{exec:function(){A('lj-cut','LJCut',{title:m.LJCut_PromptTitle,text:m.LJCut_PromptText});},editorFocus:false});t.ui.addButton('LJCut',{label:m.LJCut_Title,command:'LJCut'});t.addCommand('LJSpoiler',{exec:function(){A('lj-spoiler','LJSpoiler',{title:m.LJSpoiler_PromptTitle,text:m.LJSpoiler_PromptText});},editorFocus:false});t.ui.addButton('LJSpoiler',{label:m.LJSpoiler_Title,command:'LJSpoiler'});(function(){function C(J,K){K=K===undefined||K;var L,M=o.LJLike.node;if(M){var N=J.getAttribute('lj-style');L=N?N.replace(/text-align:\s*(left|right|center)/i,'$1'):'left';}else if(K)L=J.getComputedStyle('text-align');else{while(!J.hasAttribute||!(J.hasAttribute('align')||J.getStyle('text-align'))){var O=J.getParent();if(!O)break;J=O;}L=J.getStyle('text-align')||J.getAttribute('align')||'';}L&&(L=L.replace(/-moz-|-webkit-|start|auto/i,''));!L&&K&&(L=J.getComputedStyle('direction')=='rtl'?'right':'left');return L;};function D(J){if(J.editor.readOnly)return;var K=J.editor.getCommand(this.name),L=J.data.element;if((L.type==1&&L.hasAttribute('lj-cmd')&&L.getAttribute('lj-cmd'))=='LJLike')K.state=C(L,t.config.useComputedState)==this.value?1:2;else if(!L||L.type!=1||L.getName()=='body'||L.getName()=='iframe')K.state=2;else K.state=C(L,t.config.useComputedState)==this.value?1:2;K.fire('state');};function E(J,K,L){var N=this;N.name=K;N.value=L;var M=J.config.justifyClasses;if(M){switch(L){case 'left':N.cssClassName=M[0];break;case 'center':N.cssClassName=M[1];break;case 'right':N.cssClassName=M[2];break;}N.cssClassRegex=new RegExp('(?:^|\\s+)(?:'+M.join('|')+')(?=$|\\s)');}};function F(J){var K=J.editor,L=new d.range(K.document);L.setStartBefore(J.data.node);L.setEndAfter(J.data.node);var M=new d.walker(L),N;while(N=M.next()){if(N.type==1){var O='text-align',P=K.config.justifyClasses;if(!N.equals(J.data.node)&&N.getDirection()){L.setStartAfter(N);M=new d.walker(L);continue;}if(P)if(N.hasClass(P[0])){N.removeClass(P[0]);N.addClass(P[2]);}else if(N.hasClass(P[2])){N.removeClass(P[2]);N.addClass(P[0]);}switch(N.getStyle(O)){case 'left':N.setStyle(O,'right');
-break;case 'right':N.setStyle(O,'left');break;}}}};E.prototype={exec:function(J){var X=this;var K=J.getSelection(),L=J.config.enterMode;if(!K)return;var M=K.createBookmarks();if(o.LJLike.node)o.LJLike.node.setAttribute('lj-style','text-align: '+X.value);else{var N=K.getRanges(true),O=X.cssClassName,P,Q,R=J.config.useComputedState;R=R===undefined||R;for(var S=N.length-1;S>=0;S--){var T=N[S],U=T.getEnclosedNode();if(U&&U.is('iframe'))return;P=T.createIterator();P.enlargeBr=L!=2;while(Q=P.getNextParagraph(L==1?'p':'div')){Q.removeAttribute('align');Q.removeStyle('text-align');var V=O&&(Q.$.className=e.ltrim(Q.$.className.replace(X.cssClassRegex,''))),W=X.state==2&&(!R||C(Q,true)!=X.value);if(O){if(W)Q.addClass(O);else if(!V)Q.removeAttribute('class');}else if(W)Q.setStyle('text-align',X.value);}}}J.focus();J.forceNextSelectionCheck();K.selectBookmarks(M);}};var G=new E(t,'LJJustifyLeft','left'),H=new E(t,'LJJustifyCenter','center'),I=new E(t,'LJJustifyRight','right');t.addCommand('LJJustifyLeft',G);t.addCommand('LJJustifyCenter',H);t.addCommand('LJJustifyRight',I);t.ui.addButton('LJJustifyLeft',{label:t.lang.justify.left,command:'LJJustifyLeft'});t.ui.addButton('LJJustifyCenter',{label:t.lang.justify.center,command:'LJJustifyCenter'});t.ui.addButton('LJJustifyRight',{label:t.lang.justify.right,command:'LJJustifyRight'});t.on('selectionChange',e.bind(D,G));t.on('selectionChange',e.bind(D,I));t.on('selectionChange',e.bind(D,H));t.on('dirChanged',F);})();if(top.canmakepoll){var B;a.dialog.add('LJPollDialog',function(){var C=0,D,E,F,G=function(){if(this.removeListener)this.removeListener('load',G);if(C&&D){B=new Poll(o.LJPollLink.node&&decodeURIComponent(o.LJPollLink.node.getAttribute('lj-data')),E.document,F.document,E.Questions);E.ready(B);F.ready(B);D.style.display='block';a.note&&a.note.hide(true);}else C++;},H=[new k.button({type:'button',id:'LJPoll_Ok',label:t.lang.common.ok,onClick:function(I){I.data.dialog.hide();var J=new Poll(B,E.document,F.document,E.Questions),K=J.outputHTML(),L=J.outputLJtags();if(K.length>0){var M=o.LJPollLink.node;if(M){M.setAttribute('lj-content',K);M.setAttribute('lj-data',L);M.removeAttribute('style');M.$.contentWindow.document.body.className='lj-poll';}else{M=new h('iframe',t.document);M.setAttribute('lj-content',K);M.setAttribute('lj-cmd','LJPollLink');M.setAttribute('lj-data',L);M.setAttribute('lj-class','lj-poll');M.setAttribute('class','lj-poll-wrap');M.setAttribute('frameBorder',0);M.setAttribute('allowTransparency','true');
-t.insertElement(M);}o.LJPollLink.node=null;y();}}}),a.dialog.cancelButton];b.mac&&H.reverse();return{title:m.Poll_PollWizardTitle,width:420,height:270,resizable:false,onShow:function(){if(C){B=new Poll(o.LJPollLink.node&&unescape(o.LJPollLink.node.getAttribute('data')),E.document,F.document,E.Questions);E.ready(B);F.ready(B);}},contents:[{id:'LJPoll_Setup',label:'Setup',padding:0,elements:[{type:'html',html:'<iframe src="/tools/ck_poll_setup.bml" allowTransparency="true" frameborder="0" style="width:100%; height:320px;"></iframe>',onShow:function(I){if(!D)(D=document.getElementById(I.sender.getButton('LJPoll_Ok').domId).parentNode).style.display='none';var J=this.getElement('iframe');F=J.$.contentWindow;if(F.ready)G();else J.on('load',G);}}]},{id:'LJPoll_Questions',label:'Questions',padding:0,elements:[{type:'html',html:'<iframe src="/tools/ck_poll_questions.bml" allowTransparency="true" frameborder="0" style="width:100%; height:320px;"></iframe>',onShow:function(){var I=this.getElement('iframe');E=I.$.contentWindow;if(E.ready)G();else I.on('load',G);}}]}],buttons:H};});t.addCommand('LJPollLink',new a.dialogCommand('LJPollDialog'));}else{t.addCommand('LJPollLink',{exec:function(){a.note&&a.note.show(m.Poll_AccountLevelNotice,null,null,true);}});t.getCommand('LJPollLink').setState(0);}t.ui.addButton('LJPollLink',{label:m.Poll_Title,command:'LJPollLink'});(function(){function C(){if(t.getCommand('LJLike')==2){this.$.checked?F++:F--;G.getButton('LJLike_Ok').getElement()[F==0?'addClass':'removeClass']('btn-disabled');}};var D=n.length,E='<div class="cke-dialog-likes"><ul class="cke-dialog-likes-list">',F=0,G,H;n.defaultButtons=[];for(var I=0;I<D;I++){var J=n[I];n[J.id]=n[J.abbr]=J;n.defaultButtons.push(J.id);E+=J.htmlOpt;}E+='</ul><p class="cke-dialog-likes-faq">'+window.faqLink+'</p></div>';a.dialog.add('LJLikeDialog',function(){var K=[new k.button({type:'button',id:'LJLike_Ok',label:t.lang.common.ok,onClick:function(){var L=[],M='<span class="lj-like-wrapper">',N=o.LJLike.node;if(G.getButton('LJLike_Ok').getElement().hasClass('btn-disabled'))return false;for(var O=0;O<D;O++){var P=n[O],Q=document.getElementById('like-'+P.abbr),R=N&&N.getAttribute('buttons');if(Q&&Q.checked||R&&!P.htmlOpt&&(R.indexOf(P.abbr)+1||R.indexOf(P.id)+1)){L.push(P.id);M+=P.html;}}M+='</span>';if(L.length){if(N){o.LJLike.node.setAttribute('buttons',L.join(','));o.LJLike.node.setAttribute('lj-content',encodeURIComponent(M));}else{N=new h('iframe',t.document);N.setAttribute('lj-class','lj-like');
-N.setAttribute('class','lj-like-wrap');N.setAttribute('buttons',L.join(','));N.setAttribute('lj-content',encodeURIComponent(M));N.setAttribute('lj-cmd','LJLike');N.setAttribute('frameBorder',0);N.setAttribute('allowTransparency','true');t.insertElement(N);}}else if(N)o.LJLike.node.remove();G.hide();}}),a.dialog.cancelButton];b.mac&&K.reverse();return{title:m.LJLike_name,width:145,height:window.isSupUser?180:145,resizable:false,contents:[{id:'LJLike_Options',elements:[{type:'html',html:E}]}],onShow:function(){var L=t.getCommand('LJLike'),M=F=0,N=L.state==1,O=o.LJLike.node&&o.LJLike.node.getAttribute('buttons');a.note&&a.note.hide(true);for(;M<D;M++){var P=O?!!(O.indexOf(n[M].abbr)+1||O.indexOf(n[M].id)+1):true,Q=document.getElementById('like-'+n[M].abbr);if(Q){if(P&&!N)F++;Q.checked=P;}}if(F>0)G.getButton('LJLike_Ok').getElement().removeClass('btn-disabled');},onLoad:function(){G=this;H=G.parts.contents.getElementsByTag('input');for(var L=0;L<D;L++){var M=H.getItem(L);M&&M.on('click',C);}},buttons:K};});t.addCommand('LJLike',new a.dialogCommand('LJLikeDialog'));t.ui.addButton('LJLike',{label:m.LJLike_name,command:'LJLike'});})();},afterInit:function(t){var u=t.dataProcessor;function v(w,x,y,z){z=z||'text';var A=new a.htmlParser.element('iframe');A.attributes['lj-class']=x+' '+x+'-open';A.attributes['class']=x+'-wrap';A.attributes['lj-cmd']=y;A.attributes.frameBorder=0;A.attributes.allowTransparency='true';if(w.attributes.hasOwnProperty(z))A.attributes.text=w.attributes[z];w.children.unshift(A);var B=new a.htmlParser.element('iframe');B.attributes['lj-class']=x+' '+x+'-close';B.attributes['class']=x+'-wrap';B.attributes.frameBorder=0;B.attributes.allowTransparency='true';w.children.push(B);delete w.name;};u.dataFilter.addRules({elements:{'lj-like':function(w){var x=[],y=new a.htmlParser.element('iframe');y.attributes['lj-class']='lj-like';y.attributes['class']='lj-like-wrap';if(w.attributes.hasOwnProperty('style'))y.attributes['lj-style']=w.attributes.style;y.attributes['lj-cmd']='LJLike';y.attributes['lj-content']='<span class="lj-like-wrapper">';y.attributes.frameBorder=0;y.attributes.allowTransparency='true';var z=w.attributes.buttons&&w.attributes.buttons.split(',')||n.defaultButtons,A=z.length;for(var B=0;B<A;B++){var C=z[B].replace(/^\s*([a-z]{2,})\s*$/i,'$1'),D=n[C];if(D){y.attributes['lj-content']+=encodeURIComponent(D.html);x.push(C);}}y.attributes['lj-content']+='</span>';y.attributes.buttons=x.join(',');return y;},lj:(function(){function w(x){var y=t.document.getElementsByTag('lj');
-for(var z=0,A=y.count();z<A;z++){var B=y.getItem(z);if(B){var C=B.getAttribute('user'),D=B.getAttribute('title');if(x==(D?C+':'+D:C)){var E=new h.createFromHtml(p[x],t.document);E.setAttribute('lj-cmd','LJUserLink');B.insertBeforeMe(E);B.remove();}}}t.removeListener('dataReady',w);};return function(x){var y=x.attributes.user;if(!y||!y.length)return;var z=x.attributes.title,A=z?y+':'+z:y;if(p.hasOwnProperty(A)){var B=new a.htmlParser.fragment.fromHtml(p[A]).children[0];B.attributes['lj-cmd']='LJUserLink';return B;}else{var C={username:y};if(z)C.usertitle=z;HTTPReq.getJSON({data:HTTPReq.formEncoded(C),method:'POST',url:Site.siteroot+'/tools/endpoints/ljuser.bml',onError:function(D){alert(D+' "'+y+'"');},onData:function(D){if(D.error)return alert(D.error+' "'+y+'"');if(!D.success)return;p[A]=D.ljuser;D.ljuser=D.ljuser.replace('<span class="useralias-value">*</span>','');if(t.document)w(A);else t.on('dataReady',function(){w(A);});}});}};})(),'lj-map':function(w){var x=new a.htmlParser.element('iframe'),y='',z='',A=Number(w.attributes.width),B=Number(w.attributes.height);if(!isNaN(A)){y+='width:'+A+'px;';z+='width:'+(A-2)+'px;';}if(!isNaN(B)){y+='height:'+B+'px;';z+='height:'+(B-2)+'px;';}if(y.length){x.attributes.style=y;x.attributes['lj-style']=z;}x.attributes['lj-url']=w.attributes.url?encodeURIComponent(w.attributes.url):'';x.attributes['lj-class']='lj-map';x.attributes['class']='lj-map-wrap';x.attributes['lj-content']='<p class="lj-map">map</p>';x.attributes.frameBorder=0;x.attributes.allowTransparency='true';return x;},'lj-raw':function(w){w.name='lj:raw';},'lj-wishlist':function(w){w.name='lj:wishlist';},'lj-template':function(w){var x=new a.htmlParser.element('iframe');x.attributes['lj-class']='lj-template';x.attributes['class']='lj-template-wrap';x.attributes.frameBorder=0;x.attributes.allowTransparency='true';x.attributes['lj-attributes']=encodeURIComponent(LiveJournal.JSON.stringify(w.attributes));return x;},'lj-cut':function(w){v(w,'lj-cut','LJCut');},'lj-spoiler':function(w){v(w,'lj-spoiler','LJSpoiler','title');},iframe:function(w){if(w.attributes['lj-class']&&w.attributes['lj-class'].indexOf('lj-')+1==1)return w;var x=new a.htmlParser.element('iframe'),y='',z='',A=Number(w.attributes.width),B=Number(w.attributes.height);if(!isNaN(A)){y+='width:'+A+'px;';z+='width:'+(A-2)+'px;';}if(!isNaN(B)){y+='height:'+B+'px;';z+='height:'+(B-2)+'px;';}if(y.length){x.attributes.style=y;x.attributes['lj-style']=z;}x.attributes['lj-url']=w.attributes.src?encodeURIComponent(w.attributes.src):'';
-x.attributes['lj-class']='lj-iframe';x.attributes['class']='lj-iframe-wrap';x.attributes['lj-content']='<p class="lj-iframe">iframe</p>';x.attributes.frameBorder=0;x.attributes.allowTransparency='true';return x;},a:function(w){if(w.parent.attributes&&!w.parent.attributes['lj:user'])w.attributes['lj-cmd']='LJLink';},img:function(w){var x=w.parent&&w.parent.parent;if(!x||!x.attributes||!x.attributes['lj:user'])w.attributes['lj-cmd']='image';},div:function(w){if(w.attributes['class']=='lj-cut')v(w,'lj-cut','LJCut');}}},5);u.htmlFilter.addRules({elements:{iframe:function(w){var x=w,y=false,z='text',A=/lj-[a-z]+/i.exec(w.attributes['lj-class']);if(A)A=A[0];else return w;switch(A){case 'lj-like':x=new a.htmlParser.element('lj-like');x.attributes.buttons=w.attributes.buttons;if(w.attributes.hasOwnProperty('lj-style'))x.attributes.style=w.attributes['lj-style'];x.isEmpty=true;x.isOptionalClose=true;break;case 'lj-embed':x=new a.htmlParser.element('lj-embed');x.attributes.id=w.attributes.id;if(w.attributes.hasOwnProperty('source_user'))x.attributes.source_user=w.attributes.source_user;x.children=new a.htmlParser.fragment.fromHtml(decodeURIComponent(w.attributes['lj-data'])).children;x.isOptionalClose=true;break;case 'lj-map':x=new a.htmlParser.element('lj-map');x.attributes.url=decodeURIComponent(w.attributes['lj-url']);w.attributes.style&&(w.attributes.style+';').replace(/([a-z-]+):(.*?);/gi,function(F,G,H){x.attributes[G.toLowerCase()]=parseInt(H);});x.isOptionalClose=x.isEmpty=true;break;case 'lj-iframe':x=new a.htmlParser.element('iframe');x.attributes.src=decodeURIComponent(w.attributes['lj-url']);w.attributes.style&&(w.attributes.style+';').replace(/([a-z-]+):(.*?);/gi,function(F,G,H){x.attributes[G.toLowerCase()]=parseInt(H);});x.attributes.frameBorder=0;break;case 'lj-poll':x=new a.htmlParser.fragment.fromHtml(decodeURIComponent(w.attributes['lj-data'])).children[0];break;case 'lj-repost':x=new a.htmlParser.element('lj-repost');x.attributes.button=w.attributes['lj-button'];x.children=new a.htmlParser.fragment.fromHtml(w.attributes['lj-text']).children;break;case 'lj-template':x=new a.htmlParser.element('lj-template');x.attributes=LiveJournal.JSON.parse(encodeURIComponent(w.attributes['lj-attributes']));x.isOptionalClose=x.isEmpty=true;break;case 'lj-spoiler':y=true;z='title';case 'lj-cut':if(w.attributes['lj-class'].indexOf(A+'-open')+1){var B=w.next,C=0;x=new a.htmlParser.element(A);if(w.attributes.hasOwnProperty('text'))x.attributes[z]=w.attributes.text;while(B){if(B.name=='iframe'){var D=B.attributes['lj-class'];
-if(D.indexOf(A+'-close')+1){if(y&&C)C--;else{x.next=B;break;}}else if(D.indexOf(A+'-open')+1)if(y)C++;else{x.next=B;break;}}B.parent.children.remove(B);x.add(B);var E=B.next;B.next=null;B=E;}}else x=false;break;default:if(!w.children.length)x=false;}return x;},span:function(w){var x=w.attributes['lj:user'];if(x){var y=new a.htmlParser.element('lj');y.attributes.user=x;try{var z=w.children[1].children[0].children[0].value;}catch(A){return false;}if(z&&z!=x)y.attributes.title=z;y.isOptionalClose=y.isEmpty=true;return y;}else if(w.attributes.style=='display: none;'||!w.children.length)return false;},div:function(w){if(!w.children.length)return false;},'lj:raw':function(w){w.name='lj-raw';},'lj:wishlist':function(w){w.name='lj-wishlist';}},attributes:{'lj-cmd':function(){return false;},contenteditable:function(){return false;}}});},requires:['fakeobjects','domiterator']});})();j.add('ljspell',{requires:['menu'],onLoad:function(){j.ljspell=e.createClass({base:a.menu,$:function(m){LJ.console.log(arguments);this.base.call(this,m,{panel:{className:m.skinClass+' cke_contextmenu',attributes:{'aria-label':m.lang.contextmenu.options}}});},proto:{addTarget:function(m,n){m.on('mousedown',function(o){LJ.console.log(arguments);});}}});},beforeInit:function(m){m.ljspell=new j.ljspell(m);}});a.editorConfig=function(m){m.language='ru';m.autoParagraph=false;m.autoUpdateElement=false;m.docType='<!DOCTYPE html>';m.contentsCss='/js/ck/contents.css?t='+Site.version;m.plugins=['ajax','basicstyles','bidi','blockquote','button','colorbutton','colordialog','dialog','enterkey','entities','font','format','htmldataprocessor','image','keystrokes','link','list','liststyle','pastefromword','specialchar','tab','table','toolbar','undo','wysiwygarea','onchange','livejournal'].join(',');if(jQuery.browser.msie||jQuery.browser.opera)m.plugins+=',contextmenu';m.autoGrow_maxHeight=400;m.contentsLangDirection='ltr';m.fillEmptyBlocks=false;m.tabIndex=1;m.tabSpaces=2;m.startupShowBorders=false;m.toolbarCanCollapse=false;m.disableNativeSpellChecker=false;m.toolbar_Full=[['Bold','Italic','Underline','Strike','TextColor','FontSize','-','LJLink','LJUserLink','image']];if(top.Site.media_embed_enabled)m.toolbar_Full[0].push('LJEmbedLink');m.toolbar_Full[0].push('LJPollLink','LJCutLink','LJCut','LJLike','LJSpoiler','-','UnorderedList','OrderedList','NumberedList','BulletedList','-','LJJustifyLeft','LJJustifyCenter','LJJustifyRight','-','Undo','Redo');m.enterMode=2;m.shiftEnterMode=1;m.keystrokes=[[2228224+121,'contextMenu'],[1114112+90,'undo'],[1114112+89,'redo'],[1114112+2228224+90,'redo'],[1114112+76,'link'],[1114112+66,'bold'],[1114112+73,'italic'],[1114112+85,'underline']];
-m.colorButton_colors='000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF';m.fontSize_sizes='smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large';m.disableObjectResizing=true;m.format_tags='p;h1;h2;h3;h4;h5;h6;pre;address';m.removeFormatTags='b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var';m.removeFormatAttributes='class,style,lang,width,height,align,hspace,valign';m.coreStyles_bold={element:'b',overrides:'strong'};m.coreStyles_italic={element:'i',overrides:'em'};m.indentClasses=[];m.indentOffset=0;m.pasteFromWordRemoveFontStyles=false;m.pasteFromWordRemoveStyles=false;m.protectedSource.push(/<lj-poll-\d+\s*\/?>/gi);m.protectedSource.push(/<lj-replace name="first_post"\s*\/?>/gi);};a.editorConfig(i);})();
+jQuery.extend(m,LJ.pageVar('rtedata'));var n=[{label:m.LJLike_button_repost,id:'repost',abbr:'rp',html:'<span class="lj-like-item rp">'+m.LJLike_button_repost+'</span>',htmlOpt:'<li class="like-rp"><input type="checkbox" id="like-rp" /><label for="like-rp">'+m.LJLike_button_repost+'</label></li>'},{label:m.LJLike_button_facebook,id:'facebook',abbr:'fb',html:'<span class="lj-like-item fb">'+m.LJLike_button_facebook+'</span>',htmlOpt:'<li class="like-fb"><input type="checkbox" id="like-fb" /><label for="like-fb">'+m.LJLike_button_facebook+'</label></li>'},{label:m.LJLike_button_twitter,id:'twitter',abbr:'tw',html:'<span class="lj-like-item tw">'+m.LJLike_button_twitter+'</span>',htmlOpt:'<li class="like-tw"><input type="checkbox" id="like-tw" /><label for="like-tw">'+m.LJLike_button_twitter+'</label></li>'},{label:m.LJLike_button_google,id:'google',abbr:'go',html:'<span class="lj-like-item go">'+m.LJLike_button_google+'</span>',htmlOpt:'<li class="like-go"><input type="checkbox" id="like-go" /><label for="like-go">'+m.LJLike_button_google+'</label></li>'},{label:m.LJLike_button_vkontakte,id:'vkontakte',abbr:'vk',html:'<span class="lj-like-item vk">'+m.LJLike_button_vkontakte+'</span>',htmlOpt:window.isSupUser?'<li class="like-vk"><input type="checkbox" id="like-vk" /><label for="like-vk">'+m.LJLike_button_vkontakte+'</label></li>':''},{label:m.LJLike_button_give,id:'livejournal',abbr:'lj',html:'<span class="lj-like-item lj">'+m.LJLike_button_give+'</span>',htmlOpt:'<li class="like-lj"><input type="checkbox" id="like-lj" /><label for="like-lj">'+m.LJLike_button_give+'</label></li>'}],o={LJPollLink:{html:encodeURIComponent(m.Poll_PollWizardNotice+'<br /><a href="#" lj-cmd="LJPollLink">'+m.Poll_PollWizardNoticeLink+'</a>')},LJLike:{html:encodeURIComponent(m.LJLike_WizardNotice+'<br /><a href="#" lj-cmd="LJLike">'+m.LJLike_WizardNoticeLink+'</a>')},LJUserLink:{html:encodeURIComponent(m.LJUser_WizardNotice+'<br /><a href="#" lj-cmd="LJUserLink">'+m.LJUser_WizardNoticeLink+'</a>')},LJLink:{html:encodeURIComponent(m.LJLink_WizardNotice+'<br /><a href="#" lj-cmd="LJLink">'+m.LJLink_WizardNoticeLink+'</a>')},image:{html:encodeURIComponent(m.LJImage_WizardNotice+'<br /><a href="#" lj-cmd="image">'+m.LJImage_WizardNoticeLink+'</a>')},LJCut:{html:encodeURIComponent(m.LJCut_WizardNotice+'<br /><a href="#" lj-cmd="LJCut">'+m.LJCut_WizardNoticeLink+'</a>')},LJSpoiler:{html:encodeURIComponent(m.LJSpoiler_WizardNotice+'<br /><a href="#" lj-cmd="LJSpoiler">'+m.LJSpoiler_WizardNoticeLink+'</a>')}},p={},q;
+function r(t){var u,v,w,x,y=document.createElement('lj-note'),z=typeof document.body.style.opacity!='string',A=(function(){var D=60,E=100,F=E*D/1000,G=[],H,I=document.getElementById('draft-container')||document.body;function J(){var K=G.shift(),L=(H?K.time/E:-(K.time/E-1)).toFixed(1);if(!G.length)L=H?1:0;if(z)y.style.filter=L>=1?null:'progid:DXImageTransform.Microsoft.Alpha(opacity='+L*100+')';else y.style.opacity=L;if(L==0&&y&&y.parentNode)y.parentNode.removeChild(y);};return function(K){H=K;if(H&&y.parentNode){if(z)y.style.filter=null;else y.style.opacity=1;}else for(var L=1;L<=F;L++){var M=Math.floor(1000/D)*L;G.push({time:M,timer:setTimeout(J,M)});}I.appendChild(y);y.style.marginTop=-y.offsetHeight/2+'px';y.style.marginLeft=-y.offsetWidth/2+'px';};})();y.className='note-popup';y.onmouseout=function(){if(!w||!w.cmd)a.note.hide();};y.onmouseover=function(){if(u&&!v){v=1;u=clearTimeout(u);}};if(z)y.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity=0)';else y.style.opacity=0;function B(){var D=this.getAttribute('lj-cmd');if(w.hasOwnProperty(D)){o[D].node=w[D].node;var E=new d.selection(t.document);E.selectElement(o[D].node);q=true;t.execCommand(D);a.note.hide(true);}return false;};function C(){if(!window.switchedRteOn)a.note.hide(true);if(v){w=x;x=null;var D='';for(var E in w){if(w.hasOwnProperty(E))D+='<div class="noteItem">'+w[E].content+'</div>';}y.innerHTML=decodeURIComponent(D);var F=y.getElementsByTagName('a');for(var G=0,H=F.length;G<H;G++){var I=F[G];if(o.hasOwnProperty(I.getAttribute('lj-cmd')))I.onclick=B;}}else w=null;A(v);u=null;};a.note={show:function(D,E){if(!E&&D==x||!window.switchedRteOn)return;if(u)u=clearTimeout(u);v=1;x=D;E===true?C():u=setTimeout(C,1000);},hide:function(D){if(v){v=0;if(u)u=clearTimeout(u);if(y.parentNode)D===true?C():u=setTimeout(C,500);}}};};var s=f;s.$block['lj-template']=1;s.$block['lj-raw']=1;s.$block['lj-cut']=1;s.$block['lj-spoiler']=1;s.$block['lj-poll']=1;s.$block['lj-repost']=1;s.$block['lj-pq']=1;s.$block['lj-pi']=1;s.$nonEditable['lj-template']=1;s['lj-template']={};s['lj-map']={};s['lj-repost']={};s['lj-raw']=s.div;s['lj-poll']={'lj-pq':1};s['lj-pq']={'#':1,'lj-pi':1};s['lj-pi']={'#':1};s.$block.iframe=s.$inline.iframe;delete s.$inline.iframe;e.extend(s['lj-cut']={},s.$block);e.extend(s['lj-spoiler']={},s.$block);e.extend(s['lj-cut'],s.$inline);e.extend(s['lj-spoiler'],s.$inline);e.extend(s.div,s.$block);e.extend(s.$body,s.$block);delete s['lj-cut']['lj-cut'];j.add('livejournal',{init:function(t){function u(C){var D=C.data.element||C.data.getTarget();
+if(D.type!=1)D=D.getParent();while(D){var E=D.getAttribute('lj-cmd');if(o.hasOwnProperty(E)){var F=t.getCommand(E);if(F.state==1){var G=new d.selection(t.document);o[E].node=D.is('body')?new h.get(D.getWindow().$.frameElement):D;G.selectElement(o[E].node);C.data.dialog='';q=true;F.exec();break;}}D=D.getParent();}};function v(C){var D=this;if(D.$!=t.document.$){D.$.className=(D.frame.getAttribute('lj-class')||'')+' lj-selected';if(D.getAttribute('lj-cmd')=='LJPollLink')D.frame.setStyle('height',D.getDocument().$.body.scrollHeight+'px');new d.selection(t.document).selectElement(D.frame);}C.data.getKey()==1&&C.data.preventDefault();};function w(C){if(C.data.getKey()==46){var D=new d.selection(t.document).getRanges(),E=D.length;while(E--)D[E].deleteContents();}};function x(){var F=this;var C=F.$.contentWindow,D=C.document,E=new h.get(D.body);if(E.on){E.on('dblclick',u);E.on('click',v);E.on('keyup',w);if(F.getAttribute('lj-cmd')=='LJPollLink'&&F.hasAttribute('style'))D.body.classN...
 (truncated)
Tags: atyurin, js, livejournal, spacevillain
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments