spacevillain (spacevillain) wrote in changelog,
spacevillain
spacevillain
changelog

[livejournal] r23302: LJSUP-14249: Problem with add lj-cut

Committer: atyurin
LJSUP-14249: Problem with add lj-cut
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-11-14 08:11:44 UTC (rev 23301)
+++ trunk/htdocs/js/ck/ckeditor-dev.js	2012-11-14 08:48:34 UTC (rev 23302)
@@ -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){'use strict';var n=/opera/i.test(navigator.userAgent);j.addExternal('ljcolor','plugins/lj/ljcolor/plugin.js');j.addExternal('ljlink','plugins/lj/ljlink/plugin.js');j.addExternal('ljfont','plugins/lj/ljfont/plugin.js');j.addExternal('ljcut2','plugins/lj/ljcut/plugin.js');j.addExternal('ljuser2','plugins/lj/ljuser/plugin.js');j.addExternal('ljautogrow','plugins/lj/ljautogrow/plugin.js');var o=[Site.page.ljpost?'livejournal':'livejournal_old','ljcolor','ljlink'],p=['ajax','basicstyles','bidi','blockquote','button','colorbutton','colordialog','enterkey','entities','format','htmldataprocessor','keystrokes','list','liststyle','pastefromword','specialchar','tab','table','toolbar','undo','wysiwygarea','onchange'];if(Site.page.ljpost){o.push('ljautogrow');o.push('ljspell');o.push('ljfont','ljcut2','ljuser2');}else p.push('dialog','image','link','font');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=o.join(',');
-else Array.prototype.push.apply(p,o);m.plugins=p.join(',');m.contentsLangDirection='ltr';m.fillEmptyBlocks=false;m.tabIndex=41;m.tabSpaces=2;m.startupShowBorders=false;m.toolbarCanCollapse=false;m.disableNativeSpellChecker=Site.page.ljpost?true:false;var q=[];function r(s,t){return s?t:undefined;};if(Site.page.ljpost)q=['Bold','Italic','Underline','Strike','LJFont','LJColor','-','LJLink2','LJUser2','-','LJImage',r(Site.media_embed_enabled,'LJEmbedLink'),'LJCut2','LJSpoiler','LJMap','LJLike','LJPollLink','NumberedList','BulletedList','LJJustifyLeft','LJJustifyCenter','LJJustifyRight','LJSpell','Undo','Redo'];else q=['Bold','Italic','Underline','Strike','TextColor','FontSize','-','LJLink','LJUserLink','image',r(Site.media_embed_enabled,'LJEmbedLink'),'LJPollLink','LJCutLink','LJCut','LJLike','LJSpoiler','-','UnorderedList','OrderedList','NumberedList','BulletedList','-','LJJustifyLeft','LJJustifyCenter','LJJustifyRight','-','Undo','Redo'];m.toolbar_Full=[q.filter(function(s){return s;})];m.enterMode=2;m.shiftEnterMode=1;m.keystrokes=[[2228224+121,'contextMenu'],[1114112+90,'undo'],[1114112+89,'redo'],[1114112+2228224+90,'redo'],[1114112+76,'LJLink2'],[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.LJFontDefault='normal';m.LJFontStyle={element:'span',styles:{'font-size':'#(size)'},overrides:[{element:'font',attributes:{size:null}}]};m.LJFontSize={tiny:'0.7em',small:'0.9em',normal:'1.0em',large:'1.4em',huge:'1.8em'};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){'use strict';j.addExternal('ljcolor','plugins/lj/ljcolor/plugin.js');j.addExternal('ljlink','plugins/lj/ljlink/plugin.js');j.addExternal('ljfont','plugins/lj/ljfont/plugin.js');j.addExternal('ljcut2','plugins/lj/ljcut/plugin.js');j.addExternal('ljuser2','plugins/lj/ljuser/plugin.js');j.addExternal('ljautogrow','plugins/lj/ljautogrow/plugin.js');var n=[Site.page.ljpost?'livejournal':'livejournal_old','ljcolor','ljlink'],o=['ajax','basicstyles','bidi','blockquote','button','colorbutton','colordialog','enterkey','entities','format','htmldataprocessor','keystrokes','list','liststyle','pastefromword','specialchar','tab','table','toolbar','undo','wysiwygarea','onchange'];if(Site.page.ljpost)n.push('ljautogrow','ljspell','ljfont','ljcut2','ljuser2');else o.push('dialog','image','link','font');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;m.bodyClass='lj-main-body';}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(',');m.contentsLangDirection='ltr';m.fillEmptyBlocks=false;m.tabIndex=41;m.tabSpaces=2;m.startupShowBorders=false;m.toolbarCanCollapse=false;m.disableNativeSpellChecker=Site.page.ljpost?true:false;var p=[];function q(r,s){return r?s:undefined;};if(Site.page.ljpost)p=['Bold','Italic','Underline','Strike','LJFont','LJColor','-','LJLink2','LJUser2','-','LJImage',q(Site.media_embed_enabled,'LJEmbedLink'),'LJCut2','LJSpoiler','LJMap','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,'LJLink2'],[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.LJFontDefault='normal';m.LJFontStyle={element:'span',styles:{'font-size':'#(size)'},overrides:[{element:'font',attributes:{size:null}}]};m.LJFontSize={tiny:'0.7em',small:'0.9em',normal:'1.0em',large:'1.4em',huge:'1.8em'};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-11-14 08:11:44 UTC (rev 23301)
+++ trunk/htdocs/js/ck/ckeditor.js	2012-11-14 08:48:34 UTC (rev 23302)
@@ -3,7 +3,7 @@
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
-(function(){window.CKEDITOR_BASEPATH='/js/ck/';if(window.CKEDITOR&&window.CKEDITOR.dom)return;if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'50a113598',version:'3.6.2',revision:'7275',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f<e.length;f++){var g=e[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(g){d=g[1];break;}}}if(d.indexOf(':/')==-1)if(d.indexOf('/')===0)d=location.href.match(/^.*?:\/\/[^\/]*/)[0]+d;else d=location.href.match(/^[^\?]*\/(?:)/)[0]+d;if(!d)throw 'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return d;})(),getUrl:function(d){if(d.indexOf(':/')==-1&&d.indexOf('/')!==0)d=this.basePath+d;if(this.timestamp&&d.charAt(d.length-1)!='/'&&!/[&?]t=/.test(d))d+=(d.indexOf('?')>=0?'&':'?')+'t='+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})();var a=CKEDITOR;if(!a.event){a.event=function(){};a.event.implementOn=function(b){var c=a.event.prototype;for(var d in c){if(b[d]==undefined)b[d]=c[d];}};a.event.prototype=(function(){var b=function(d){var e=d.getPrivate&&d.getPrivate()||d._||(d._={});return e.events||(e.events={});},c=function(d){this.name=d;this.listeners=[];};c.prototype={getListenerIndex:function(d){for(var e=0,f=this.listeners;e<f.length;e++){if(f[e].fn==d)return e;}return-1;}};return{on:function(d,e,f,g,h){var i=b(this),j=i[d]||(i[d]=new c(d));if(j.getListenerIndex(e)<0){var k=j.listeners;if(!f)f=this;if(isNaN(h))h=10;var l=this,m=function(o,p,q,r){var s={name:d,sender:this,editor:o,data:p,listenerData:g,stop:q,cancel:r,removeListener:function(){l.removeListener(d,e);}};e.call(f,s);return s.data;};m.fn=e;m.priority=h;for(var n=k.length-1;n>=0;n--){if(k[n].priority<=h){k.splice(n+1,0,m);return;}}k.unshift(m);}},fire:(function(){var d=false,e=function(){d=true;},f=false,g=function(){f=true;};return function(h,i,j){var k=b(this)[h],l=d,m=f;d=f=false;if(k){var n=k.listeners;if(n.length){n=n.slice(0);for(var o=0;o<n.length;o++){var p=n[o].call(this,j,i,e,g);if(typeof p!='undefined')i=p;if(d||f)break;}}}var q=f||(typeof i=='undefined'?false:i);d=l;f=m;return q;};})(),fireOnce:function(d,e,f){var g=this.fire(d,e,f);delete b(this)[d];return g;},removeListener:function(d,e){var f=b(this)[d];if(f){var g=f.getListenerIndex(e);
+(function(){window.CKEDITOR_BASEPATH='/js/ck/';if(window.CKEDITOR&&window.CKEDITOR.dom)return;if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'B8DJ5M3',version:'3.6.2',revision:'7275',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f<e.length;f++){var g=e[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(g){d=g[1];break;}}}if(d.indexOf(':/')==-1)if(d.indexOf('/')===0)d=location.href.match(/^.*?:\/\/[^\/]*/)[0]+d;else d=location.href.match(/^[^\?]*\/(?:)/)[0]+d;if(!d)throw 'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return d;})(),getUrl:function(d){if(d.indexOf(':/')==-1&&d.indexOf('/')!==0)d=this.basePath+d;if(this.timestamp&&d.charAt(d.length-1)!='/'&&!/[&?]t=/.test(d))d+=(d.indexOf('?')>=0?'&':'?')+'t='+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})();var a=CKEDITOR;if(!a.event){a.event=function(){};a.event.implementOn=function(b){var c=a.event.prototype;for(var d in c){if(b[d]==undefined)b[d]=c[d];}};a.event.prototype=(function(){var b=function(d){var e=d.getPrivate&&d.getPrivate()||d._||(d._={});return e.events||(e.events={});},c=function(d){this.name=d;this.listeners=[];};c.prototype={getListenerIndex:function(d){for(var e=0,f=this.listeners;e<f.length;e++){if(f[e].fn==d)return e;}return-1;}};return{on:function(d,e,f,g,h){var i=b(this),j=i[d]||(i[d]=new c(d));if(j.getListenerIndex(e)<0){var k=j.listeners;if(!f)f=this;if(isNaN(h))h=10;var l=this,m=function(o,p,q,r){var s={name:d,sender:this,editor:o,data:p,listenerData:g,stop:q,cancel:r,removeListener:function(){l.removeListener(d,e);}};e.call(f,s);return s.data;};m.fn=e;m.priority=h;for(var n=k.length-1;n>=0;n--){if(k[n].priority<=h){k.splice(n+1,0,m);return;}}k.unshift(m);}},fire:(function(){var d=false,e=function(){d=true;},f=false,g=function(){f=true;};return function(h,i,j){var k=b(this)[h],l=d,m=f;d=f=false;if(k){var n=k.listeners;if(n.length){n=n.slice(0);for(var o=0;o<n.length;o++){var p=n[o].call(this,j,i,e,g);if(typeof p!='undefined')i=p;if(d||f)break;}}}var q=f||(typeof i=='undefined'?false:i);d=l;f=m;return q;};})(),fireOnce:function(d,e,f){var g=this.fire(d,e,f);delete b(this)[d];return g;},removeListener:function(d,e){var f=b(this)[d];if(f){var g=f.getListenerIndex(e);
 if(g>=0)f.listeners.splice(g,1);}},hasListeners:function(d){var e=b(this)[d];return e&&e.listeners.length>0;}};})();}if(!a.editor){a.ELEMENT_MODE_NONE=0;a.ELEMENT_MODE_REPLACE=1;a.ELEMENT_MODE_APPENDTO=2;a.editor=function(b,c,d,e){var f=this;f._={instanceConfig:b,element:c,data:e};f.elementMode=d||0;a.event.call(f);f._init();};a.editor.replace=function(b,c){var d=b;if(typeof d!='object'){d=document.getElementById(b);if(d&&d.tagName.toLowerCase() in {style:1,script:1,base:1,link:1,meta:1,title:1})d=null;if(!d){var e=0,f=document.getElementsByName(b);while((d=f[e++])&&d.tagName.toLowerCase()!='textarea'){}}if(!d)throw '[CKEDITOR.editor.replace] The element with id or name "'+b+'" was not found.';}d.style.visibility='hidden';return new a.editor(c,d,1);};a.editor.appendTo=function(b,c,d){var e=b;if(typeof e!='object'){e=document.getElementById(b);if(!e)throw '[CKEDITOR.editor.appendTo] The element with id "'+b+'" was not found.';}return new a.editor(c,e,2,d);};a.editor.prototype={_init:function(){var b=a.editor._pending||(a.editor._pending=[]);b.push(this);},fire:function(b,c){return a.event.prototype.fire.call(this,b,c,this);},fireOnce:function(b,c){return a.event.prototype.fireOnce.call(this,b,c,this);}};a.event.implementOn(a.editor.prototype,true);}if(!a.env)a.env=(function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,d={ie:/*@cc_on!@*/false,opera:!!c&&c.version,webkit:b.indexOf(' applewebkit/')>-1,air:b.indexOf(' adobeair/')>-1,mac:b.indexOf('macintosh')>-1,quirks:document.compatMode=='BackCompat',mobile:b.indexOf('mobile')>-1,iOS:/(ipad|iphone|ipod)/.test(b),isCustomDomain:function(){if(!this.ie)return false;var g=document.domain,h=window.location.hostname;return g!=h&&g!='['+h+']';},secure:location.protocol=='https:'};d.gecko=navigator.product=='Gecko'&&!d.webkit&&!d.opera;var e=0;if(d.ie){e=parseFloat(b.match(/msie (\d+)/)[1]);d.ie8=!!document.documentMode;d.ie8Compat=document.documentMode==8;d.ie9Compat=document.documentMode==9;d.ie7Compat=e==7&&!document.documentMode||document.documentMode==7;d.ie6Compat=e<7||d.quirks;}if(d.gecko){var f=b.match(/rv:([\d\.]+)/);if(f){f=f[1].split('.');e=f[0]*10000+(f[1]||0)*100+ +(f[2]||0);}}if(d.opera)e=parseFloat(c.version());if(d.air)e=parseFloat(b.match(/ adobeair\/(\d+)/)[1]);if(d.webkit)e=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]);d.version=e;d.isCompatible=d.iOS&&e>=534||!d.mobile&&(d.ie&&e>=6||d.gecko&&e>=10801||d.opera&&e>=9.5||d.air&&e>=1||d.webkit&&e>=522||false);d.cssClass='cke_browser_'+(d.ie?'ie':d.gecko?'gecko':d.opera?'opera':d.webkit?'webkit':'unknown');
 if(d.quirks)d.cssClass+=' cke_browser_quirks';if(d.ie){d.cssClass+=' cke_browser_ie'+(d.version<7?'6':d.version>=8?document.documentMode:'7');if(d.quirks)d.cssClass+=' cke_browser_iequirks';}if(d.gecko&&e<10900)d.cssClass+=' cke_browser_gecko18';if(d.air)d.cssClass+=' cke_browser_air';return d;})();var b=a.env;var c=b.ie;if(a.status=='unloaded')(function(){a.event.implementOn(a);a.loadFullCore=function(){if(a.status!='basic_ready'){a.loadFullCore._load=1;return;}delete a.loadFullCore;var e=document.createElement('script');e.type='text/javascript';e.src=a.basePath+'ckeditor.js';document.getElementsByTagName('head')[0].appendChild(e);};a.loadFullCoreTimeout=0;a.replaceClass='ckeditor';a.replaceByClassEnabled=1;var d=function(e,f,g,h){if(b.isCompatible){if(a.loadFullCore)a.loadFullCore();var i=g(e,f,h);a.add(i);return i;}return null;};a.replace=function(e,f){return d(e,f,a.editor.replace);};a.appendTo=function(e,f,g){return d(e,f,a.editor.appendTo,g);};a.add=function(e){var f=this._.pending||(this._.pending=[]);f.push(e);};a.replaceAll=function(){var e=document.getElementsByTagName('textarea');for(var f=0;f<e.length;f++){var g=null,h=e[f];if(!h.name&&!h.id)continue;if(typeof arguments[0]=='string'){var i=new RegExp('(?:^|\\s)'+arguments[0]+'(?:$|\\s)');if(!i.test(h.className))continue;}else if(typeof arguments[0]=='function'){g={};if(arguments[0](h,g)===false)continue;}this.replace(h,g);}};(function(){var e=function(){var f=a.loadFullCore,g=a.loadFullCoreTimeout;if(a.replaceByClassEnabled)a.replaceAll(a.replaceClass);a.status='basic_ready';if(f&&f._load)f();else if(g)setTimeout(function(){if(a.loadFullCore)a.loadFullCore();},g*1000);};if(window.addEventListener)window.addEventListener('load',e,false);else if(window.attachEvent)window.attachEvent('onload',e);})();a.status='basic_loaded';})();a.dom={};var d=a.dom;(function(){var e=[];a.on('reset',function(){e=[];});a.tools={arrayCompare:function(f,g){if(!f&&!g)return true;if(!f||!g||f.length!=g.length)return false;for(var h=0;h<f.length;h++){if(f[h]!=g[h])return false;}return true;},clone:function(f){var g;if(f&&f instanceof Array){g=[];for(var h=0;h<f.length;h++)g[h]=this.clone(f[h]);return g;}if(f===null||typeof f!='object'||f instanceof String||f instanceof Number||f instanceof Boolean||f instanceof Date||f instanceof RegExp)return f;g=new f.constructor();for(var i in f){var j=f[i];g[i]=this.clone(j);}return g;},capitalize:function(f){return f.charAt(0).toUpperCase()+f.substring(1).toLowerCase();},extend:function(f){var g=arguments.length,h,i;
 if(typeof (h=arguments[g-1])=='boolean')g--;else if(typeof (h=arguments[g-2])=='boolean'){i=arguments[g-1];g-=2;}for(var j=1;j<g;j++){var k=arguments[j];for(var l in k){if(h===true||f[l]==undefined)if(!i||l in i)f[l]=k[l];}}return f;},prototypedCopy:function(f){var g=function(){};g.prototype=f;return new g();},isArray:function(f){return!!f&&f instanceof Array;},isEmpty:function(f){for(var g in f){if(f.hasOwnProperty(g))return false;}return true;},cssStyleToDomStyle:(function(){var f=document.createElement('div').style,g=typeof f.cssFloat!='undefined'?'cssFloat':typeof f.styleFloat!='undefined'?'styleFloat':'float';return function(h){if(h=='float')return g;else return h.replace(/-./g,function(i){return i.substr(1).toUpperCase();});};})(),buildStyleHtml:function(f){f=[].concat(f);var g,h=[];for(var i=0;i<f.length;i++){g=f[i];if(/@import|[{}]/.test(g))h.push('<style>'+g+'</style>');else h.push('<link type="text/css" rel=stylesheet href="'+g+'">');}return h.join('');},htmlEncode:function(f){var g=function(k){var l=new d.element('span');l.setText(k);return l.getHtml();},h=g('\n').toLowerCase()=='<br>'?function(k){return g(k).replace(/<br>/gi,'\n');}:g,i=g('>')=='>'?function(k){return h(k).replace(/>/g,'&gt;');}:h,j=g('  ')=='&nbsp; '?function(k){return i(k).replace(/&nbsp;/g,' ');}:i;this.htmlEncode=j;return this.htmlEncode(f);},htmlEncodeAttr:function(f){return f.replace(/"/g,'&quot;').replace(/</g,'&lt;').replace(/>/g,'&gt;');},getNextNumber:(function(){var f=0;return function(){return++f;};})(),getNextId:function(){return 'cke_'+this.getNextNumber();},override:function(f,g){return g(f);},setTimeout:function(f,g,h,i,j){if(!j)j=window;if(!h)h=j;return j.setTimeout(function(){if(i)f.apply(h,[].concat(i));else f.apply(h);},g||0);},trim:(function(){var f=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(g){return g.replace(f,'');};})(),ltrim:(function(){var f=/^[ \t\n\r]+/g;return function(g){return g.replace(f,'');};})(),rtrim:(function(){var f=/[ \t\n\r]+$/g;return function(g){return g.replace(f,'');};})(),indexOf:Array.prototype.indexOf?function(f,g){return f.indexOf(g);}:function(f,g){for(var h=0,i=f.length;h<i;h++){if(f[h]===g)return h;}return-1;},bind:function(f,g){return function(){return f.apply(g,arguments);};},createClass:function(f){var g=f.$,h=f.base,i=f.privates||f._,j=f.proto,k=f.statics;if(i){var l=g;g=function(){var p=this;var m=p._||(p._={});for(var n in i){var o=i[n];m[n]=typeof o=='function'?a.tools.bind(o,p):o;}l.apply(p,arguments);};}if(h){g.prototype=this.prototypedCopy(h.prototype);
@@ -136,7 +136,7 @@
 });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(){a.editor.prototype.lightSetData=function(v){this.document.getBody().setHtml(this.dataProcessor.toHtml(v));this.fire('contentDom');};a.editor.prototype.insertCaret=function(){this.focus();var v=this.getSelection(),w=v&&v.getRanges()[0];if(!w||!w.collapsed)return false;var x=new h('span');x.setAttribute('id','__rte_focus');x.setText('|');w.insertNode(x);};a.editor.prototype.moveFocus=function(v){var w=this;this.focus();setTimeout(function(){var x=w.getSelection(),y=x&&x.getRanges(),z=y&&y[0].startContainer,A=z&&z.getParents(true);if(!z)return;if(v==='end'){z=A[A.length-2].getFirst();if(!z)return;for(;;){var B=z.getNext();if(B==null)break;z=B;}x.selectElement(z);y=x.getRanges();y[0].collapse(false);x.selectRanges(y);}if(v==='start'){var C=new d.range(w.document);C.selectNodeContents(w.document.getBody());
 C.collapse(true);x.selectRanges([C]);}},100);};a.editor.prototype.isFocusAt=function(v){var w=this.getSelection(),x=w.getRanges()[0],y=this.document.getBody();if(v==='end'&&x.checkEndOfBlock())if(y.equals(x.endContainer)||y.getLast().equals(x.endContainer))return true;if(v==='start')throw new Error('Not implemented');return false;};a.editor.prototype.isSelectionCollapsed=function(){var v=this.getSelection(),w=v&&v.getRanges()[0];if(w)return!!w.collapsed;return false;};var m=a.lang[a.lang.detect()]||{};jQuery.extend(m,LJ.pageVar('rtedata'));window.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(v,w,x){x=x||{};x&&jQuery.extend(x,{fromDoubleClick:this.execFromEditor});LiveJournal.run_hook('rteButton',w,jQuery('.cke_button_'+v),x);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:{},LJCut2:{}},s={};
 function t(v){var w,x,y,z,A=document.createElement('lj-note'),B=typeof document.body.style.opacity!='string',C=(function(){var F=60,G=100,H=G*F/1000,I=[],J,K=document.getElementById('draft-container')||document.body;function L(){var M=I.shift(),N=(J?M.time/G:-(M.time/G-1)).toFixed(1);if(!I.length)N=J?1:0;if(B)A.style.filter=N>=1?null:'progid:DXImageTransform.Microsoft.Alpha(opacity='+N*100+')';else A.style.opacity=N;if(N==0&&A&&A.parentNode)A.parentNode.removeChild(A);};return function(M){J=M;if(J&&A.parentNode){if(B)A.style.filter=null;else A.style.opacity=1;}else for(var N=1;N<=H;N++){var O=Math.floor(1000/F)*N;I.push({time:O,timer:setTimeout(L,O)});}K.appendChild(A);A.style.marginTop=-A.offsetHeight/2+'px';A.style.marginLeft=-A.offsetWidth/2+'px';};})();A.className='note-popup';A.onmouseout=function(){if(!y||!y.cmd){}};A.onmouseover=function(){if(w&&!x){x=1;w=clearTimeout(w);}};if(B)A.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity=0)';else A.style.opacity=0;function D(){var F=this.getAttribute('lj-cmd');if(y.hasOwnProperty(F)){r[F].node=y[F].node;var G=new d.selection(v.document);G.selectElement(r[F].node);v.execFromEditor=true;v.execCommand(F);}return false;};function E(){if(!window.switchedRteOn){}if(x){y=z;z=null;var F='';for(var G in y){if(y.hasOwnProperty(G))F+='<div class="noteItem">'+y[G].content+'</div>';}A.innerHTML=decodeURIComponent(F);var H=A.getElementsByTagName('a');for(var I=0,J=H.length;I<J;I++){var K=H[I];if(r.hasOwnProperty(K.getAttribute('lj-cmd')))K.onclick=D;}}else y=null;C(x);w=null;};a.note={show:function(F,G){if(!G&&F==z||!window.switchedRteOn)return;if(w)w=clearTimeout(w);x=1;z=F;G===true?E():w=setTimeout(E,1000);},hide:function(F){if(x){x=0;if(w)w=clearTimeout(w);if(A.parentNode)F===true?E():w=setTimeout(E,500);}}};};var u=f;u.$block['lj-template']=1;u.$block['lj-raw']=1;u.$block['lj-cut']=1;u.$block['lj-spoiler']=1;u.$block['lj-poll']=1;u.$block['lj-repost']=1;u.$block['lj-pq']=1;u.$block['lj-pi']=1;u.$nonEditable['lj-template']=1;u.$empty['lj-random']=1;u['lj-template']={};u['lj-map']={};u['lj-repost']={};u['lj-raw']=u.div;u['lj-poll']={'lj-pq':1};u['lj-pq']={'#':1,'lj-pi':1};u['lj-pi']={'#':1};['a','b','em','i','img','strong','u','lj-user'].forEach(function(v){u['lj-pq'][v]=1;u['lj-pi'][v]=1;});u.$block.iframe=u.$inline.iframe;delete u.$inline.iframe;e.extend(u['lj-cut']={},u.$block);e.extend(u['lj-spoiler']={},u.$block);e.extend(u['lj-cut'],u.$inline);e.extend(u['lj-spoiler'],u.$inline);e.extend(u.div,u.$block);
-e.extend(u.$body,u.$block);delete u['lj-cut']['lj-cut'];f.p.iframe=1;f['lj-cut'].iframe=1;f['lj-spoiler'].iframe=1;j.add('livejournal',{init:function(v){v.rteButton=p;function w(D){var E=D.data.element||D.data.getTarget();if(E.type!=1)E=E.getParent();while(E){var F=E.getAttribute('lj-cmd');if(r.hasOwnProperty(F)){var G=v.getCommand(F);if(G.state==1){var H=new d.selection(v.document);r[F].node=E.is('body')?new h.get(E.getWindow().$.frameElement):E;H.selectElement(r[F].node);D.data.dialog='';v.execFromEditor=true;v.execCommand(F,true);break;}}E=E.getParent();}};function x(D){var E=this;if(E.$!=v.document.$){E.$.className=(E.frame.getAttribute('lj-class')||'')+' lj-selected';if(E.getAttribute('lj-cmd')=='LJPollLink')E.frame.setStyle('height',E.getDocument().$.body.scrollHeight+'px');v.focus();new d.selection(v.document).selectElement(E.frame);}D.data.getKey()==1&&D.data.preventDefault();};function y(D){if(D.data.getKey()==46){var E=new d.selection(v.document).getRanges(),F=E.length;while(F--)E[F].deleteContents();}};function z(){var G=this;var D=G.$.contentWindow,E=D.document,F=new h.get(E.body);if(F.on&&!Site.page.disabled_input){F.on('dblclick',w);F.on('click',x);F.on('keyup',y);if(G.getAttribute('lj-cmd')=='LJPollLink'&&G.hasAttribute('style'))E.body.className='lj-poll lj-poll-open';}E=new h.get(E);E.frame=F.frame=G;};function A(){var D=v.document.getElementsByTag('iframe'),E=D.count(),F,G,H,I,J;v.execFromEditor=false;while(E--){F=D.getItem(E),G=F.getAttribute('lj-cmd'),H=F.$.contentWindow,I=H.document,J=F.getAttribute('lj-style')||'';if(F.getAttribute('data-update')==='false')continue;F.removeListener('load',z);F.on('load',z);I.open();I.write('<!DOCTYPE html><html style="'+J+'">'+'<head><link rel="stylesheet" href="'+a.styleText+'" /></head>'+'<body scroll="no" class="'+(F.getAttribute('lj-class')||'')+'" style="'+J+'" '+(G?'lj-cmd="'+G+'"':'')+'>'+decodeURIComponent(F.getAttribute('lj-content')||'')+'</body>'+'</html>');I.close();}};v.updateFrames=A;function B(D){if(v.onSwitch===true){delete v.onSwitch;return;}var E,F=D.name=='click',G=D.name=='selectionChange'||F,H=D.data.element||D.data.getTarget(),I,J;if(F&&(D.data.getKey()==1||D.data.$.button==0))D.data.preventDefault();if(H.type!=1)H=H.getParent();I=H;if(G){var K=v.document.getElementsByTag('iframe'),L,M;if(F&&I.is('iframe')){M=I.$.contentWindow.document.body;M.className=(I.getAttribute('lj-class')||'')+' lj-selected';if(I.getAttribute('lj-cmd')=='LJPollLink')I.setStyle('height',M.scrollHeight+'px');
+e.extend(u.$body,u.$block);delete u['lj-cut']['lj-cut'];f.p.iframe=1;f['lj-cut'].iframe=1;f['lj-spoiler'].iframe=1;j.add('livejournal',{init:function(v){v.rteButton=p;function w(D){var E=D.data.element||D.data.getTarget();if(E.type!=1)E=E.getParent();while(E){var F=E.getAttribute('lj-cmd');if(r.hasOwnProperty(F)){var G=v.getCommand(F);if(G.state==1){var H=new d.selection(v.document);r[F].node=E.is('body')?new h.get(E.getWindow().$.frameElement):E;H.selectElement(r[F].node);D.data.dialog='';v.execFromEditor=true;v.execCommand(F,true);break;}}E=E.getParent();}};function x(D){var E=this;if(E.$!=v.document.$){E.$.className=(E.frame.getAttribute('lj-class')||'')+' lj-selected';if(E.getAttribute('lj-cmd')=='LJPollLink')E.frame.setStyle('height',E.getDocument().$.body.scrollHeight+'px');v.focus();new d.selection(v.document).selectElement(E.frame);}D.data.getKey()==1&&D.data.preventDefault();};function y(D){if(D.data.getKey()==46){var E=new d.selection(v.document).getRanges(),F=E.length;while(F--)E[F].deleteContents();}};function z(){var G=this;var D=G.$.contentWindow,E=D.document,F=new h.get(E.body);if(F.on&&!Site.page.disabled_input){F.on('dblclick',w);F.on('click',x);F.on('keyup',y);if(G.getAttribute('lj-cmd')=='LJPollLink'&&G.hasAttribute('style'))E.body.className='lj-poll lj-poll-open';}E=new h.get(E);E.frame=F.frame=G;};function A(){console.log('Update frames');var D=v.document.getElementsByTag('iframe'),E=D.count(),F,G,H,I,J;v.execFromEditor=false;while(E--){F=D.getItem(E),G=F.getAttribute('lj-cmd'),H=F.$.contentWindow,I=H.document,J=F.getAttribute('lj-style')||'';if(F.getAttribute('data-update')==='false')continue;F.removeListener('load',z);F.on('load',z);I.open();I.write('<!DOCTYPE html><html style="'+J+'">'+'<head><link rel="stylesheet" href="'+a.styleText+'" /></head>'+'<body scroll="no" class="'+(F.getAttribute('lj-class')||'')+'" style="'+J+'" '+(G?'lj-cmd="'+G+'"':'')+'>'+decodeURIComponent(F.getAttribute('lj-content')||'')+'</body>'+'</html>');I.close();}};v.updateFrames=A;function B(D){if(v.onSwitch===true){delete v.onSwitch;return;}var E,F=D.name=='click',G=D.name=='selectionChange'||F,H=D.data.element||D.data.getTarget(),I,J;if(F&&(D.data.getKey()==1||D.data.$.button==0))D.data.preventDefault();if(H.type!=1)H=H.getParent();I=H;if(G){var K=v.document.getElementsByTag('iframe'),L,M;if(F&&I.is('iframe')){M=I.$.contentWindow.document.body;M.className=(I.getAttribute('lj-class')||'')+' lj-selected';if(I.getAttribute('lj-cmd')=='LJPollLink')I.setStyle('height',M.scrollHeight+'px');
 }for(var N=0,O=K.count();N<O;N++){L=K.getItem(N);if(L.$!=I.$){M=L.$.contentWindow.document.body;M.className=L.getAttribute('lj-class')||'';if(L.getAttribute('lj-cmd')=='LJPollLink'&&M.className.indexOf('lj-poll')!=-1)L.removeAttribute('style');}}}do{var P=I.getAttribute('lj-cmd');if(!P&&I.type==1){var Q=I.getParent();if(I.is('img')&&!I.hasAttribute('data-user')&&Q.getParent()&&!Q.getParent().hasAttribute('data-user')){P='LJImage';console.log('ii');I.setAttribute('lj-cmd',P);}else if(I.is('a')&&!I.hasAttribute('data-user')&&!Q.hasAttribute('lj:user')){P='LJLink2';I.setAttribute('lj-cmd',P);}}if(P&&r.hasOwnProperty(P)){if(G){r[P].node=I;v.getCommand(P).setState(1);}(E||(E={}))[P]={content:r[P].html,node:I};}}while(I=I.getParent());var R;if(G)for(J in r){if(r.hasOwnProperty(J)&&(!E||!E.hasOwnProperty(J))){delete r[J].node;R=v.getCommand(J);if(R)R.setState(2);}}};(function(){function D(M){return M.slice(-2)=='/>'?M:M.slice(0,-1)+'/>';};function E(M){var N=new Poll(M),O="<div class='lj-poll-inner lj-rtebox-inner'>"+N.outputHTML()+'</div>';return '<iframe class="lj-poll-wrap lj-rtebox" lj-class="lj-poll" frameborder="0" lj-cmd="LJPollLink" allowTransparency="true" lj-data="'+N.outputLJtags()+'" lj-content="'+O+'"></iframe>';};function F(M,N){var O="<div class='lj-poll-inner lj-rtebox-inner'>Poll id: "+N+'</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(M)+'" lj-content="'+O+'" data-disabledPoll="true"></iframe>';};function G(M,N,O){var P="<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(O)+'"'+N+'lj-content="'+P+'"></iframe>';};function H(M,N,O,P){return N+O.replace(/\n/g,'')+P;};function I(M,N,O,P){var Q=N||O||m.LJRepost_Value,R=P.replace(/"/g,'&quot;');P=R+('<br /><input type="button" value="'+Q+'" />').replace(/"/g,'&quot;');return '<iframe class="lj-repost-wrap" lj-class="lj-repost" frameborder="0" allowTransparency="true" lj-text="'+R+'" lj-button="'+Q+'" lj-content="'+P+'"></iframe>';};function J(M,N){var O,P,Q=0;do{if(!O)O=N.call(M,Q)===false;if(!O&&(P=M.firstChild))Q++;else if(P=M.nextSibling)O=false;else{P=M.parentNode;Q--;O=true;}M=P;}while(Q>0);};function K(M,N){return M.replace(/<(.|\n)*?>/g,function(O){var P=O;if(P.indexOf(N)!==-1){P=P.replace(N,'');return P+N;
 }else return O;});};function L(M,N,O){return[M.slice(0,N),O,M.slice(N)].join('');};v.on('contentDom',function(M){var N=this,O=M.editor.document.getById('__focus');if(O){this._domBuilt=true;setTimeout(function(){M.editor.focus();var P=M.editor.getSelection();if(P){var Q=new d.range(M.editor.document);Q.setEndAfter(O);P.selectRanges([Q]);}O.remove();},this._domBuilt?0:100);}});v.dataProcessor.toHtml=function(M,N){var O=Site.page.__htmlLast;if(M&&M.length>0&&typeof O==='number')M=K(L(M,O,n),n).replace(n,o);M=M.replace(/<lj [^>]*?>/gi,D).replace(/<lj-map [^>]*?>/gi,D).replace(/<lj-template[^>]*?>/gi,D).replace(/(<lj-cut[^>]*?)\/>/gi,'$1>').replace(/<((?!br)[^\s>]+)([^>]*?)\/>/gi,'<$1$2></$1>').replace(/<lj-poll.*?>[\s\S]*?<\/lj-poll>/gi,E).replace(/<lj-poll-([0-9]+)>/gi,F).replace(/<lj-repost\s*(?:button\s*=\s*(?:"([^"]*?)")|(?:"([^']*?)"))?.*?>([\s\S]*?)<\/lj-repost>/gi,I).replace(/<lj-embed(.*?)>([\s\S]*?)<\/lj-embed>/gi,G);M=M.replace(/<table[^>]*>((.|\n)*?)<\/table>/i,function(P){var Q=document.createElement('span');Q.innerHTML=P;J(Q,function(){var R=this;if(R.nodeType===3)if(R.parentNode.nodeName.toLowerCase()!=='td')R.nodeValue=R.nodeValue.replace(/\n/ig,'');});return Q.innerHTML;});if(!$('event_format').checked){M=M.replace(/(<lj-raw.*?>)([\s\S]*?)(<\/lj-raw>)/gi,H);M=M.replace(/\n/g,'<br/>');}M=a.htmlDataProcessor.prototype.toHtml.call(this,M,N);if(c)M='<xml:namespace ns="livejournal" prefix="lj" />'+M;return M;};})();v.dataProcessor.toDataFormat=function(D,E){D=a.htmlDataProcessor.prototype.toDataFormat.call(this,D,E);if(!$('event_format').checked)D=D.replace(/<br\s*\/>/gi,'\n');return D.replace(/\t/g,' ');};v.dataProcessor.writer.indentationChars='';v.dataProcessor.writer.lineBreakChars='';v.on('selectionChange',B);v.on('doubleclick',w);v.on('afterCommandExec',A);v.on('dialogHide',A);v.on('dataReady',function(){if(c){v.document.getBody().on('dragend',A);v.document.getBody().on('paste',function(){setTimeout(A,0);});}if(!Site.page.disabled_input){v.document.on('click',B);v.document.on('mouseover',B);v.document.getBody().on('keyup',y);A();}});(function(){var D='LJFont',E=v.config,F=false,G={},H='normal',I=E.LJFontDefault,J=E.LJFontSize,K=E.LJFontStyle,L='b-fontsize-select-item-active',M,N,O,P,Q=jQuery();for(P in J){G[P]=new a.style(K,{size:J[P]});G[P]._.definition.name=P;}function R(S){I=S;Q.removeClass(L).filter('.b-fontsize-select-item-'+I).addClass(L);};v.addCommand(D,{exec:function(S){S.rteButton(D,'font');if(!F){Q=jQuery('.b-fontsize-select-item');LiveJournal.register_hook('font_response',function(U){S.focus();
 S.fire('saveSnapshot');var V=G[U],W,X,Y;if(I===U)V.remove(S.document);else{X=S.getSelection();Y=parseFloat(V._.definition.styles['font-size']);for(W in G)G[W].remove(S.document);V.apply(S.document);}S.fire('saveSnapshot');});F=true;var T=S.getCommand(D);T.setState(1);R(I);}}});v.ui.addButton(D,{label:m[D],command:D});v.on('selectionChange',function(S){var T=S.data.path,U=T.elements,V=v.getCommand(D),W,X,Y;for(W=0;W<U.length;W++){X=U[W];for(Y in G){if(G[Y].checkElementRemovable(X,true)){if(Y!==I){R(Y);V.setState(1);}return;}}}R(H);V.setState(2);});})();(function(){var D='LJImage',E=null;LiveJournal.register_hook('editpic_response',function(F){var G=E,H=G&&G.getParent();if(!G)return;if(F.url){G.setAttribute('src',F.url);G.setAttribute('data-cke-saved-src',F.url);}else{if(H&&H.getName()==='a')H.remove();else G.remove();return;}if(F.width)G.setAttribute('width',F.width);else G.removeAttribute('width');if(F.height)G.setAttribute('height',F.height);else G.removeAttribute('height');if(F.title)G.setAttribute('title',F.title);else G.removeAttribute('title');if(F.border)G.setStyle('border-width',F.border+'px');else{G.removeStyle('border-width');G.removeStyle('border-style');}if(F.vspace)G.setStyles({'margin-top':F.vspace+'px','margin-bottom':F.vspace+'px'});else{G.removeStyle('margin-top');G.removeStyle('margin-bottom');}if(F.hspace)G.setStyles({'margin-left':F.hspace+'px','margin-right':F.hspace+'px'});else{G.removeStyle('margin-left');G.removeStyle('margin-right');}var H=G&&G.getParent();if(F.link){F.link=F.link.replace(/^[\s\t]*(?:http:\/\/)?/,'http://');if(H&&H.getName()==='a'){H.setAttribute('href',F.link);H.setAttribute('data-cke-saved-href',F.link);if(F.blank)H.setAttribute('target','_blank');else H.removeAttribute('target');}else{var I=new h('a',v.document);I.setAttribute('href',F.link);if(F.blank)I.setAttribute('target','_blank');G.insertBeforeMe(I);I.append(G);v.getSelection()&&v.getSelection().selectElement(I);}}else if(H.getName()==='a'){H.insertBeforeMe(G);H.remove();}if(F.aligment&&F.aligment!=='none')G.setStyle('float',F.aligment);else G.removeStyle('float');E=null;});v.addCommand(D,{exec:function(F,G){var H=F.getSelection();H=H?H.getSelectedElement():null;E=H;if(H){var I=H&&H.getParent(),J=I.getName()==='a',K=J&&I,L=J&&I.getAttribute('href'),M={};if('naturalWidth' in H.$){M.width=H.$.naturalWidth;M.height=H.$.naturalHeight;}else{var N=new Image();N.src=H.$.src;M={width:N.width,height:N.height};}F.rteButton(D,'editpic',{picData:{url:H.getAttribute('src'),title:H.getAttribute('title'),width:H.getAttribute('width')||H.$.width,height:H.getAttribute('height')||H.$.height,defaultWidth:M.width,defaultHeight:M.height,link:L||'',blank:J?!!K.getAttribute('target'):true,border:parseInt(H.getStyle('border-width'),10),vspace:parseInt(H.getStyle('margin-top'),10),hspace:parseInt(H.getStyle('margin-left'),10),aligment:H.getStyle('float')||'none'}});
@@ -157,8 +157,8 @@
 if(E=D.match(n))if(emailProtection=='encode')D=D.replace(u,function(aa,ab,ac){return 'mailto:'+String.fromCharCode.apply(String,ab.split(','))+(ac&&unescapeSingleQuote(ac));});else if(emailProtection)D.replace(v,function(aa,ab,ac){if(ab==compiledProtectionFunction.name){I.type='email';var ad=I.email={},ae=/[^,\s]+/g,af=/(^')|('$)/g,ag=ac.match(ae),ah=ag.length,ai,aj;for(var ak=0;ak<ah;ak++){aj=decodeURIComponent(unescapeSingleQuote(ag[ak].replace(af,'')));ai=compiledProtectionFunction.params[ak].toLowerCase();ad[ai]=aj;}ad.address=[ad.name,ad.domain].join('@');}});if(!I.type)if(G=D.match(r)){I.type='anchor';I.anchor={};I.anchor.name=I.anchor.id=G[1];}else if(F=D.match(o)){var J=D.match(p),K=D.match(q);I.type='email';var L=I.email={};L.address=F[1];J&&(L.subject=decodeURIComponent(J[1]));K&&(L.body=decodeURIComponent(K[1]));}else if(D&&(H=D.match(s))){I.type='url';I.url={};I.url.protocol=H[1];I.url.url=H[2];}else I.type='url';if(C){var M=C.getAttribute('target');I.target={};I.adv={};if(!M){var N=C.data('cke-pa-onclick')||C.getAttribute('onclick'),O=N&&N.match(w);if(O){I.target.type='popup';I.target.name=O[1];var P;while(P=x.exec(O[2])){if((P[2]=='yes'||P[2]=='1')&&!(P[1] in {height:1,width:1,top:1,left:1}))I.target[P[1]]=true;else if(isFinite(P[2]))I.target[P[1]]=P[2];}}}else{var Q=M.match(t);if(Q)I.target.type=I.target.name=M;else{I.target.type='frame';I.target.name=M;}}var R=this,S=function(aa,ab){var ac=C.getAttribute(ab);if(ac!==null)I.adv[aa]=ac||'';};S('advId','id');S('advLangDir','dir');S('advAccessKey','accessKey');I.adv.advName=C.data('cke-saved-name')||C.getAttribute('name')||'';S('advLangCode','lang');S('advTabIndex','tabindex');S('advTitle','title');S('advContentType','type');j.link.synAnchorSelector?I.adv.advCSSClasses=getLinkClass(C):S('advCSSClasses','class');S('advCharset','charset');S('advStyles','style');S('advRel','rel');}var T=I.anchors=[],U;if(j.link.emptyAnchorFix){var V=B.document.getElementsByTag('a');for(i=0,count=V.count();i<count;i++){U=V.getItem(i);if(U.data('cke-saved-name')||U.hasAttribute('name'))T.push({name:U.data('cke-saved-name')||U.getAttribute('name'),id:U.getAttribute('id')});}}else{var W=new d.nodeList(B.document.$.anchors);for(var X=0,Y=W.count();X<Y;X++){U=W.getItem(X);T[X]={name:U.getAttribute('name'),id:U.getAttribute('id')};}}if(j.link.fakeAnchor){var Z=B.document.getElementsByTag('img');for(X=0,Y=Z.count();X<Y;X++){if(U=j.link.tryRestoreFakeAnchor(B,Z.getItem(X)))T.push({name:U.getAttribute('name'),id:U.getAttribute('id')});
 }}this.selectedElement=C;return I;};LiveJournal.register_hook('link_response',function(B){var K=this;var C=B.url,D=B.target||'';if(C.length===0){m.execCommand('unlink');delete K.selectedElement;return;}if(!C.match(/^[a-z+]+:(\/\/)?/))C='http://'+C;var E={};E['data-cke-saved-href']=C;E.href=C;if(D)E.target=D;if(!K.selectedElement){var F=new h('a'),G=m.getSelection();F.setAttributes({'data-cke-saved-href':C,href:C});if(D)F.setAttribute('target',D);F.setText(z||C);m.insertElement(F);}else{var H=K.selectedElement,I=H.data('cke-saved-href'),J=H.getHtml();if(!E[D])H.removeAttribute('target');H.setAttributes(E);delete K.selectedElement;}});var z;LiveJournal.register_hook('link_hide',function(B){if(this.selectedElement)delete this.selectedElement;z='';});var A='LJLink2';m.addCommand(A,{exec:function(B){var C=B.getSelection(),D={},E=null;z=C.getSelectedText();if((E=j.link.getSelectedLink(B))&&E.hasAttribute('href'))C.selectElement(E);else E=null;var F='';if(E){var G=y(B,E).url;F=(G.protocol||'http://')+G.url;}D.defaultText=F;D.hasSelectedText=!!E;D.editMode=!!E;if(E)D.hasTarget=E.hasAttribute('target')?true:false;B.rteButton(A,'link',D);},editorFocus:false});m.ui.addButton(A,{label:m.lang.link.toolbar,command:A});},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=...
 (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