spacevillain (spacevillain) wrote in changelog,
spacevillain
spacevillain
changelog

[livejournal] r23466: LJSUP-13791: Iframe Vimeo

Committer: atyurin
LJSUP-13791: Iframe Vimeo
U   trunk/htdocs/js/ck/ckeditor.js
U   trunk/htdocs/js/ck/config.js
U   trunk/htdocs/js/ck/plugins/livejournal/plugin.js
U   trunk/htdocs/js/livejournal.js
Modified: trunk/htdocs/js/ck/ckeditor.js
===================================================================
--- trunk/htdocs/js/ck/ckeditor.js	2012-12-13 06:30:22 UTC (rev 23465)
+++ trunk/htdocs/js/ck/ckeditor.js	2012-12-13 15:07:25 UTC (rev 23466)
@@ -133,30 +133,31 @@
 if(Q&&Q.checked||R&&!P.htmlOpt&&(R.indexOf(P.abbr)+1||R.indexOf(P.id)+1)){K.push(P.id);L+=P.html;}if(Q&&n[O]&&Q.checked!=n[O].checked)N=true;}L+='</span>';if(K.length){if(M){o.LJLike.node.setAttribute('buttons',K.join(','));o.LJLike.node.setAttribute('lj-content',encodeURIComponent(L));o.LJLike.node.removeAttribute('defaults');}else{M=new h('iframe',t.document);M.setAttribute('lj-class','lj-like');M.setAttribute('class','lj-like-wrap');M.setAttribute('buttons',K.join(','));M.setAttribute('lj-content',encodeURIComponent(L));M.setAttribute('lj-cmd','LJLike');M.setAttribute('frameBorder',0);M.setAttribute('allowTransparency','true');M.setAttribute('defaults',!N);t.insertElement(M);}}else if(M)o.LJLike.node.remove();F.hide();}}),a.dialog.cancelButton];b.mac&&J.reverse();return{title:m.LJLike_name,width:145,height:Site.remote_is_sup?180:145,resizable:false,contents:[{id:'LJLike_Options',elements:[{type:'html',html:D}]}],onShow:function(){var K=t.getCommand('LJLike'),L=E=0,M=K.state==1,N=o.LJLike.node&&o.LJLike.node.getAttribute('buttons');a.note&&a.note.hide(true);for(;L<C;L++){var O=N?!!(N.indexOf(n[L].abbr)+1||N.indexOf(n[L].id)+1):n[L].checked,P=document.getElementById('like-'+n[L].abbr);if(P){if(O&&!M)E++;P.checked=O;}}if(E>0)F.getButton('LJLike_Ok').getElement().removeClass('btn-disabled');},onLoad:function(){F=this;G=F.parts.contents.getElementsByTag('input');for(var K=0;K<C;K++){var L=G.getItem(K);L&&L.on('click',B);}},buttons:J};});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=w.attributes.buttons?true:false,B=z.length;for(var C=0;C<B;C++){var D=z[C].replace(/^\s*([a-z]{2,})\s*$/i,'$1'),E=n[D];if(E&&(A||E.checked)){y.attributes['lj-content']+=encodeURIComponent(E.html);x.push(D);}}if(!w.attributes.buttons)y.attributes.defaults=true;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(w.attributes.src.indexOf('kroogi.com')!==-1&&w.attributes.style){var C=w.attributes.style.match(/width:\s([0-9]+)px;/i),D=w.attributes.style.match(/height:\s([0-9]+)px;/i);if(D.length===2&&C.length===2){A=Number(C.pop());B=Number(D.pop());}}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');if(w.attributes.defaults!='true')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']});})();(function(){'use strict';a.editor.prototype.lightSetData=function(t){this.document.getBody().setHtml(this.dataProcessor.toHtml(t));this.fire('contentDom');};a.editor.prototype.insertCaret=function(){var w=this;w.focus();var t=w.getSelection(),u=t&&t.getRanges()[0];if(!u||!u.collapsed)return false;var v=new h('span');v.setAttribute('id','__rte_focus');v.setText('|');u.insertNode(v);w.dataWithFocus=w.getData();v.remove();};a.editor.prototype.moveFocus=function(t){var u=this;this.focus();setTimeout(function(){var v=u.getSelection(),w=v&&v.getRanges(),x=w&&w[0].startContainer,y=x&&x.getParents(true);if(!x)return;if(t==='end'){x=y[y.length-2].getFirst();if(!x)return;for(;;){var z=x.getNext();if(z==null)break;x=z;}v.selectElement(x);w=v.getRanges();w[0].collapse(false);v.selectRanges(w);}if(t==='start'){var A=new d.range(u.document);
-A.selectNodeContents(u.document.getBody());A.collapse(true);v.selectRanges([A]);}},100);};a.editor.prototype.isFocusAt=function(t){var u=this.getSelection(),v=u.getRanges()[0],w=this.document.getBody();if(t==='end'&&v.checkEndOfBlock())if(w.equals(v.endContainer)||w.getLast().equals(v.endContainer))return true;if(t==='start')throw new Error('Not implemented');return false;};a.editor.prototype.isSelectionCollapsed=function(){var t=this.getSelection(),u=t&&t.getRanges()[0];if(u)return!!u.collapsed;return false;};var m=a.lang[a.lang.detect()]||{};jQuery.extend(m,LJ.pageVar('rtedata'));window.CKLang=a.CKLang=m;if(Site.page.ljpost)a.styleText=Site.statprefix+'/js/ck/contents_new.css?t='+Site.version;else a.styleText=Site.statprefix+'/js/ck/contents.css?t='+Site.version;var n='@focus@',o='<input type="hidden" id="__focus"/>';function p(t,u,v){v=v||{};v&&jQuery.extend(v,{fromDoubleClick:this.execFromEditor});LiveJournal.run_hook('rteButton',u,jQuery('.cke_button_'+t),v);this.execFromEditor=false;};var q=[{label:m.LJLike_button_repost,id:'repost',abbr:'rp',checked:true,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',checked:true,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',checked:true,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',checked:true,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',checked:Site.remote_is_sup?true:false,html:'<span class="lj-like-item vk">'+m.LJLike_button_vkontakte+'</span>',htmlOpt:Site.remote_is_sup?'<li class="like-vk"><input type="checkbox" id="like-vk" /><label for="like-vk">'+m.LJLike_button_vkontakte+'</label></li>':''},{label:m.LJLike_button_surfingbird,id:'surfingbird',abbr:'sb',checked:Site.remote_is_sup?true:false,html:'<span class="lj-like-item sb">'+m.LJLike_button_surfingbird+'</span>',htmlOpt:Site.remote_is_sup?'<li class="like-sb"><input type="checkbox" id="like-sb" /><label for="like-sb">'+m.LJLike_button_surfingbird+'</label></li>':''},{label:m.LJLike_button_tumblr,id:'tumblr',abbr:'tb',checked:true,html:'<span class="lj-like-item tb">'+m.LJLike_button_tumblr+'</span>',htmlOpt:'<li class="like-tb"><input type="checkbox" id="like-tb" /><label for="like-tb">'+m.LJLike_button_tumblr+'</label></li>'},{label:m.LJLike_button_give,id:'livejournal',abbr:'lj',checked:false,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>'}],r={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>')},LJLink2:{html:encodeURIComponent(m.LJLink_WizardNotice+'<br /><a href="#" lj-cmd="LJLink2">'+m.LJLink_WizardNoticeLink+'</a>')},LJImage:{html:encodeURIComponent(m.LJImage_WizardNotice+'<br /><a href="#" lj-cmd="LJImage">'+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>')},LJEmbedLink:{},LJMap:{}},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.$empty['lj-random']=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};['a','b','em','i','img','strong','u','lj-user'].forEach(function(t){s['lj-pq'][t]=1;s['lj-pi'][t]=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'];f.p.iframe=1;f['lj-cut'].iframe=1;f['lj-spoiler'].iframe=1;j.add('livejournal',{init:function(t){t.rteButton=p;function u(A){var B=A.data.element||A.data.getTarget();if(B.type!=1)B=B.getParent();while(B){var C=B.getAttribute('lj-cmd');if(r.hasOwnProperty(C)){var D=t.getCommand(C);if(D.state==1){var E=new d.selection(t.document);r[C].node=B.is('body')?new h.get(B.getWindow().$.frameElement):B;E.selectElement(r[C].node);A.data.dialog='';t.execFromEditor=true;t.execCommand(C,true);break;}}B=B.getParent();}};function v(A){var B=this;if(B.$!=t.document.$){B.$.className=(B.frame.getAttribute('lj-class')||'')+' lj-selected';if(B.getAttribute('lj-cmd')=='LJPollLink')B.frame.setStyle('height',B.getDocument().$.body.scrollHeight+'px');t.focus();new d.selection(t.document).selectElement(B.frame);}A.data.getKey()==1&&A.data.preventDefault();};function w(A){if(A.data.getKey()==46){var B=new d.selection(t.document).getRanges(),C=B.length;while(C--)B[C].deleteContents();}};function x(){var D=this;var A=D.$.contentWindow,B=A.document,C=new h.get(B.body);if(C.on&&!Site.page.disabled_input){C.on('dblclick',u);C.on('click',v);C.on('keyup',w);if(D.getAttribute('lj-cmd')=='LJPollLink'&&D.hasAttribute('style'))B.body.className='lj-poll lj-poll-open';}B=new h.get(B);B.frame=C.frame=D;};function y(){var A=t.document.getElementsByTag('iframe'),B=A.count(),C,D,E,F,G;t.execFromEditor=false;while(B--){C=A.getItem(B),D=C.getAttribute('lj-cmd'),E=C.$.contentWindow,F=E.document,G=C.getAttribute('lj-style')||'';if(C.getAttribute('data-update')==='false')continue;if(F&&F.body&&F.body.getAttribute('data-loaded'))continue;C.removeListener('load',x);C.on('load',x);F.open();F.write('<!DOCTYPE html><html style="'+G+'">'+'<head><link rel="stylesheet" href="'+a.styleText+'" /></head>'+'<body data-loaded="true" scroll="no" class="'+(C.getAttribute('lj-class')||'')+'" style="'+G+'" '+(D?'lj-cmd="'+D+'"':'')+'>'+decodeURIComponent(C.getAttribute('lj-content')||'')+'</body>'+'</html>');
-F.close();}};t.updateFrames=y;t.on('dataReady',function(){setTimeout(y,100);});function z(A){t.fire('updateSnapshot');if(t.onSwitch===true){delete t.onSwitch;return;}var B,C=A.name=='click',D=A.name=='selectionChange'||C,E=A.data.element||A.data.getTarget(),F,G;if(C&&(A.data.getKey()===1||A.data.$.button===0))A.data.preventDefault();if(E.type!=1)E=E.getParent();F=E;if(D){var H=t.document.getElementsByTag('iframe'),I,J;if(C&&F.is('iframe')){J=F.$.contentWindow.document.body;J.className=(F.getAttribute('lj-class')||'')+' lj-selected';if(F.getAttribute('lj-cmd')=='LJPollLink')F.setStyle('height',J.scrollHeight+'px');}for(var K=0,L=H.count();K<L;K++){I=H.getItem(K);if(I.$!=F.$){J=I.$.contentWindow.document.body;J.className=I.getAttribute('lj-class')||'';if(I.getAttribute('lj-cmd')=='LJPollLink'&&J.className.indexOf('lj-poll')!=-1)I.removeAttribute('style');}}}do{var M=F.getAttribute('lj-cmd');if(!M&&F.type==1){var N=F.getParent();if(F.is('img')&&!F.hasAttribute('data-user')&&N.getParent()&&!N.getParent().hasAttribute('data-user')){M='LJImage';F.setAttribute('lj-cmd',M);}else if(F.is('a')&&!F.hasAttribute('data-user')&&!N.hasAttribute('lj:user')){M='LJLink2';F.setAttribute('lj-cmd',M);}}if(M&&r.hasOwnProperty(M)){if(D){r[M].node=F;t.getCommand(M).setState(1);}(B||(B={}))[M]={content:r[M].html,node:F};}}while(F=F.getParent());var O;if(D)for(G in r){if(r.hasOwnProperty(G)&&(!B||!B.hasOwnProperty(G))){delete r[G].node;O=t.getCommand(G);if(O)O.setState(2);}}t.fire('updateSnapshot');};(function(){function A(I){return I.slice(-2)=='/>'?I:I.slice(0,-1)+'/>';};function B(I){var J=new Poll(I),K="<div class='lj-poll-inner lj-rtebox-inner'>"+J.outputHTML()+'</div>';return '<iframe class="lj-poll-wrap lj-rtebox" lj-class="lj-poll" frameborder="0" lj-cmd="LJPollLink" allowTransparency="true" lj-data="'+J.outputLJtags()+'" lj-content="'+K+'"></iframe>';};function C(I,J){var K="<div class='lj-poll-inner lj-rtebox-inner'>Poll id: "+J+'</div>';return '<iframe class="lj-poll-wrap lj-poll-wrap-done lj-rtebox" lj-class="lj-poll" frameborder="0" lj-cmd="LJPollLink" allowTransparency="true" lj-data="'+escape(I)+'" lj-content="'+K+'" data-disabledPoll="true"></iframe>';};function D(I,J,K){var L="<div class='lj-embed-inner lj-rtebox-inner'>Embed video</div>";return '<iframe class="lj-embed-wrap lj-rtebox" lj-class="lj-embed" frameborder="0" lj-cmd="LJEmbedLink" allowTransparency="true" lj-data="'+encodeURIComponent(K)+'"'+J+'lj-content="'+L+'"></iframe>';};function E(I,J,K,L){return J+K.replace(/\n/g,'')+L;
-};function F(I,J,K,L){var M=J||K||m.LJRepost_Value,N=L.replace(/"/g,'&quot;');L=N+('<br /><input type="button" value="'+M+'" />').replace(/"/g,'&quot;');return '<iframe class="lj-repost-wrap" lj-class="lj-repost" frameborder="0" allowTransparency="true" lj-text="'+N+'" lj-button="'+M+'" lj-content="'+L+'"></iframe>';};function G(I,J){return I.replace(/<(.|\n)*?>/g,function(K){var L=K;if(L.indexOf(J)!==-1){L=L.replace(J,'');return L+J;}else return K;});};function H(I,J,K){return[I.slice(0,J),K,I.slice(J)].join('');};t.on('contentDom',function(I){var J=I.editor.document.getById('__focus');if(J){this._domBuilt=true;setTimeout(function(){I.editor.focus();var K=I.editor.getSelection();if(K){var L=new d.range(I.editor.document);L.setEndAfter(J);K.selectRanges([L]);}J.remove();t.fire('updateSnapshot');},this._domBuilt?0:100);}});t.dataProcessor.toHtml=function(I,J){var K=Site.page.__htmlLast;if(typeof K==='number'){if(I.length>0)I=G(H(I,K,n),n).replace(n,o);else I=o;delete Site.page.__htmlLast;}I=I.replace(/<lj [^>]*?>/gi,A).replace(/<lj-map [^>]*?>/gi,A).replace(/<lj-template[^>]*?>/gi,A).replace(/(<lj-cut[^>]*?)\/>/gi,'$1>').replace(/<((?!br)[^\s>]+)([^>]*?)\/>/gi,'<$1$2></$1>').replace(/<lj-poll.*?>[\s\S]*?<\/lj-poll>/gi,B).replace(/<lj-poll-([0-9]+)>/gi,C).replace(/<lj-repost\s*(?:button\s*=\s*(?:"([^"]*?)")|(?:"([^']*?)"))?.*?>([\s\S]*?)<\/lj-repost>/gi,F).replace(/<lj-embed(.*?)>([\s\S]*?)<\/lj-embed>/gi,D).replace(/(<lj-raw.*?>)([\s\S]*?)(<\/lj-raw>)/gi,E).replace(/\n/g,'<br/>');I=I.replace(/>\s+<tr/ig,'><tr').replace(/>\s+<\/tr/ig,'></tr').replace(/>\s+<td/ig,'><td').replace(/>\s+<\/td/ig,'></td').replace(/<\/tr>\s+<\/table>/ig,'</tr></table>').replace(/<tr>\n/ig,'<tr>').replace(/\n<\/tr>/ig,'</tr>').replace(/<td>\n/ig,'<td>').replace(/\n<\/td>/ig,'</td>');I=a.htmlDataProcessor.prototype.toHtml.call(this,I,J);if(c)I='<xml:namespace ns="livejournal" prefix="lj" />'+I;return I;};})();t.dataProcessor.toDataFormat=function(A,B){A=a.htmlDataProcessor.prototype.toDataFormat.call(this,A,B);A=A.replace(/<br\s*\/>/gi,'\n');return A.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);(function(){var A=/<br\s*\/?>$/i;t.on('paste',function(B){B.data.html=B.data.html.replace(A,'');});})();t.on('dataReady',function(){if(c){t.document.getBody().on('dragend',y);t.document.getBody().on('paste',function(){setTimeout(y,0);});}if(!Site.page.disabled_input){t.document.on('click',z);
-t.document.on('mouseover',z);t.document.getBody().on('keyup',w);y();}});(function(){var A='LJImage',B=null;LiveJournal.register_hook('editpic_response',function(C){var D=B,E=D&&D.getParent();if(!D)return;if(C.url){D.setAttribute('src',C.url);D.setAttribute('data-cke-saved-src',C.url);}else{if(E&&E.getName()==='a')E.remove();else D.remove();return;}if(C.width)D.setAttribute('width',C.width);else D.removeAttribute('width');if(C.height)D.setAttribute('height',C.height);else D.removeAttribute('height');if(C.title)D.setAttribute('title',C.title);else D.removeAttribute('title');if(C.border)D.setStyle('border-width',C.border+'px');else{D.removeStyle('border-width');D.removeStyle('border-style');}if(C.vspace)D.setStyles({'margin-top':C.vspace+'px','margin-bottom':C.vspace+'px'});else{D.removeStyle('margin-top');D.removeStyle('margin-bottom');}if(C.hspace)D.setStyles({'margin-left':C.hspace+'px','margin-right':C.hspace+'px'});else{D.removeStyle('margin-left');D.removeStyle('margin-right');}var E=D&&D.getParent();if(C.link){C.link=C.link.replace(/^[\s\t]*(?:http:\/\/)?/,'http://');if(E&&E.getName()==='a'){E.setAttribute('href',C.link);E.setAttribute('data-cke-saved-href',C.link);if(C.blank)E.setAttribute('target','_blank');else E.removeAttribute('target');}else{var F=new h('a',t.document);F.setAttribute('href',C.link);if(C.blank)F.setAttribute('target','_blank');D.insertBeforeMe(F);F.append(D);t.getSelection()&&t.getSelection().selectElement(F);}}else if(E.getName()==='a'){E.insertBeforeMe(D);E.remove();}if(C.aligment&&C.aligment!=='none')D.setStyle('float',C.aligment);else D.removeStyle('float');B=null;});t.addCommand(A,{exec:function(C,D){var E=C.getSelection();E=E?E.getSelectedElement():null;B=E;if(E&&E.is('img')){var F=E&&E.getParent(),G=F.getName()==='a',H=G&&F,I=G&&F.getAttribute('href'),J={};if('naturalWidth' in E.$){J.width=E.$.naturalWidth;J.height=E.$.naturalHeight;}else{var K=new Image();K.src=E.$.src;J={width:K.width,height:K.height};}C.rteButton(A,'editpic',{picData:{url:E.getAttribute('src'),title:E.getAttribute('title'),width:E.getAttribute('width')||E.$.width,height:E.getAttribute('height')||E.$.height,defaultWidth:J.width,defaultHeight:J.height,link:I||'',blank:G?!!H.getAttribute('target'):true,border:parseInt(E.getStyle('border-width'),10),vspace:parseInt(E.getStyle('margin-top'),10),hspace:parseInt(E.getStyle('margin-left'),10),aligment:E.getStyle('float')||'none'}});}else jQuery('.b-updatepage-event-section').editor('handleImageUpload','upload');},editorFocus:false});
-t.ui.addButton(A,{label:m.LJImage_Title,command:A});})();(function(){var A=null;t.on('selectionChange',function(E){var F=E.data.element;if(F.is('iframe'))A=F;else A=null;});var B='LJEmbedLink',C='video';function D(E){var F=new h('iframe',t.document);if(E!==LiveJournal.getEmbed(E)){var G=h.createFromHtml(LiveJournal.getEmbed(E)),H='',I=LiveJournal.parseMediaLink(E);if(I.preview)H='style="background-image: url('+I.preview+');"';F.setAttribute('lj-url',G.getAttribute('src'));F.setAttribute('data-link',E);F.setAttribute('lj-class','lj-iframe');F.setAttribute('class','lj-iframe-wrap lj-rtebox');F.setAttribute('style','width: 490px; height:370px;');F.setAttribute('lj-style','width: 480px; height:360px;');F.setAttribute('allowfullscreen','true');F.setAttribute('lj-content',encodeURIComponent('<div '+H+" class='lj-embed-inner lj-rtebox-inner'>"+(H?'':'iframe')+'</div>'));}else{F.setAttribute('lj-class','lj-embed');F.setAttribute('class','lj-embed-wrap lj-rtebox');F.setAttribute('lj-content',encodeURIComponent('<div '+H+" class='lj-embed-inner lj-rtebox-inner'>Embed</div>"));}F.setAttribute('lj-data',encodeURIComponent(LiveJournal.getEmbed(E)));F.setAttribute('frameBorder',0);F.setAttribute('allowTransparency','true');F.setAttribute('lj-cmd',B);t.insertElement(F);y();};LiveJournal.register_hook(C+'_response',function(E){D(E);});t.addCommand(B,{exec:function(E){var F=r[B].node||A;if(F)E.rteButton(B,C,{defaultText:F&&decodeURIComponent(F.getAttribute('data-link')||F.getAttribute('lj-url')||F.getAttribute('lj-data')),editMode:true});else E.rteButton(B,C);}});t.ui.addButton(B,{label:m.LJEmbed,command:B});})();(function(){var A='LJMap',B='map';LiveJournal.register_hook('map_response',function(C){var D=new h('iframe',t.document),E=425,F=350,G='',H='';if(!isNaN(E)){G+='width:'+E+'px;';H+='width:'+(E-2)+'px;';}if(!isNaN(F)){G+='height:'+F+'px;';H+='height:'+(F-2)+'px;';}var I=r[A].node;if(I)I.setAttributes({'lj-url':C});else{D.setAttributes({'lj-url':C,'class':'lj-map-wrap lj-rtebox','lj-content':'<div class="lj-map-inner lj-rtebox-inner"><p class="lj-map">map</p></div>','lj-cmd':'LJMap','lj-class':'lj-map',frameborder:0,allowTransparency:'true',style:G,'lj-style':H});t.insertElement(D);}y();});t.addCommand(A,{exec:function(){var C=r[A].node;t.rteButton(A,B,{defaultText:C?C.getAttribute('lj-url'):'',editMode:C?true:false});},editorFocus:false});t.ui.addButton(A,{label:m.LJMap_Title,command:A});})();(function(){function A(H,I){I=I===undefined||I;var J,K=r.LJLike.node;if(K){var L=H.getAttribute('lj-style');
-J=L?L.replace(/text-align:\s*(left|right|center)/i,'$1'):'left';}else if(I)J=H.getComputedStyle('text-align');else{while(!H.hasAttribute||!(H.hasAttribute('align')||H.getStyle('text-align'))){var M=H.getParent();if(!M)break;H=M;}J=H.getStyle('text-align')||H.getAttribute('align')||'';}J&&(J=J.replace(/-moz-|-webkit-|start|auto/i,''));!J&&I&&(J=H.getComputedStyle('direction')=='rtl'?'right':'left');return J;};function B(H){if(H.editor.readOnly)return;var I=H.editor.getCommand(this.name),J=H.data.element;if((J.type==1&&J.hasAttribute('lj-cmd')&&J.getAttribute('lj-cmd'))=='LJLike')I.state=A(J,t.config.useComputedState)==this.value?1:2;else if(!J||J.type!=1||J.getName()=='body'||J.getName()=='iframe')I.state=2;else I.state=A(J,t.config.useComputedState)==this.value?1:2;I.fire('state');};function C(H,I,J){var L=this;L.name=I;L.value=J;var K=H.config.justifyClasses;if(K){switch(J){case 'left':L.cssClassName=K[0];break;case 'center':L.cssClassName=K[1];break;case 'right':L.cssClassName=K[2];break;}L.cssClassRegex=new RegExp('(?:^|\\s+)(?:'+K.join('|')+')(?=$|\\s)');}};function D(H){var I=H.editor,J=new d.range(I.document);J.setStartBefore(H.data.node);J.setEndAfter(H.data.node);var K=new d.walker(J),L;while(L=K.next()){if(L.type==1){var M='text-align',N=I.config.justifyClasses;if(!L.equals(H.data.node)&&L.getDirection()){J.setStartAfter(L);K=new d.walker(J);continue;}if(N)if(L.hasClass(N[0])){L.removeClass(N[0]);L.addClass(N[2]);}else if(L.hasClass(N[2])){L.removeClass(N[2]);L.addClass(N[0]);}switch(L.getStyle(M)){case 'left':L.setStyle(M,'right');break;case 'right':L.setStyle(M,'left');break;}}}};C.prototype={exec:function(H){var V=this;var I=H.getSelection(),J=H.config.enterMode;if(!I)return;var K=I.createBookmarks();if(r.LJLike.node)r.LJLike.node.setAttribute('lj-style','text-align: '+V.value);else{var L=I.getRanges(true),M=V.cssClassName,N,O,P=H.config.useComputedState;P=P===undefined||P;for(var Q=L.length-1;Q>=0;Q--){var R=L[Q],S=R.getEnclosedNode();if(S&&S.type===1&&S.is('iframe'))return;N=R.createIterator();N.enlargeBr=J!=2;while(O=N.getNextParagraph(J==1?'p':'div')){O.removeAttribute('align');O.removeStyle('text-align');var T=M&&(O.$.className=e.ltrim(O.$.className.replace(V.cssClassRegex,''))),U=V.state==2&&(!P||A(O,true)!=V.value);if(M){if(U)O.addClass(M);else if(!T)O.removeAttribute('class');}else if(U)O.setStyle('text-align',V.value);}}}H.focus();H.forceNextSelectionCheck();I.selectBookmarks(K);}};var E=new C(t,'LJJustifyLeft','left'),F=new C(t,'LJJustifyCenter','center'),G=new C(t,'LJJustifyRight','right');
-t.addCommand('LJJustifyLeft',E);t.addCommand('LJJustifyCenter',F);t.addCommand('LJJustifyRight',G);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(B,E));t.on('selectionChange',e.bind(B,G));t.on('selectionChange',e.bind(B,F));t.on('dirChanged',D);})();(function(){var A='LJPollLink';if(!LJ.pageVar('remoteUser',true))return;LiveJournal.register_hook('poll_response',function(B){var C=new Poll(B),D="<div class='lj-poll-inner lj-rtebox-inner'>"+C.outputHTML()+'</div>',E=C.outputLJtags(),F=r[A].node;if(F){F.setAttribute('lj-content',D);F.setAttribute('lj-data',E);F.removeAttribute('style');}else{F=new h('iframe',t.document);F.setAttribute('lj-content',D);F.setAttribute('lj-cmd','LJPollLink');F.setAttribute('lj-data',E);F.setAttribute('lj-class','lj-poll lj-rtebox');F.setAttribute('class','lj-poll-wrap');F.setAttribute('frameBorder',0);F.setAttribute('allowTransparency','true');t.insertElement(F);}y();});t.addCommand(A,{exec:function(B){var C=r.LJPollLink.node;if(C)B.rteButton(A,'poll',{ljData:decodeURIComponent(C.getAttribute('lj-data')),editMode:true,disabled:C&&(C.getAttribute('data-disabledPoll')?true:false)});else B.rteButton(A,'poll');},editorFocus:false});t.ui.addButton(A,{label:m.LJPoll_Title,command:A});})();(function(){var A='LJLike',B='like',C;q.defaultButtons=[];for(var D=0;D<q.length;D++){C=q[D];q[C.id]=q[C.abbr]=C;q.defaultButtons.push(C.id);}LiveJournal.register_hook('like_response',function(E){var F=[],G=[],H=typeof E==='string';for(var I=0,J;I<q.length;I++){J=q[I];if(H&&J.checked||E.indexOf(J.id)!=-1){F.push(J.id);G.push(J.html);}}var K=r[A].node,L=encodeURIComponent('<div class="lj-rtebox-inner lj-like-inner"><span class="lj-like-wrapper">'+G.join('')+'</span></div>');if(K){K.setAttribute('buttons',F.join(','));K.setAttribute('lj-content',L);K.removeAttribute('defaults');}else{K=new h('iframe',t.document);K.setAttribute('lj-class','lj-like');K.setAttribute('class','lj-like-wrap lj-rtebox');K.setAttribute('buttons',F.join(','));K.setAttribute('lj-content',L);K.setAttribute('lj-cmd','LJLike');K.setAttribute('frameBorder',0);K.setAttribute('allowTransparency','true');K.setAttribute('defaults',H);t.insertElement(K);}y();});t.addCommand(A,{exec:function(E){var F=r[A].node;if(F)E.rteButton(A,B,{buttons:F.getAttribute('buttons'),editMode:true});
-else E.rteButton(A,B);},editorFocus:false});t.ui.addButton(A,{label:m.LJLike_Title,command:A});})();},afterInit:function(t){var u=t.dataProcessor;u.dataFilter.addRules({elements:{'lj-like':function(v){var w=[],x=new a.htmlParser.element('iframe');x.attributes['lj-class']='lj-like';x.attributes['class']='lj-like-wrap lj-rtebox';if(v.attributes.hasOwnProperty('style'))x.attributes['lj-style']=v.attributes.style;x.attributes['lj-cmd']='LJLike';x.attributes['lj-content']='<div class="lj-rtebox-inner lj-like-inner"><span class="lj-like-wrapper">';x.attributes.frameBorder=0;x.attributes.allowTransparency='true';var y=v.attributes.buttons&&v.attributes.buttons.split(',')||q.defaultButtons,z=v.attributes.buttons?true:false,A=y.length;for(var B=0;B<A;B++){var C=y[B].replace(/^\s*([a-z]{2,})\s*$/i,'$1'),D=q[C];if(D&&(z||D.checked)){x.attributes['lj-content']+=encodeURIComponent(D.html);w.push(C);}}if(!v.attributes.buttons)x.attributes.defaults=true;x.attributes['lj-content']+='</span></div>';x.attributes.buttons=w.join(',');return x;},'lj-map':function(v){var w=new a.htmlParser.element('iframe'),x='',y='',z=Number(v.attributes.width),A=Number(v.attributes.height);if(!isNaN(z)){x+='width:'+z+'px;';y+='width:'+(z-2)+'px;';}if(!isNaN(A)){x+='height:'+A+'px;';y+='height:'+(A-2)+'px;';}if(x.length){w.attributes.style=x;w.attributes['lj-style']=y;}w.attributes['lj-url']=v.attributes.url?encodeURIComponent(v.attributes.url):'';w.attributes['lj-class']='lj-map';w.attributes['class']='lj-map-wrap lj-rtebox';w.attributes['lj-content']='<div class="lj-map-inner lj-rtebox-inner"><p class="lj-map">map</p></div>';w.attributes.frameBorder=0;w.attributes.allowTransparency='true';return w;},'lj-raw':function(v){v.name='lj:raw';},'lj-wishlist':function(v){v.name='lj:wishlist';},'lj-template':function(v){var w=new a.htmlParser.element('iframe');w.attributes['lj-class']='lj-template';w.attributes['class']='lj-template-wrap';w.attributes.frameBorder=0;w.attributes.allowTransparency='true';w.attributes['lj-attributes']=encodeURIComponent(LiveJournal.JSON.stringify(v.attributes));return w;},iframe:function(v){if(v.attributes['data-update']==='false')return v;var w='';if(v.attributes['data-link']){var x=LiveJournal.parseMediaLink(v.attributes['data-link']);if(x.preview)w='style="background-image: url('+x.preview+');"';}var y=v.attributes.src;if(v.attributes['lj-class']&&v.attributes['lj-class'].indexOf('lj-')+1==1)return v;var z=new a.htmlParser.element('iframe'),A='',B='',C=Number(v.attributes.width),D=Number(v.attributes.height);
-if(v.attributes.src.indexOf('kroogi.com')!==-1&&v.attributes.style){var E=v.attributes.style.match(/width:\s([0-9]+)px;/i),F=v.attributes.style.match(/height:\s([0-9]+)px;/i);if(F.length===2&&E.length===2){C=Number(E.pop());D=Number(F.pop());}}if(!isNaN(C)){A+='width:'+C+'px;';B+='width:'+(C-10)+'px;';}if(!isNaN(D)){A+='height:'+D+'px;';B+='height:'+(D-10)+'px;';}if(A.length){z.attributes.style=A;z.attributes['lj-style']=B;}z.attributes['lj-url']=v.attributes.src?encodeURIComponent(v.attributes.src):'';z.attributes['lj-class']='lj-iframe';z.attributes['class']='lj-iframe-wrap lj-rtebox';z.attributes['lj-content']='<div '+w+' class="lj-rtebox-inner">'+(w?'':'iframe')+'</div>';z.attributes.frameBorder=0;z.attributes.allowTransparency='true';if(y!=LiveJournal.getEmbed(decodeURIComponent(v.attributes.src))){z.attributes['lj-cmd']='LJEmbedLink';z.attributes['data-link']=v.attributes['data-link'];}return z;},a:function(v){if(v.attributes['data-user'])return;if(v.parent&&v.parent.attributes&&!v.parent.attributes['lj:user'])v.attributes['lj-cmd']='LJLink2';},img:function(v){if(v.attributes['data-user'])return;var w=v.parent&&v.parent.parent;if(!w||!v.attributes['data-user']||!w.attributes||!w.attributes['data-user'])v.attributes['lj-cmd']='LJImage';}}},5);u.htmlFilter.addRules({elements:{input:function(v){if(v.attributes&&v.attributes.id==='__focus')return false;return v;}}});u.htmlFilter.addRules({elements:{iframe:function(v){var w=v,x=false,y='text',z=/lj-[a-z]+/i.exec(v.attributes['lj-class']);if(z)z=z[0];else return v;switch(z){case 'lj-like':w=new a.htmlParser.element('lj-like');if(v.attributes.defaults!='true')w.attributes.buttons=v.attributes.buttons;if(v.attributes.hasOwnProperty('lj-style'))w.attributes.style=v.attributes['lj-style'];w.isEmpty=true;w.isOptionalClose=true;break;case 'lj-embed':var A=decodeURIComponent(v.attributes['lj-data']);w=new a.htmlParser.element('lj-embed');w.attributes.id=v.attributes.id;if(v.attributes.id)w.isEmpty=true;if(v.attributes.hasOwnProperty('source_user'))w.attributes.source_user=v.attributes.source_user;w.children=new a.htmlParser.fragment.fromHtml(decodeURIComponent(v.attributes['lj-data'])).children;w.isOptionalClose=true;break;case 'lj-map':w=new a.htmlParser.element('lj-map');w.attributes.url=decodeURIComponent(v.attributes['lj-url']);v.attributes.style&&(v.attributes.style+';').replace(/([a-z-]+):(.*?);/gi,function(F,G,H){w.attributes[G.toLowerCase()]=parseInt(H);});w.isOptionalClose=w.isEmpty=true;break;case 'lj-iframe':w=new a.htmlParser.element('iframe');
-w.attributes.src=decodeURIComponent(v.attributes['lj-url']);v.attributes.style&&(v.attributes.style+';').replace(/([a-z-]+):(.*?);/gi,function(F,G,H){w.attributes[G.toLowerCase()]=parseInt(H);});w.attributes.frameBorder=0;if(v.attributes['data-link'])w.attributes['data-link']=v.attributes['data-link'];break;case 'lj-poll':var A=decodeURIComponent(v.attributes['lj-data']);w=new a.htmlParser.fragment.fromHtml(A).children[0];break;case 'lj-repost':w=new a.htmlParser.element('lj-repost');w.attributes.button=v.attributes['lj-button'];w.children=new a.htmlParser.fragment.fromHtml(v.attributes['lj-text']).children;break;case 'lj-template':w=new a.htmlParser.element('lj-template');w.attributes=LiveJournal.JSON.parse(encodeURIComponent(v.attributes['lj-attributes']));w.isOptionalClose=w.isEmpty=true;break;case 'lj-spoiler':x=true;y='title';case 'lj-cut':if(v.attributes['lj-class'].indexOf(z+'-open')+1){var B=v.next,C=0;w=new a.htmlParser.element(z);if(v.attributes.hasOwnProperty('text'))w.attributes[y]=v.attributes.text;while(B){if(B.name=='iframe'){var D=B.attributes['lj-class'];if(D&&D.indexOf(z+'-close')+1){if(x&&C)C--;else{w.next=B;break;}}else if(D&&D.indexOf(z+'-open')+1)if(x)C++;else{w.next=B;break;}}B.parent.children.remove(B);w.add(B);var E=B.next;B.next=null;B=E;}}else w=false;break;default:if(!v.children.length)w=false;}return w;},div:function(v){if(!v.children.length)return false;},'lj:raw':function(v){v.name='lj-raw';},'lj:wishlist':function(v){v.name='lj-wishlist';}},attributes:{'lj-cmd':function(){return false;},contenteditable:function(){return false;}}});},requires:['fakeobjects','domiterator']});})();(function(m,n){var o;function p(v){return v.type==3&&v.getLength()>0&&(!o||!v.isReadOnly());};function q(v){return!(v.type==1&&v.isBlockBoundary(e.extend({},f.$empty,f.$nonEditable)));};var r=function(){var v=this;return{textNode:v.textNode,offset:v.offset,character:v.textNode?v.textNode.getText().charAt(v.offset):null,hitMatchBoundary:v._.matchBoundary};},s,t=function(v,w){s=new a.style(e.extend({attributes:{'data-cke-highlight':1,'data-incorrect':1,'data-id':0},fullMatch:1,ignoreReadonly:1,childRule:function(){return 1;}},{element:'span',styles:{'border-bottom':'1px solid red',cursor:'pointer'}},true));var x=function(J,K){var L=this,M=new d.walker(J);M.guard=K?q:function(N){!q(N)&&(L._.matchBoundary=true);};M.evaluator=p;M.breakOnFalse=1;if(J.startContainer.type==3){this.textNode=J.startContainer;this.offset=J.startOffset-1;}this._={matchWord:K,walker:M,matchBoundary:false};
-};x.prototype={next:function(){return this.move();},back:function(){return this.move(true);},move:function(J){var L=this;var K=L.textNode;if(K===null)return r.call(L);L._.matchBoundary=false;if(K&&J&&L.offset>0){L.offset--;return r.call(L);}else if(K&&L.offset<K.getLength()-1){L.offset++;return r.call(L);}else{K=null;while(!K){K=L._.walker[J?'previous':'next'].call(L._.walker);if(L._.matchWord&&!K||L._.walker._.end)break;}L.textNode=K;if(K)L.offset=J?K.getLength()-1:0;else L.offset=0;}return r.call(L);}};var y=function(J,K){this._={walker:J,cursors:[],rangeLength:K,highlightRange:null,isMatched:0};};y.prototype={toDomRange:function(){var J=new d.range(v.document),K=this._.cursors;if(K.length<1){var L=this._.walker.textNode;if(L)J.setStartAfter(L);else return null;}else{var M=K[0],N=K[K.length-1];J.setStart(M.textNode,M.offset);J.setEnd(N.textNode,N.offset+1);}return J;},updateFromDomRange:function(J){var M=this;var K,L=new x(J);M._.cursors=[];do{K=L.next();if(K.character)M._.cursors.push(K);}while(K.character);M._.rangeLength=M._.cursors.length;},setMatched:function(){this._.isMatched=true;},clearMatched:function(){this._.isMatched=false;},isMatched:function(){return this._.isMatched;},highlight:function(){var M=this;if(M._.cursors.length<1)return;if(M._.highlightRange)M.removeHighlight();var J=M.toDomRange(),K=J.createBookmark();s.applyToRange(J);J.moveToBookmark(K);M._.highlightRange=J;var L=J.startContainer;if(L.type!=1)L=L.getParent();M.updateFromDomRange(J);},highlightx:function(){var L=this;if(L._.cursors.length<1)return;if(L._.highlightRange)L.removeHighlight();var J=L.toDomRange(),K=J.createBookmark();J.moveToBookmark(K);L.updateFromDomRange(J);},removeHighlight:function(J){var L=this;if(!L._.highlightRange)return;var K=L._.highlightRange.createBookmark();s.removeFromRange(J||L._.highlightRange);L._.highlightRange.moveToBookmark(K);L.updateFromDomRange(L._.highlightRange);L._.highlightRange=null;},isReadOnly:function(){if(!this._.highlightRange)return 0;return this._.highlightRange.startContainer.isReadOnly();},moveBack:function(){var L=this;var J=L._.walker.back(),K=L._.cursors;if(J.hitMatchBoundary)L._.cursors=K=[];K.unshift(J);if(K.length>L._.rangeLength)K.pop();return J;},moveNext:function(){var L=this;var J=L._.walker.next(),K=L._.cursors;if(J.hitMatchBoundary)L._.cursors=K=[];K.push(J);if(K.length>L._.rangeLength)K.shift();return J;},getEndCharacter:function(){var J=this._.cursors;if(J.length<1)return null;return J[J.length-1].character;},getNextCharacterRange:function(J){var K,L,M=this._.cursors;
-if((K=M[M.length-1])&&K.textNode)L=new x(z(K));else L=this._.walker;return new y(L,J);},getCursors:function(){return this._.cursors;}};function z(J,K){var L=new d.range();L.setStart(J.textNode,K?J.offset:J.offset+1);L.setEndAt(v.document.getBody(),2);return L;};function A(J){var K=new d.range();K.setStartAt(v.document.getBody(),1);K.setEnd(J.textNode,J.offset);return K;};var B=0,C=1,D=2,E=function(J,K){var L=[-1];if(K)J=J.toLowerCase();for(var M=0;M<J.length;M++){L.push(L[M]+1);while(L[M+1]>0&&J.charAt(M)!=J.charAt(L[M+1]-1))L[M+1]=L[L[M+1]-1]+1;}this._={overlap:L,state:0,ignoreCase:!!K,pattern:J};};E.prototype={feedCharacter:function(J){var K=this;if(K._.ignoreCase)J=J.toLowerCase();for(;;){if(J==K._.pattern.charAt(K._.state)){K._.state++;if(K._.state==K._.pattern.length){K._.state=0;return D;}return C;}else if(!K._.state)return B;else K._.state=K._.overlap[K._.state];}return null;},reset:function(){this._.state=0;}};var F=/[.,"'?!;: \u0085\u00a0\u1680\u280e\u2028\u2029\u202f\u205f\u3000]/,G=function(J){if(!J)return true;var K=J.charCodeAt(0);return K>=9&&K<=13||K>=8192&&K<=8202||F.test(J);},H={searchRange:null,matchRange:null,find:function(J,K,L,M,N,O){var X=this;if(!X.matchRange)X.matchRange=new y(new x(X.searchRange),J.length);else X.matchRange=X.matchRange.getNextCharacterRange(J.length);var P=new E(J,!K),Q=B,R='%';while(R!==null){X.matchRange.moveNext();while(R=X.matchRange.getEndCharacter()){Q=P.feedCharacter(R);if(Q==D)break;if(X.matchRange.moveNext().hitMatchBoundary)P.reset();}if(Q==D){var S=X.matchRange.getCursors(),T=S[S.length-1],U=S[0],V=new x(A(U),true),W=new x(z(T),true);if(!(G(V.back().character)&&G(W.next().character)))continue;X.matchRange.setMatched();if(N!==false)X.matchRange.highlightx();return X.matchRange;}}if(M&&!O){X.searchRange=u(1);X.matchRange=null;return arguments.callee.apply(X,Array.prototype.slice.call(arguments).concat([true]));}return false;}},I=v.lang.findAndReplace;return H;};function u(v,w){var x,y=w.getSelection(),z=w.document.getBody();if(y&&!v){x=y.getRanges()[0].clone();x.collapse(true);}else{x=new d.range();x.setStartAt(z,1);}x.setEndAt(z,2);return x;};j.add('ljspell',{options:{classNames:{wordActive:'active',area:'b-spelling-textarea',skipError:'b-spelling-item-skip',bubbleContainer:'b-spelling-bubble',bubbleNoSuggestions:'b-spelling-item-no'},selectors:{bubbleItem:'.b-spelling-item',fake:'.b-spelling-faketextarea',error:'.b-spelling-error'},tmpl:{spellError:'<span class="b-spelling-word b-spelling-error" data-id="{id}"><span class="b-spelling-inner">{word}</span></span>',wrapper:'<div class="b-spelling"><div class="b-spelling-faketextarea"></div></div>',bubble:'<div class="b-spelling-bubble-container"></div>',bubbleList:'<ul class="b-spelling-items">{items}</ul>',bubbleItem:'<li class="b-spelling-item"><span class="b-spelling-item-word">{word}</span></li>',bubbleItemNoSuggestions:'<li class="b-spelling-item b-spelling-item-no"><span class="b-spelling-item-word">'+LJ.ml('widget.form.no_suggestions')+'</span></li>',bubbleItemSkip:'<li class="b-spelling-item b-spelling-item-skip"><span class="b-spelling-item-word">'+LJ.ml('widget.form.skip_word')+'</span></li>'},enabled:false},init:function(v){var w=this,x='LJSpell',y;
-y=(function(z){var A,B,C;return{save:function(){A=z.getSelection();B=A.getRanges()[0];C=B.createBookmark(true);z.focusManager.blur();z.focusManager.forceBlur();},restore:function(){A.unlock();B.moveToBookmark(C);z.getSelection().selectRanges([B]);}};})(v);v.on('contentDom',function(){var z=m(this.document.getBody().$),A=m('#cke_ck'),B=w.options,C=m(B.tmpl.bubble);C.bubble({showOn:'click',alwaysShowUnderTarget:true,classNames:{containerAddClass:B.classNames.bubbleContainer}});z.on('click','span[data-incorrect]',function(D){var E=m(this),F=E.data('word'),G=a.ljspell.getSuggestions(F).map(function(J){return B.tmpl.bubbleItem.supplant({word:J});}),H=null,I;if(G.length===0)G.push(B.tmpl.bubbleItemNoSuggestions);G.push(B.tmpl.bubbleItemSkip);Function.defer(function(){C.html(B.tmpl.bubbleList.supplant({items:G.join('')})).off('click').on('click',B.selectors.bubbleItem,function(){var J=m(this).text(),K=m(this).hasClass(B.classNames.skipError);C.bubble('hide');if(m(this).hasClass(B.classNames.bubbleNoSuggestions))return;if(K)J=F;H=z.find('span[data-id="'+E.data('id')+'"]');(function(){var L=h.get(H.first().get(0)),M=new d.range(v.document),N=v.getSelection(),O;N.selectElement(L);N.getRanges()[0].collapse();O=N.getRanges()[0].createBookmark(true);M.moveToBookmark(O);H.first().replaceWith(J);if(H.length)H.slice(1).detach();setTimeout(function(){if(!v.focusManager.hasFocus)v.focus();N.selectRanges([M]);if(K){LiveJournal.run_hook('skipWord',J);a.ljspell.removeHighlightFromWord(J);}},0);})();}).bubble('hide').bubble('show',A).bubble('absolute',D.clientX,D.clientY+A.offset().top+60);});D.preventDefault();});a.ljspell.init();});a.ljspell=(function(z,A){var B=false,C=0,D=false,E=t(z),F=LiveJournal.getAjaxUrl('spellcheck'),G={},H=[],I={},J=null,K=null,L=1000,M=null;function N(ab){var ac=z.document.getBody();return ab?m(ac.$):ac;};function O(ab){var ac=[];E.searchRange=u(1,z);E.matchRange=null;while((range=E.find(ab,false,false,false))!==false)ac.push(range);return ac;};function P(ab){D=ab;if(!J)J=m('.cke_button_'+x);J.toggleClass('active',D);};function Q(ab){var ac=[],ad=null;ab=ab.trim().toLowerCase();if(ab.trim().length===0)return[];ad=ab.replace(/\&nbsp;/ig,' ').match(/[a-zа-яё]+/gi);if(ad)return ad.reduce(function(ae,af){if(ae.indexOf(af)===-1)ae.push(af);return ae;},[]);else return[];};function R(){var ab=m('<div />',{html:z.getData()}).text(),ac=Q(ab);T(ac);return ac;};function S(ab){ab.forEach(function(ac){G[ac]=true;});};function T(ab){H=H.filter(function(ac){return ab.indexOf(ac)!==-1;
-});ab.forEach(function(ac){if(I.hasOwnProperty(ac)&&H.indexOf(ac)===-1)H.push(ac);});};function U(){var ab=R();ab=ab.filter(function(ac){return!G[ac];});if(ab.length>0){S(ab);return ab;}else return false;return ab.length>0?ab:false;};function V(){var ab=U();if(!ab)return;m.ajax({url:F,type:'POST',dataType:'json',data:{html:ab.join(' ')},async:false,success:function(ac){var ad=Object.keys(ac.words);if(ad.length){m.extend(I,ac.words);H=H.concat(ad);}}});};function W(ab){var ac=this,ad=null;if(!D)return;setTimeout(function(){A.save();ad=s._.definition.attributes;ad['data-word']=ab;O(ab).forEach(function(ae){C+=1;ad['data-id']=C;ae.highlight();});A.restore();},0);};function X(){V();Z();H.forEach(W);};function Y(ab){N(true).find("span[data-incorrect][data-word='"+ab+"']").each(function(){var ac=m(this);ac.replaceWith(ac.text());});};function Z(){if(C===0)return;A.save();m(z.document.getBody().$).find('span[data-incorrect]').each(function(ab,ac){var ad=m(ac);ad.replaceWith(ad.html());});A.restore();C=0;};function aa(ab){delete I[ab];H=H.filter(function(ac){return ac!==ab;});};M={init:function(){if(!B){P(D);if(D)setTimeout(X,1000);LiveJournal.register_hook('skipWord',function(ab){aa(ab);S([ab]);});B=true;}},on:function(){P(true);X();},off:function(){P(false);Z();},isEnabled:function(){return D;},toggle:function(){P(!D);},highlightWord:W,removeHighlightFromWord:Y,highlight:X,removeHighlight:Z,skipWord:aa,change:function(){if(K)clearTimeout(K);K=setTimeout(function(){if(D)X();else Z();},L);},getSuggestions:function(ab){return ab===undefined?I:I[ab]||[];},getWordRanges:O,debug:function(){LJ.console.log('--- already used words');LJ.console.log(Object.keys(G));LJ.console.log('--- words that are in the editor');LJ.console.log(R());LJ.console.log('--- new words in the editor');LJ.console.log(U());LJ.console.log('--- current incorrect words');LJ.console.log(H);}};return M;})(v,y);v.dataProcessor.htmlFilter.addRules({elements:{span:function(z){if(z.attributes['data-incorrect']||z.attributes['data-id']){delete z.name;var A=z.children[0];if(A)A.value=A.value.replace(/\&nbsp;/,' ');return z;}}}});v.on('change',a.ljspell.change);v.addCommand(x,{exec:function(z){a.ljspell.toggle();},editorFocus:false});v.ui.addButton(x,{label:CKLang.LJSpell_Title,command:x});}});})(jQuery,window);(function(){function m(o){var p=o.getStyle('overflow-y'),q=o.getDocument(),r=h.createFromHtml('<span style="margin:0;padding:0;border:0;clear:both;width:1px;height:1px;display:block;">'+(b.webkit?'&nbsp;':'')+'</span>',q);
-q[c?'getBody':'getDocumentElement']().append(r);var s=r.getDocumentPosition(q).y+r.$.offsetHeight;r.remove();o.setStyle('overflow-y',p);return s;};var n=function(o){if(!o.window)return;var p=o.document,q=new h(p.getWindow().$.frameElement),r=p.getBody(),s=p.getDocumentElement(),t=o.window.getViewPaneSize().height,u=p.$.compatMode=='BackCompat'?r:s,v=m(u);v+=o.config.autoGrow_bottomSpace||0;var w=o.config.autoGrow_minHeight!=undefined?o.config.autoGrow_minHeight:200,x=o.config.autoGrow_maxHeight||Infinity;v=Math.max(v,w);v=Math.min(v,x);if(v!=t){v=o.fire('autoGrow',{currentHeight:t,newHeight:v}).newHeight;o.resize(o.container.getStyle('width'),v,true);}if(u.$.scrollHeight>u.$.clientHeight&&v<x)u.setStyle('overflow-y','hidden');else u.removeStyle('overflow-y');};j.add('autogrow',{init:function(o){o.addCommand('autogrow',{exec:n,modes:{wysiwyg:1},readOnly:1,canUndo:false,editorFocus:false});var p={contentDom:1,key:1,selectionChange:1,insertElement:1};o.config.autoGrow_onStartup&&(p.instanceReady=1);for(var q in p)o.on(q,function(r){var s=o.getCommand('maximize');if(r.editor.mode=='wysiwyg'&&(!s||s.state!=1))setTimeout(function(){n(r.editor);n(r.editor);},100);});}});})();j.add('colorbutton',{requires:['panelbutton','floatpanel','styles'],init:function(m){var n=m.config,o=m.lang.colorButton,p;if(!b.hc){q('TextColor','fore',o.textColorTitle);q('BGColor','back',o.bgColorTitle);}function q(t,u,v){var w=e.getNextId()+'_colorBox';m.ui.add(t,'panelbutton',{label:v,title:v,className:'cke_button_'+t.toLowerCase(),modes:{wysiwyg:1},panel:{css:m.skin.editor.css,attributes:{role:'listbox','aria-label':o.panelTitle}},onBlock:function(x,y){y.autoSize=true;y.element.addClass('cke_colorblock');y.element.setHtml(r(x,u,w));y.element.getDocument().getBody().setStyle('overflow','hidden');k.fire('ready',this);var z=y.keys,A=m.lang.dir=='rtl';z[A?37:39]='next';z[40]='next';z[9]='next';z[A?39:37]='prev';z[38]='prev';z[2228224+9]='prev';z[32]='click';},onOpen:function(){var x=m.getSelection(),y=x&&x.getStartElement(),z=new d.elementPath(y),A;y=z.block||z.blockLimit||m.document.getBody();do A=y&&y.getComputedStyle(u=='back'?'background-color':'color')||'transparent';while(u=='back'&&A=='transparent'&&y&&(y=y.getParent()));if(!A||A=='transparent')A='#ffffff';this._.panel._.iframe.getFrameDocument().getById(w).setStyle('background-color',A);}});};function r(t,u,v){var w=[],x=n.colorButton_colors.split(','),y=x.length+(n.colorButton_enableMore?2:1),z=e.addFunction(function(F,G){if(F=='?'){var H=arguments.callee;
-function I(K){this.removeListener('ok',I);this.removeListener('cancel',I);K.name=='ok'&&H(this.getContentElement('picker','selectedColor').getValue(),G);};m.openDialog('colordialog',function(){this.on('ok',I);this.on('cancel',I);});return;}m.focus();t.hide(false);m.fire('saveSnapshot');new a.style(n['colorButton_'+G+'Style'],{color:'inherit'}).remove(m.document);if(F){var J=n['colorButton_'+G+'Style'];J.childRule=G=='back'?function(K){return s(K);}:function(K){return!(K.is('a')||K.getElementsByTag('a').count())||s(K);};new a.style(J,{color:F}).apply(m.document);}m.fire('saveSnapshot');});w.push('<a class="cke_colorauto" _cke_focus=1 hidefocus=true title="',o.auto,'" onclick="CKEDITOR.tools.callFunction(',z,",null,'",u,"');return false;\" href=\"javascript:void('",o.auto,'\')" role="option" aria-posinset="1" aria-setsize="',y,'"><table role="presentation" cellspacing=0 cellpadding=0 width="100%"><tr><td><span class="cke_colorbox" id="',v,'"></span></td><td colspan=7 align=center>',o.auto,'</td></tr></table></a><table role="presentation" cellspacing=0 cellpadding=0 width="100%">');for(var A=0;A<x.length;A++){if(A%8===0)w.push('</tr><tr>');var B=x[A].split('/'),C=B[0],D=B[1]||C;if(!B[1])C='#'+C.replace(/^(.)(.)(.)$/,'$1$1$2$2$3$3');var E=m.lang.colors[D]||D;w.push('<td><a class="cke_colorbox" _cke_focus=1 hidefocus=true title="',E,'" onclick="CKEDITOR.tools.callFunction(',z,",'",C,"','",u,"'); return false;\" href=\"javascript:void('",E,'\')" role="option" aria-posinset="',A+2,'" aria-setsize="',y,'"><span class="cke_colorbox" style="background-color:#',D,'"></span></a></td>');}if(n.colorButton_enableMore===undefined||n.colorButton_enableMore)w.push('</tr><tr><td colspan=8 align=center><a class="cke_colormore" _cke_focus=1 hidefocus=true title="',o.more,'" onclick="CKEDITOR.tools.callFunction(',z,",'?','",u,"');return false;\" href=\"javascript:void('",o.more,"')\"",' role="option" aria-posinset="',y,'" aria-setsize="',y,'">',o.more,'</a></td>');w.push('</tr></table>');return w.join('');};function s(t){return t.getAttribute('contentEditable')=='false'||t.getAttribute('data-nostyle');};}});i.colorButton_colors='000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF';i.colorButton_foreStyle={element:'span',styles:{color:'#(color)'},overrides:[{element:'font',attributes:{color:null}}]};
-i.colorButton_backStyle={element:'span',styles:{'background-color':'#(color)'}};j.colordialog={init:function(m){m.addCommand('colordialog',new a.dialogCommand('colordialog'));a.dialog.add('colordialog',this.path+'dialogs/colordialog.js');}};j.add('colordialog',j.colordialog);j.add('ljcolor',{requires:['styles'],init:function(m){var n='LJColor';m.on('selectionChange',function(t){var u=t.data.element,v=m.getCommand(n);if(u.is('span')&&u.getStyle('color'))v.setState(1);else v.setState(2);});var o=m.config,p=m.lang.colorButton;function q(t){t=t.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);var u='#'+('0'+parseInt(t[1],10).toString(16)).slice(-2)+('0'+parseInt(t[2],10).toString(16)).slice(-2)+('0'+parseInt(t[3],10).toString(16)).slice(-2);return u.toUpperCase();};function r(t,u){m.focus();m.fire('saveSnapshot');new a.style(o['colorButton_'+u+'Style'],{color:'inherit'}).remove(m.document);if(t){var v=o['colorButton_'+u+'Style'];v.childRule=u=='back'?function(w){return s(w);}:function(w){return!(w.is('a')||w.getElementsByTag('a').count())||s(w);};new a.style(v,{color:t}).apply(m.document);}m.fire('saveSnapshot');};LiveJournal.register_hook('selectedColor',function(t){r(t,'fore');});m.ui.addButton(n,{label:p.textColorTitle,command:n});m.addCommand(n,{exec:function(t){var u=null,v=t.getSelection();if(v){var w=v.getRanges()[0],x=w.startContainer.getParent();if(x.is('span')){u=x.getStyle('color');if(u)u=q(u);}}t.rteButton(n,'color',{selectedColor:u});}});function s(t){return t.getAttribute('contentEditable')=='false'||t.getAttribute('data-nostyle');};}});i.colorButton_foreStyle={element:'span',styles:{color:'#(color)'},overrides:[{element:'font',attributes:{color:null}}]};j.add('ljlink',{init:function(m){m.addCommand('link',new a.dialogCommand('link'));m.addCommand('unlink',new a.unlinkCommand());function n(C,D){var E=C.getParents(true),F,G=false;for(var H=0;H<E.length;H++){F=E[H];if(F&&F.type===1&&F.is(D)){G=true;break;}}return G;};if(jQuery.browser.webkit)m.on('contentDom',function(){this.document.on('keydown',function(C){if(C.data.getKey()===13){var D=m.getSelection(),E,F;if(!D)return;E=D.getRanges()[0];F=E.endContainer.getParent();var G=E.checkStartOfBlock(),H=E.checkEndOfBlock();if(F.is('a')&&E.collapsed||E.endContainer.type===1&&E.endContainer.is('a')){if(n(E.endContainer,'li'))return;m.insertHtml('<span>&nbsp;</span>');setTimeout(function(){if(H&&F&&F.getNext())F.getNext().remove();},100);}}});});m.on('selectionChange',function(C){if(m.readOnly)return;var D=m.getCommand('unlink'),E=C.data.path.lastElement&&C.data.path.lastElement.getAscendant('a',true);
-if(E&&E.getName()=='a'&&E.getAttribute('href')&&E.getChildCount())D.setState(2);else D.setState(0);});var o=/^javascript:/,p=/^mailto:([^?]+)(?:\?(.+))?$/,q=/subject=([^;?:@&=$,\/]*)/,r=/body=([^;?:@&=$,\/]*)/,s=/^#(.*)$/,t=/^((?:http|https|ftp|news):\/\/)?(.*)$/,u=/^(_(?:self|top|parent|blank))$/,v=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,w=/^javascript:([^(]+)\(([^)]+)\)$/,x=/\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/,y=/(?:^|,)([^=]+)=(\d+|yes|no)/gi,z=function(C,D){var E=D&&(D.data('cke-saved-href')||D.getAttribute('href'))||''...
 (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