spacevillain (spacevillain) wrote in changelog,
spacevillain
spacevillain
changelog

[livejournal] r22527: LJSUP-12933: Doesn't work spellchecker b...

Committer: atyurin
LJSUP-12933: Doesn't work spellchecker button
U   trunk/htdocs/js/ck/ckeditor-dev.js
U   trunk/htdocs/js/ck/ckeditor.js
U   trunk/htdocs/js/ck/config.js
Modified: trunk/htdocs/js/ck/ckeditor-dev.js
===================================================================
--- trunk/htdocs/js/ck/ckeditor-dev.js	2012-07-31 10:47:37 UTC (rev 22526)
+++ trunk/htdocs/js/ck/ckeditor-dev.js	2012-07-31 10:55:49 UTC (rev 22527)
@@ -123,5 +123,5 @@
 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;}};})();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);a.editorConfig=function(m){j.addExternal('ljcolor','plugins/lj/ljcolor/plugin.js');j.addExternal('ljlink','plugins/lj/ljlink/plugin.js');j.addExternal('ljfont','plugins/lj/ljfont/plugin.js');var n=[Site.page.ljpost?'livejournal':'livejournal_old','ljcolor','ljlink'],o=['ajax','basicstyles','bidi','blockquote','button','colorbutton','colordialog','dialog','enterkey','entities','font','format','htmldataprocessor','image','keystrokes','list','liststyle','pastefromword','specialchar','tab','table','toolbar','undo','wysiwygarea','onchange','link'];if(Site.page.ljpost){o.push('autogrow');m.autoGrow_minHeight=400;n.push('ljfont');}m.language='ru';m.autoParagraph=false;m.autoUpdateElement=false;m.docType='<!DOCTYPE html>';if(Site.page.ljpost){m.contentsCss='/js/ck/contents_new.css?t='+Site.version;m.styleText=Site.statprefix+'/js/ck/contents_new.css?t='+Site.version;}else{m.contentsCss='/js/ck/contents.css?t='+Site.version;m.styleText=Site.statprefix+'/js/ck/contents.css?t='+Site.version;}m.fillEmptyBlocks=false;if(Site.is_dev_server)m.extraPlugins=n.join(',');else Array.prototype.push.apply(o,n);m.plugins=o.join(',');if(jQuery.browser.msie||jQuery.browser.opera)m.plugins+=',contextmenu';m.contentsLangDirection='ltr';m.fillEmptyBlocks=false;m.tabIndex=41;m.tabSpaces=2;m.startupShowBorders=false;
-m.toolbarCanCollapse=false;m.disableNativeSpellChecker=false;var p=[];function q(r,s){return r?s:undefined;};if(Site.page.ljpost)p=['Bold','Italic','Underline','Strike','ljFontSize','LJColor','-','LJLink2','LJUserLink','-','image',q(Site.media_embed_enabled,'LJEmbedLink'),'LJCut','LJSpoiler','LJLike','LJPollLink','NumberedList','BulletedList','LJJustifyLeft','LJJustifyCenter','LJJustifyRight','Undo','Redo'];else p=['Bold','Italic','Underline','Strike','TextColor','FontSize','-','LJLink','LJUserLink','image',q(Site.media_embed_enabled,'LJEmbedLink'),'LJPollLink','LJCutLink','LJCut','LJLike','LJSpoiler','-','UnorderedList','OrderedList','NumberedList','BulletedList','-','LJJustifyLeft','LJJustifyCenter','LJJustifyRight','-','Undo','Redo'];m.toolbar_Full=[p.filter(function(r){return r;})];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;if(!Site.page.ljpost)m.protectedSource.push(/<lj-poll-\d+\s*\/?>/gi);m.protectedSource.push(/<lj-replace name="first_post"\s*\/?>/gi);};a.editorConfig(i);})();
+}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);a.editorConfig=function(m){j.addExternal('ljcolor','plugins/lj/ljcolor/plugin.js');j.addExternal('ljlink','plugins/lj/ljlink/plugin.js');j.addExternal('ljfont','plugins/lj/ljfont/plugin.js');var n=[Site.page.ljpost?'livejournal':'livejournal_old','ljcolor','ljlink'],o=['ajax','basicstyles','bidi','blockquote','button','colorbutton','colordialog','dialog','enterkey','entities','font','format','htmldataprocessor','image','keystrokes','list','liststyle','pastefromword','specialchar','tab','table','toolbar','undo','wysiwygarea','onchange','link'];if(Site.page.ljpost){o.push('autogrow');m.autoGrow_minHeight=400;n.push('ljspell','ljfont');}m.language='ru';m.autoParagraph=false;m.autoUpdateElement=false;m.docType='<!DOCTYPE html>';if(Site.page.ljpost){m.contentsCss='/js/ck/contents_new.css?t='+Site.version;m.styleText=Site.statprefix+'/js/ck/contents_new.css?t='+Site.version;}else{m.contentsCss='/js/ck/contents.css?t='+Site.version;m.styleText=Site.statprefix+'/js/ck/contents.css?t='+Site.version;}m.fillEmptyBlocks=false;if(Site.is_dev_server)m.extraPlugins=n.join(',');else Array.prototype.push.apply(o,n);m.plugins=o.join(',');if(jQuery.browser.msie||jQuery.browser.opera)m.plugins+=',contextmenu';m.contentsLangDirection='ltr';m.fillEmptyBlocks=false;m.tabIndex=41;m.tabSpaces=2;m.startupShowBorders=false;
+m.toolbarCanCollapse=false;m.disableNativeSpellChecker=false;var p=[];function q(r,s){return r?s:undefined;};if(Site.page.ljpost)p=['Bold','Italic','Underline','Strike','ljFontSize','LJColor','-','LJLink2','LJUserLink','-','image',q(Site.media_embed_enabled,'LJEmbedLink'),'LJCut','LJSpoiler','LJLike','LJPollLink','NumberedList','BulletedList','LJJustifyLeft','LJJustifyCenter','LJJustifyRight','LJSpell','Undo','Redo'];else p=['Bold','Italic','Underline','Strike','TextColor','FontSize','-','LJLink','LJUserLink','image',q(Site.media_embed_enabled,'LJEmbedLink'),'LJPollLink','LJCutLink','LJCut','LJLike','LJSpoiler','-','UnorderedList','OrderedList','NumberedList','BulletedList','-','LJJustifyLeft','LJJustifyCenter','LJJustifyRight','-','Undo','Redo'];m.toolbar_Full=[p.filter(function(r){return r;})];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;if(!Site.page.ljpost)m.protectedSource.push(/<lj-poll-\d+\s*\/?>/gi);m.protectedSource.push(/<lj-replace name="first_post"\s*\/?>/gi);};a.editorConfig(i);})();

Modified: trunk/htdocs/js/ck/ckeditor.js
===================================================================
--- trunk/htdocs/js/ck/ckeditor.js	2012-07-31 10:47:37 UTC (rev 22526)
+++ trunk/htdocs/js/ck/ckeditor.js	2012-07-31 10:55:49 UTC (rev 22527)
@@ -146,13 +146,13 @@
 },'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');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(m,n){var o;function p(B){return B.type==3&&B.getLength()>0&&(!o||!B.isReadOnly());};function q(B){return!(B.type==1&&B.isBlockBoundary(e.extend({},f.$empty,f.$nonEditable)));};var r=function(){var B=this;return{textNode:B.textNode,offset:B.offset,character:B.textNode?B.textNode.getText().charAt(B.offset):null,hitMatchBoundary:B._.matchBoundary};},s,t=function(B,C){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 D=function(P,Q){var R=this,S=new d.walker(P);S.guard=Q?q:function(T){!q(T)&&(R._.matchBoundary=true);};S.evaluator=p;S.breakOnFalse=1;if(P.startContainer.type==3){this.textNode=P.startContainer;this.offset=P.startOffset-1;}this._={matchWord:Q,walker:S,matchBoundary:false};};D.prototype={next:function(){return this.move();},back:function(){return this.move(true);
 },move:function(P){var R=this;var Q=R.textNode;if(Q===null)return r.call(R);R._.matchBoundary=false;if(Q&&P&&R.offset>0){R.offset--;return r.call(R);}else if(Q&&R.offset<Q.getLength()-1){R.offset++;return r.call(R);}else{Q=null;while(!Q){Q=R._.walker[P?'previous':'next'].call(R._.walker);if(R._.matchWord&&!Q||R._.walker._.end)break;}R.textNode=Q;if(Q)R.offset=P?Q.getLength()-1:0;else R.offset=0;}return r.call(R);}};var E=function(P,Q){this._={walker:P,cursors:[],rangeLength:Q,highlightRange:null,isMatched:0};};E.prototype={toDomRange:function(){var P=new d.range(B.document),Q=this._.cursors;if(Q.length<1){var R=this._.walker.textNode;if(R)P.setStartAfter(R);else return null;}else{var S=Q[0],T=Q[Q.length-1];P.setStart(S.textNode,S.offset);P.setEnd(T.textNode,T.offset+1);}return P;},updateFromDomRange:function(P){var S=this;var Q,R=new D(P);S._.cursors=[];do{Q=R.next();if(Q.character)S._.cursors.push(Q);}while(Q.character);S._.rangeLength=S._.cursors.length;},setMatched:function(){this._.isMatched=true;},clearMatched:function(){this._.isMatched=false;},isMatched:function(){return this._.isMatched;},highlight:function(){var S=this;if(S._.cursors.length<1)return;if(S._.highlightRange)S.removeHighlight();var P=S.toDomRange(),Q=P.createBookmark();s.applyToRange(P);P.moveToBookmark(Q);S._.highlightRange=P;var R=P.startContainer;if(R.type!=1)R=R.getParent();R.scrollIntoView();S.updateFromDomRange(P);},highlightx:function(){var R=this;if(R._.cursors.length<1)return;if(R._.highlightRange)R.removeHighlight();var P=R.toDomRange(),Q=P.createBookmark();P.moveToBookmark(Q);R.updateFromDomRange(P);},removeHighlight:function(P){var R=this;if(!R._.highlightRange)return;var Q=R._.highlightRange.createBookmark();s.removeFromRange(P||R._.highlightRange);R._.highlightRange.moveToBookmark(Q);R.updateFromDomRange(R._.highlightRange);R._.highlightRange=null;},isReadOnly:function(){if(!this._.highlightRange)return 0;return this._.highlightRange.startContainer.isReadOnly();},moveBack:function(){var R=this;var P=R._.walker.back(),Q=R._.cursors;if(P.hitMatchBoundary)R._.cursors=Q=[];Q.unshift(P);if(Q.length>R._.rangeLength)Q.pop();return P;},moveNext:function(){var R=this;var P=R._.walker.next(),Q=R._.cursors;if(P.hitMatchBoundary)R._.cursors=Q=[];Q.push(P);if(Q.length>R._.rangeLength)Q.shift();return P;},getEndCharacter:function(){var P=this._.cursors;if(P.length<1)return null;return P[P.length-1].character;},getNextCharacterRange:function(P){var Q,R,S=this._.cursors;if((Q=S[S.length-1])&&Q.textNode)R=new D(F(Q));
-else R=this._.walker;return new E(R,P);},getCursors:function(){return this._.cursors;}};function F(P,Q){var R=new d.range();R.setStart(P.textNode,Q?P.offset:P.offset+1);R.setEndAt(B.document.getBody(),2);return R;};function G(P){var Q=new d.range();Q.setStartAt(B.document.getBody(),1);Q.setEnd(P.textNode,P.offset);return Q;};var H=0,I=1,J=2,K=function(P,Q){var R=[-1];if(Q)P=P.toLowerCase();for(var S=0;S<P.length;S++){R.push(R[S]+1);while(R[S+1]>0&&P.charAt(S)!=P.charAt(R[S+1]-1))R[S+1]=R[R[S+1]-1]+1;}this._={overlap:R,state:0,ignoreCase:!!Q,pattern:P};};K.prototype={feedCharacter:function(P){var Q=this;if(Q._.ignoreCase)P=P.toLowerCase();for(;;){if(P==Q._.pattern.charAt(Q._.state)){Q._.state++;if(Q._.state==Q._.pattern.length){Q._.state=0;return J;}return I;}else if(!Q._.state)return H;else Q._.state=Q._.overlap[Q._.state];}return null;},reset:function(){this._.state=0;}};var L=/[.,"'?!;: \u0085\u00a0\u1680\u280e\u2028\u2029\u202f\u205f\u3000]/,M=function(P){if(!P)return true;var Q=P.charCodeAt(0);return Q>=9&&Q<=13||Q>=8192&&Q<=8202||L.test(P);},N={searchRange:null,matchRange:null,find:function(P,Q,R,S,T,U){var ad=this;if(!ad.matchRange)ad.matchRange=new E(new D(ad.searchRange),P.length);else ad.matchRange=ad.matchRange.getNextCharacterRange(P.length);var V=new K(P,!Q),W=H,X='%';while(X!==null){ad.matchRange.moveNext();while(X=ad.matchRange.getEndCharacter()){W=V.feedCharacter(X);if(W==J)break;if(ad.matchRange.moveNext().hitMatchBoundary)V.reset();}if(W==J){var Y=ad.matchRange.getCursors(),Z=Y[Y.length-1],aa=Y[0],ab=new D(G(aa),true),ac=new D(F(Z),true);if(!(M(ab.back().character)&&M(ac.next().character)))continue;ad.matchRange.setMatched();if(T!==false)ad.matchRange.highlightx();return ad.matchRange;}}if(S&&!U){ad.searchRange=u(1);ad.matchRange=null;return arguments.callee.apply(ad,Array.prototype.slice.call(arguments).concat([true]));}return false;}},O=B.lang.findAndReplace;return N;};function u(B,C){var D,E=C.getSelection(),F=C.document.getBody();if(E&&!B){D=E.getRanges()[0].clone();D.collapse(true);}else{D=new d.range();D.setStartAt(F,1);}D.setEndAt(F,2);return D;};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">'+LiveJournal.getLocalizedStr('widget.form.no_suggestions')+'</span></li>'},enabled:false},init:function(B){var C=this,D=(function(F){var G,H,I;
-return{save:function(){G=F.getSelection();H=G.getRanges()[0];I=H.createBookmark(true);F.focusManager.blur();F.focusManager.forceBlur();},restore:function(){G.unlock();H.moveToBookmark(I);F.getSelection().selectRanges([H]);}};})(B);B.on('contentDom',function(){var F=m(this.document.getBody().$),G=m('#cke_ck'),H=C.options,I=m(H.tmpl.bubble);I.bubble({showOn:'click',alwaysShowUnderTarget:true,classNames:{containerAddClass:H.classNames.bubbleContainer}});F.on('click','span[data-incorrect]',function(J){var K=m(this),L=A[K.attr('data-word')].map(function(M){return H.tmpl.bubbleItem.supplant({word:M});});if(L.length===0)L.push(H.tmpl.bubbleItemNoSuggestions);I.html(H.tmpl.bubbleList.supplant({items:L.join('')})).off('click').on('click',H.selectors.bubbleItem,function(){if(m(this).hasClass(H.classNames.bubbleNoSuggestions))return;var M=F.find('span[data-id="'+K.attr('data-id')+'"]');m(M[0]).replaceWith(m(this).text());if(M.length>1)M.slice(1).detach();I.bubble('hide');}).bubble('hide').bubble('show',G).bubble('absolute',J.clientX,J.clientY+G.offset().top+60);});});a.ljspell={id:0,getWordRanges:function(F){var G=[];this.finder.searchRange=u(1,B);this.finder.matchRange=null;while((range=this.finder.find(F,false,false,false))!==false)G.push(range);return G;},highlightWord:function(F){var G=this;D.save();var H=s._.definition.attributes;H['data-word']=F;this.getWordRanges(F).forEach(function(I){H['data-id']=G.id++;I.highlight();});D.restore();},removeHighlight:function(F){D.save();m('span[data-incorrect]',B.document.getBody().$).each(function(G,H){jQuery(H).replaceWith(jQuery(H).html());});D.restore();this.id=0;}};B.dataProcessor.htmlFilter.addRules({elements:{span:function(F){if(F.attributes['data-incorrect']||F.attributes['data-id']){delete F.name;var G=F.children[0];if(G)G.value=G.value.replace(/\&nbsp;/,' ');return F;}}}});a.ljspell.finder=t(B);B.on('change',function(F){z(m(F.editor.document.getBody().$).text(),function(G){a.ljspell.removeHighlight();m.extend(v,G);for(var H in v)a.ljspell.highlightWord(H);});});var E='LJSpell';B.addCommand(E,{exec:function(F){},editorFocus:false});B.ui.addButton(E,{label:'ddd',command:E});}});var v={},w=false,x={},y=null;function z(B,C){if(y)clearTimeout(y);y=setTimeout(function(){var D={},E=B.replace(/\&nbsp;/ig,' ').match(/[a-zа-яё]+/gi),F;if(!E)return;for(F=0;F<E.length;F++)D[E[F]]=1;var G=Object.keys(x);for(F=0;F<G.length;F++){if(D[G[F]])delete D[G[F]];}for(F=0;F<E.length;F++)x[E[F].toLowerCase()]=1;m.ajax({url:LiveJournal.getAjaxUrl('spellcheck'),type:'POST',dataType:'json',data:{html:Object.keys(D).join(' ')},success:function(H){C(H.words);
-m.extend(A,H.words);}});},1000);};var A={};})(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=m.config,o=m.lang.colorButton;function p(s,t){m.focus();m.fire('saveSnapshot');new a.style(n['colorButton_'+t+'Style'],{color:'inherit'}).remove(m.document);if(s){var u=n['colorButton_'+t+'Style'];u.childRule=t=='back'?function(v){return r(v);}:function(v){return!(v.is('a')||v.getElementsByTag('a').count())||r(v);};new a.style(u,{color:s}).apply(m.document);}m.fire('saveSnapshot');};LiveJournal.register_hook('selectedColor',function(s){p(s,'fore');});var q='LJColor';m.ui.addButton(q,{label:o.textColorTitle,command:q});m.addCommand(q,{exec:function(s){LiveJournal.run_hook('rteButton','color',jQuery('.cke_button_'+q));}});function r(s){return s.getAttribute('contentEditable')=='false'||s.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());m.on('selectionChange',function(A){if(m.readOnly)return;var B=m.getCommand('unlink'),C=A.data.path.lastElement&&A.data.path.lastElement.getAscendant('a',true);if(C&&C.getName()=='a'&&C.getAttribute('href')&&C.getChildCount())B.setState(2);else B.setState(0);});var n=/^javascript:/,o=/^mailto:([^?]+)(?:\?(.+))?$/,p=/subject=([^;?:@&=$,\/]*)/,q=/body=([^;?:@&=$,\/]*)/,r=/^#(.*)$/,s=/^((?:http|https|ftp|news):\/\/)?(.*)$/,t=/^(_(?:self|top|parent|blank))$/,u=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,v=/^javascript:([^(]+)\(([^)]+)\)$/,w=/\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/,x=/(?:^|,)([^=]+)=(\d+|yes|no)/gi,y=function(A,B){var C=B&&(B.data('cke-saved-href')||B.getAttribute('href'))||'',D,E,F,G,H={};if(D=C.match(n))if(emailProtection=='encode')C=C.replace(u,function(Z,aa,ab){return 'mailto:'+String.fromCharCode.apply(String,aa.split(','))+(ab&&unescapeSingleQuote(ab));});else if(emailProtection)C.replace(v,function(Z,aa,ab){if(aa==compiledProtectionFunction.name){H.type='email';
-var ac=H.email={},ad=/[^,\s]+/g,ae=/(^')|('$)/g,af=ab.match(ad),ag=af.length,ah,ai;for(var aj=0;aj<ag;aj++){ai=decodeURIComponent(unescapeSingleQuote(af[aj].replace(ae,'')));ah=compiledProtectionFunction.params[aj].toLowerCase();ac[ah]=ai;}ac.address=[ac.name,ac.domain].join('@');}});if(!H.type)if(F=C.match(r)){H.type='anchor';H.anchor={};H.anchor.name=H.anchor.id=F[1];}else if(E=C.match(o)){var I=C.match(p),J=C.match(q);H.type='email';var K=H.email={};K.address=E[1];I&&(K.subject=decodeURIComponent(I[1]));J&&(K.body=decodeURIComponent(J[1]));}else if(C&&(G=C.match(s))){H.type='url';H.url={};H.url.protocol=G[1];H.url.url=G[2];}else H.type='url';if(B){var L=B.getAttribute('target');H.target={};H.adv={};if(!L){var M=B.data('cke-pa-onclick')||B.getAttribute('onclick'),N=M&&M.match(w);if(N){H.target.type='popup';H.target.name=N[1];var O;while(O=x.exec(N[2])){if((O[2]=='yes'||O[2]=='1')&&!(O[1] in {height:1,width:1,top:1,left:1}))H.target[O[1]]=true;else if(isFinite(O[2]))H.target[O[1]]=O[2];}}}else{var P=L.match(t);if(P)H.target.type=H.target.name=L;else{H.target.type='frame';H.target.name=L;}}var Q=this,R=function(Z,aa){var ab=B.getAttribute(aa);if(ab!==null)H.adv[Z]=ab||'';};R('advId','id');R('advLangDir','dir');R('advAccessKey','accessKey');H.adv.advName=B.data('cke-saved-name')||B.getAttribute('name')||'';R('advLangCode','lang');R('advTabIndex','tabindex');R('advTitle','title');R('advContentType','type');j.link.synAnchorSelector?H.adv.advCSSClasses=getLinkClass(B):R('advCSSClasses','class');R('advCharset','charset');R('advStyles','style');R('advRel','rel');}var S=H.anchors=[],T;if(j.link.emptyAnchorFix){var U=A.document.getElementsByTag('a');for(i=0,count=U.count();i<count;i++){T=U.getItem(i);if(T.data('cke-saved-name')||T.hasAttribute('name'))S.push({name:T.data('cke-saved-name')||T.getAttribute('name'),id:T.getAttribute('id')});}}else{var V=new d.nodeList(A.document.$.anchors);for(var W=0,X=V.count();W<X;W++){T=V.getItem(W);S[W]={name:T.getAttribute('name'),id:T.getAttribute('id')};}}if(j.link.fakeAnchor){var Y=A.document.getElementsByTag('img');for(W=0,X=Y.count();W<X;W++){if(T=j.link.tryRestoreFakeAnchor(A,Y.getItem(W)))S.push({name:T.getAttribute('name'),id:T.getAttribute('id')});}}this.selectedElement=B;return H;};LiveJournal.register_hook('link_response',function(A){var J=this;if(A.length===0){m.execCommand('unlink');delete J.selectedElement;return;}if(A.indexOf('http://')===-1)A='http://'+A;var B={};B['data-cke-saved-href']=A;B.href=A;if(!J.selectedElement){var C=m.getSelection(),D=C.getRanges(true);
-if(D.length==1&&D[0].collapsed){var E=new d.text(B['data-cke-saved-href'],m.document);D[0].insertNode(E);D[0].selectNodeContents(E);C.selectRanges(D);}var F=new a.style({element:'a',attributes:B});F.type=2;F.apply(m.document);}else{var G=J.selectedElement,H=G.data('cke-saved-href'),I=G.getHtml();G.setAttributes(B);delete J.selectedElement;}});LiveJournal.register_hook('link_hide',function(A){if(this.selectedElement)delete this.selectedElement;});var z='LJLink2';m.addCommand(z,{exec:function(A){var B=A.getSelection(),C=null;if((C=j.link.getSelectedLink(A))&&C.hasAttribute('href'))B.selectElement(C);else C=null;var D='';if(C){var E=y(A,C).url;D=(E.protocol||'http://')+E.url;}LiveJournal.run_hook('rteButton','link',jQuery('.cke_button_'+z),{defaultText:D,hasSelectedText:C?true:false,editMode:C?true:false});},editorFocus:false});m.ui.addButton(z,{label:m.lang.link.toolbar,command:z});},afterInit:function(m){var n=m.dataProcessor,o=n&&n.dataFilter,p=n&&n.htmlFilter,q=m._.elementsPath&&m._.elementsPath.filters;if(o)o.addRules({elements:{a:function(r){var s=r.attributes;if(!s.name)return null;var t=!r.children.length;if(j.link.synAnchorSelector){var u=t?'cke_anchor_empty':'cke_anchor',v=s['class'];if(s.name&&(!v||v.indexOf(u)<0))s['class']=(v||'')+' '+u;if(t&&j.link.emptyAnchorFix){s.contenteditable='false';s['data-cke-editable']=1;}}else if(j.link.fakeAnchor&&t)return m.createFakeParserElement(r,'cke_anchor','anchor');return null;}}});if(j.link.emptyAnchorFix&&p)p.addRules({elements:{a:function(r){delete r.attributes.contenteditable;}}});if(q)q.push(function(r,s){if(s=='a')if(j.link.tryRestoreFakeAnchor(m,r)||r.getAttribute('name')&&(!r.getAttribute('href')||!r.getChildCount()))return 'anchor';});},requires:['fakeobjects']});j.link={getSelectedLink:function(m){try{var n=m.getSelection();if(n.getType()==3){var o=n.getSelectedElement();if(o.is('a'))return o;}var p=n.getRanges(true)[0];p.shrink(2);var q=p.getCommonAncestor();return q.getAscendant('a',true);}catch(r){return null;}},fakeAnchor:b.opera||b.webkit,synAnchorSelector:c,emptyAnchorFix:c&&b.version<8,tryRestoreFakeAnchor:function(m,n){if(n&&n.data('cke-real-element-type')&&n.data('cke-real-element-type')=='anchor'){var o=m.restoreRealElement(n);if(o.data('cke-saved-name'))return o;}}};a.unlinkCommand=function(){};a.unlinkCommand.prototype={exec:function(m){var n=m.getSelection(),o=n.createBookmarks(),p=n.getRanges(),q,r;for(var s=0;s<p.length;s++){q=p[s].getCommonAncestor(true);r=q.getAscendant('a',true);if(!r)continue;
-p[s].selectNodeContents(r);}n.selectRanges(p);m.document.$.execCommand('unlink',false,null);n.selectBookmarks(o);},startDisabled:true};a.removeAnchorCommand=function(){};a.removeAnchorCommand.prototype={exec:function(m){var n=m.getSelection(),o=n.createBookmarks(),p;if(n&&(p=n.getSelectedElement())&&(j.link.fakeAnchor&&!p.getChildCount()?j.link.tryRestoreFakeAnchor(m,p):p.is('a')))p.remove(1);else if(p=j.link.getSelectedLink(m))if(p.hasAttribute('href')){p.removeAttributes({name:1,'data-cke-saved-name':1});p.removeClass('cke_anchor');}else p.remove(1);n.selectBookmarks(o);}};(function(){function m(p,q,r,s,t,u,v){var w=p.config,x=t.split(';'),y=[],z={};for(var A=0;A<x.length;A++){var B=x[A];if(B){B=B.split('/');var C={},D=x[A]=B[0];C[r]=y[A]=B[1]||D;z[D]=new a.style(v,C);z[D]._.definition.name=D;}else x.splice(A--,1);}p.ui.addRichCombo(q,{label:s.label,title:s.panelTitle,className:'cke_'+(r=='size'?'fontSize':'font'),panel:{css:p.skin.editor.css.concat(w.contentsCss),multiSelect:false,attributes:{'aria-label':s.panelTitle}},init:function(){this.startGroup(s.panelTitle);for(var E=0;E<x.length;E++){var F=x[E];this.add(F,z[F].buildPreview(),F);}},onClick:function(E){p.focus();p.fire('saveSnapshot');var F=z[E];if(this.getValue()==E)F.remove(p.document);else{var G=p.getSelection(),H=parseFloat(z[E]._.definition.styles['font-size']);for(var I in z)z[I].remove(p.document);F.apply(p.document);}p.fire('saveSnapshot');},onRender:function(){p.on('selectionChange',function(E){var F=this.getValue(),G=E.data.path,H=G.elements;for(var I=0,J;I<H.length;I++){J=H[I];for(var K in z){if(z[K].checkElementRemovable(J,true)){if(K!=F)this.setValue(K);return;}}}this.setValue('',u);},this);}});};j.add('ljfont',{requires:['richcombo','styles'],init:function(p){var q=p.config;m(p,'ljFontSize','size',p.lang.fontSize,q.fontSize_sizes,q.fontSize_defaultLabel,q.fontSize_style);}});i.font_style={element:'span',styles:{'font-family':'#(family)'},overrides:[{element:'font',attributes:{face:null}}]};var n={tiny:'0.6em',small:'0.8em',normal:'1.0em',large:'1.4em',huge:'1.8em'};i.fontSize_sizes='';for(var o in n)i.fontSize_sizes+=Site.ml_text['talk.font.'+o]+'/'+n[o]+';';i.fontSize_defaultLabel=Site.ml_text['talk.font.normal'];i.fontSize_style={element:'span',styles:{'font-size':'#(size)'},overrides:[{element:'font',attributes:{size:null}}]};})();a.editorConfig=function(m){j.addExternal('ljcolor','plugins/lj/ljcolor/plugin.js');j.addExternal('ljlink','plugins/lj/ljlink/plugin.js');j.addExternal('ljfont','plugins/lj/ljfont/plugin.js');
-var n=[Site.page.ljpost?'livejournal':'livejournal_old','ljcolor','ljlink'],o=['ajax','basicstyles','bidi','blockquote','button','colorbutton','colordialog','dialog','enterkey','entities','font','format','htmldataprocessor','image','keystrokes','list','liststyle','pastefromword','specialchar','tab','table','toolbar','undo','wysiwygarea','onchange','link'];if(Site.page.ljpost){o.push('autogrow');m.autoGrow_minHeight=400;n.push('ljfont');}m.language='ru';m.autoParagraph=false;m.autoUpdateElement=false;m.docType='<!DOCTYPE html>';if(Site.page.ljpost){m.contentsCss='/js/ck/contents_new.css?t='+Site.version;m.styleText=Site.statprefix+'/js/ck/contents_new.css?t='+Site.version;}else{m.contentsCss='/js/ck/contents.css?t='+Site.version;m.styleText=Site.statprefix+'/js/ck/contents.css?t='+Site.version;}m.fillEmptyBlocks=false;if(Site.is_dev_server)m.extraPlugins=n.join(',');else Array.prototype.push.apply(o,n);m.plugins=o.join(',');if(jQuery.browser.msie||jQuery.browser.opera)m.plugins+=',contextmenu';m.contentsLangDirection='ltr';m.fillEmptyBlocks=false;m.tabIndex=41;m.tabSpaces=2;m.startupShowBorders=false;m.toolbarCanCollapse=false;m.disableNativeSpellChecker=false;var p=[];function q(r,s){return r?s:undefined;};if(Site.page.ljpost)p=['Bold','Italic','Underline','Strike','ljFontSize','LJColor','-','LJLink2','LJUserLink','-','image',q(Site.media_embed_enabled,'LJEmbedLink'),'LJCut','LJSpoiler','LJLike','LJPollLink','NumberedList','BulletedList','LJJustifyLeft','LJJustifyCenter','LJJustifyRight','Undo','Redo'];else p=['Bold','Italic','Underline','Strike','TextColor','FontSize','-','LJLink','LJUserLink','image',q(Site.media_embed_enabled,'LJEmbedLink'),'LJPollLink','LJCutLink','LJCut','LJLike','LJSpoiler','-','UnorderedList','OrderedList','NumberedList','BulletedList','-','LJJustifyLeft','LJJustifyCenter','LJJustifyRight','-','Undo','Redo'];m.toolbar_Full=[p.filter(function(r){return r;})];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;if(!Site.page.ljpost)m.protectedSource.push(/<lj-poll-\d+\s*\/?>/gi);m.protectedSource.push(/<lj-replace name="first_post"\s*\/?>/gi);};a.editorConfig(i);})();
+else R=this._.walker;return new E(R,P);},getCursors:function(){return this._.cursors;}};function F(P,Q){var R=new d.range();R.setStart(P.textNode,Q?P.offset:P.offset+1);R.setEndAt(B.document.getBody(),2);return R;};function G(P){var Q=new d.range();Q.setStartAt(B.document.getBody(),1);Q.setEnd(P.textNode,P.offset);return Q;};var H=0,I=1,J=2,K=function(P,Q){var R=[-1];if(Q)P=P.toLowerCase();for(var S=0;S<P.length;S++){R.push(R[S]+1);while(R[S+1]>0&&P.charAt(S)!=P.charAt(R[S+1]-1))R[S+1]=R[R[S+1]-1]+1;}this._={overlap:R,state:0,ignoreCase:!!Q,pattern:P};};K.prototype={feedCharacter:function(P){var Q=this;if(Q._.ignoreCase)P=P.toLowerCase();for(;;){if(P==Q._.pattern.charAt(Q._.state)){Q._.state++;if(Q._.state==Q._.pattern.length){Q._.state=0;return J;}return I;}else if(!Q._.state)return H;else Q._.state=Q._.overlap[Q._.state];}return null;},reset:function(){this._.state=0;}};var L=/[.,"'?!;: \u0085\u00a0\u1680\u280e\u2028\u2029\u202f\u205f\u3000]/,M=function(P){if(!P)return true;var Q=P.charCodeAt(0);return Q>=9&&Q<=13||Q>=8192&&Q<=8202||L.test(P);},N={searchRange:null,matchRange:null,find:function(P,Q,R,S,T,U){var ad=this;if(!ad.matchRange)ad.matchRange=new E(new D(ad.searchRange),P.length);else ad.matchRange=ad.matchRange.getNextCharacterRange(P.length);var V=new K(P,!Q),W=H,X='%';while(X!==null){ad.matchRange.moveNext();while(X=ad.matchRange.getEndCharacter()){W=V.feedCharacter(X);if(W==J)break;if(ad.matchRange.moveNext().hitMatchBoundary)V.reset();}if(W==J){var Y=ad.matchRange.getCursors(),Z=Y[Y.length-1],aa=Y[0],ab=new D(G(aa),true),ac=new D(F(Z),true);if(!(M(ab.back().character)&&M(ac.next().character)))continue;ad.matchRange.setMatched();if(T!==false)ad.matchRange.highlightx();return ad.matchRange;}}if(S&&!U){ad.searchRange=u(1);ad.matchRange=null;return arguments.callee.apply(ad,Array.prototype.slice.call(arguments).concat([true]));}return false;}},O=B.lang.findAndReplace;return N;};function u(B,C){var D,E=C.getSelection(),F=C.document.getBody();if(E&&!B){D=E.getRanges()[0].clone();D.collapse(true);}else{D=new d.range();D.setStartAt(F,1);}D.setEndAt(F,2);return D;};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">'+LiveJournal.getLocalizedStr('widget.form.no_suggestions')+'</span></li>'},enabled:false},init:function(B){var C=this,D='LJSpell',E=(function(F){var G,H,I;
+return{save:function(){G=F.getSelection();H=G.getRanges()[0];I=H.createBookmark(true);F.focusManager.blur();F.focusManager.forceBlur();},restore:function(){G.unlock();H.moveToBookmark(I);F.getSelection().selectRanges([H]);}};})(B);B.on('contentDom',function(){var F=m(this.document.getBody().$),G=m('#cke_ck'),H=C.options,I=m(H.tmpl.bubble);I.bubble({showOn:'click',alwaysShowUnderTarget:true,classNames:{containerAddClass:H.classNames.bubbleContainer}});F.on('click','span[data-incorrect]',function(J){var K=m(this),L=A[K.attr('data-word')].map(function(M){return H.tmpl.bubbleItem.supplant({word:M});});if(L.length===0)L.push(H.tmpl.bubbleItemNoSuggestions);Function.defer(function(){I.html(H.tmpl.bubbleList.supplant({items:L.join('')})).off('click').on('click',H.selectors.bubbleItem,function(){if(m(this).hasClass(H.classNames.bubbleNoSuggestions))return;var M=F.find('span[data-id="'+K.attr('data-id')+'"]');m(M[0]).replaceWith(m(this).text());if(M.length>1)M.slice(1).detach();I.bubble('hide');}).bubble('hide').bubble('show',G).bubble('absolute',J.clientX,J.clientY+G.offset().top+60);});J.preventDefault();});a.ljspell.toggle(a.ljspell.enabled);});a.ljspell={id:0,enabled:false,toggle:function(F){this.enabled=F;if(!this.enabled)a.ljspell.removeHighlight();jQuery('.cke_button_'+D).toggleClass('active',F);},getWordRanges:function(F){var G=[];this.finder.searchRange=u(1,B);this.finder.matchRange=null;while((range=this.finder.find(F,false,false,false))!==false)G.push(range);return G;},highlightWord:function(F){if(!this.enabled)return;var G=this;E.save();var H=s._.definition.attributes;H['data-word']=F;this.getWordRanges(F).forEach(function(I){H['data-id']=G.id++;I.highlight();});E.restore();},removeHighlight:function(F){E.save();m('span[data-incorrect]',B.document.getBody().$).each(function(G,H){jQuery(H).replaceWith(jQuery(H).html());});E.restore();this.id=0;}};B.dataProcessor.htmlFilter.addRules({elements:{span:function(F){if(F.attributes['data-incorrect']||F.attributes['data-id']){delete F.name;var G=F.children[0];if(G)G.value=G.value.replace(/\&nbsp;/,' ');return F;}}}});a.ljspell.finder=t(B);B.on('change',function(F){z(m(F.editor.document.getBody().$).text(),function(G){a.ljspell.removeHighlight();m.extend(v,G);for(var H in v)a.ljspell.highlightWord(H);});});B.addCommand(D,{exec:function(F){a.ljspell.toggle(!a.ljspell.enabled);},editorFocus:false});B.ui.addButton(D,{command:D});}});var v={},w=false,x={},y=null;function z(B,C){if(y)clearTimeout(y);y=setTimeout(function(){var D={},E=B.replace(/\&nbsp;/ig,' ').match(/[a-zа-яё]+/gi),F;
+if(!E)return;for(F=0;F<E.length;F++)D[E[F]]=1;var G=Object.keys(x);for(F=0;F<G.length;F++){if(D[G[F]])delete D[G[F]];}for(F=0;F<E.length;F++)x[E[F].toLowerCase()]=1;m.ajax({url:LiveJournal.getAjaxUrl('spellcheck'),type:'POST',dataType:'json',data:{html:Object.keys(D).join(' ')},success:function(H){C(H.words);m.extend(A,H.words);}});},1000);};var A={};})(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,"');...
 (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