From 915c18a5422d77b0692bac2db7791f3d673ccaed Mon Sep 17 00:00:00 2001 From: "woltlab.com" Date: Sat, 20 May 2017 21:46:48 +0200 Subject: [PATCH] Updating minified JavaScript files --- .../install/files/js/3rdParty/redactor2/plugins/combined.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js index 5eb8a46534..6c8e172aa0 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js @@ -19,7 +19,7 @@ $.Redactor.prototype.WoltLabCaret=function(){"use strict";return{init:function() // WoltLabClean.js $.Redactor.prototype.WoltLabClean=function(){"use strict";return{init:function(){var e=this.clean.onSet;this.clean.onSet=function(t){t=t.replace(/\u200B/g,""),t=t.replace(/&/g,"@@@WCF_AMPERSAND@@@"),t=e.call(this,t),t=t.replace(/@@@WCF_AMPERSAND@@@/g,"&");var n=elCreate("div");return n.innerHTML=t,elBySelAll("iframe",n,elRemove),elBySelAll("pre",n,function(e){e.classList.contains("redactor-script-tag")&&elRemove(e)}),elBySelAll("td",n,function(e){0===e.childNodes.length&&(e.innerHTML="​")}),t=n.innerHTML}.bind(this);var t=this.clean.onSync;this.clean.onSync=function(e){var n=elCreate("div");n.innerHTML=e;var r={};return elBySelAll("pre",n,function(e){var t=WCF.getUUID();r[t]=e.textContent,e.textContent=t}),elBySelAll("p",n,function(e){var t=e.lastElementChild;if(t&&"BR"===t.nodeName&&t.nextSibling&&t.nextSibling.textContent.replace(/[\r\n\t]/g,"").match(/^\u200B+$/)){var n=elCreate("p");n.innerHTML="
",e.parentNode.insertBefore(n,e.nextSibling),e.removeChild(t.nextSibling),e.removeChild(t)}}),e=n.innerHTML,e=e.replace(/

\u200B<\/p>/g,"


"),e=e.replace(/&/g,"@@@WCF_AMPERSAND@@@"),e=t.call(this,e),e=e.replace(/@@@WCF_AMPERSAND@@@/g,"&"),n.innerHTML=e,elBySelAll("pre",n,function(e){r.hasOwnProperty(e.textContent)&&(e.textContent=r[e.textContent])}),e=n.innerHTML}.bind(this);var n=this.clean.savePreFormatting;this.clean.savePreFormatting=function(e){var t=this.clean.encodeEntities;return this.clean.encodeEntities=function(e){return WCF.String.escapeHTML(e)},e=n.call(this,e),this.clean.encodeEntities=t,e}.bind(this);var r=this.clean.onPaste;this.clean.onPaste=function(e,t,n){if(t.pre||this.utils.isCurrentOrParent("kbd")){var l=this.clean.removeEmptyInlineTags;return this.clean.removeEmptyInlineTags=function(e){return e},e=r.call(this,e,t,n),this.clean.removeEmptyInlineTags=l,e}var i=elCreate("div");i.innerHTML=e.replace(/@@@WOLTLAB-P-ALIGN-(?:left|right|center|justify)@@@/g,"");var a,o,s,c=!0;for(o=0,s=i.childElementCount;s>o;o++){if(a=i.children[o],"DIV"!==a.nodeName||0===a.childNodes.length){c=!1;break}if(1===a.childNodes.length&&1===a.childElementCount){var h=a.children[0];if(0===h.childNodes.length&&"BR"!==h.nodeName){c=!1;break}}}if(c){var d=[];for(o=0,s=i.childElementCount;s>o;o++)d.push(i.children[o]);d.forEach(function(e){var t=elCreate("p");for(i.insertBefore(t,e);e.childNodes.length>0;)t.appendChild(e.childNodes[0]);i.removeChild(e)})}var u,f,p,m,g=elBySelAll("[style]",i);for(o=0,s=g.length;s>o;o++){a=g[o],f=[];for(var v=0,b=a.style.length;b>v;v++)u=a.style[v],-1===this.opts.woltlab.allowedInlineStyles.indexOf(u)&&("font-weight"===u&&(m=a.style.getPropertyValue(u),("bold"===m||"bolder"===m)&&(m=600),m=~~m,m>500&&(p=elCreate("strong"),a.parentNode.insertBefore(p,a),p.appendChild(a))),f.push(u));f.forEach(function(e){a.style.removeProperty(e)})}return elBySelAll("span",i,function(e){if(!e.hasAttribute("style")||!e.style.length){for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)}}),elBySelAll("p",i,function(e){e.classList.contains("MsoNormal")?1===e.childElementCount&&"O:P"===e.children[0].nodeName&&" "===e.textContent&&(e.innerHTML="
"):e.className.match(/\btext-(left|right|center|justify)\b/)&&e.insertBefore(document.createTextNode("@@@WOLTLAB-P-ALIGN-"+RegExp.$1+"@@@"),e.firstChild),e.removeAttribute("class"),e.removeAttribute("style")}),elBySelAll("img",i,function(e){e.removeAttribute("style")}),elBySelAll("br",i,function(e){e.parentNode.insertBefore(document.createTextNode("@@@WOLTLAB-BR-MARKER@@@"),e.nextSibling)}),e=r.call(this,i.innerHTML,t,n),e=e.replace(/@@@WOLTLAB-BR-MARKER@@@/g,""),e=e.replace(/(

)?\s*@@@WOLTLAB-P-ALIGN-(left|right|center|justify)@@@/g,function(e,t,n){return t?'

':""}),i.innerHTML=e.replace(/&quot;/g,"""),elBySelAll("woltlab-br-marker",i,function(e){var t=e.parentNode;if("P"===t.nodeName){var n=elCreate("p");for(n.innerHTML="
";e.nextSibling;)n.appendChild(e.nextSibling);var r=e.previousSibling;r&&"BR"===r.nodeName&&elRemove(r),t.parentNode.insertBefore(n,t.nextSibling)}else t.insertBefore(elCreate("br"),e);elRemove(e)}),elBySelAll("p",i,function(e){var t=!1;0===e.childNodes.length?t=!0:""===e.textContent&&(t=!0,elBySelAll("*",e,function(e){"SPAN"!==e.nodeName&&(t=!1)})),t&&elRemove(e)}),i.innerHTML}.bind(this);var l=[],i=function(e,t){for(var n,r,i={},a=0,o=t.length;o>a;a++)n=t[a],r=elAttr(e,n),"style"===n&&0===e.style.length&&0===r.indexOf("font-family")&&(r=r.replace(/"/g,"")),i[n]=r;l.push({element:e,attributes:i})},a=this.clean.convertTags;this.clean.convertTags=function(e,t){var n=elCreate("div");n.innerHTML=e,l=[],WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","convertTags_"+this.$element[0].id,{addToStorage:i,div:n}),elBySelAll("span",n,function(e){i(e,["style"])}),l.forEach(function(e,t){var n=e.element,r=n.parentNode;for(r.insertBefore(document.createTextNode("###custom"+t+"###"),n),r.insertBefore(document.createTextNode("###/custom"+t+"###"),n.nextSibling);n.childNodes.length;)r.insertBefore(n.childNodes[0],n);r.removeChild(n)});var r=!1;t.links&&this.opts.pasteLinks&&(elBySelAll("a",n,function(e){e.href&&(e.outerHTML='##%a href="'+e.href+'"%##'+e.innerHTML+"##%/a%##")}),r=!0,t.links=!1);var o=!1;return t.images&&this.opts.pasteImages&&(elBySelAll("img",n,function(e){if(e.src){for(var t,n='##%img src="'+e.src+'"',r=0,l=e.attributes.length;l>r;r++)t=e.attributes.item(r),"src"!==t.name&&(n+=" "+t.name+'="'+t.value+'"');e.outerHTML=n+"%##"}}),o=!0,t.images=!1),e=a.call(this,n.innerHTML,t),o&&(t.images=!0),r&&(t.links=!0),e}.bind(this);var o=this.clean.reconvertTags;this.clean.reconvertTags=function(e,t){if(l.length){e=e.replace(/###(\/?)custom(\d+)###/g,'<$1woltlab-custom-tag data-index="$2">');var n=elCreate("div");n.innerHTML=e,elBySelAll("woltlab-custom-tag",n,function(e){var t=~~elData(e,"index");if(l[t]){var n=l[t],r=elCreate(n.element.nodeName);for(var i in n.attributes)n.attributes.hasOwnProperty(i)&&elAttr(r,i,n.attributes[i]);for(e.parentNode.insertBefore(r,e);e.childNodes.length;)r.appendChild(e.childNodes[0])}elRemove(e)}),e=n.innerHTML}return o.call(this,e,t)}.bind(this),this.clean.removeSpans=function(e){return e};var s=this.clean.getCurrentType;this.clean.getCurrentType=function(e,t){var n=s.call(this,e,t);return this.utils.isCurrentOrParent(["kbd"])&&(n.inline=!1,n.block=!1,n.encode=!0,n.pre=!0,n.paragraphize=!1,n.images=!1,n.links=!1),n}.bind(this)}}}; // WoltLabCode.js -$.Redactor.prototype.WoltLabCode=function(){"use strict";return{init:function(){require(["WoltLabSuite/Core/Ui/Redactor/Code"],function(t){new t(this)}.bind(this));var t=this.code.start;this.code.start=function(i){t.call(this,i),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","codeStart_"+this.$element[0].id)}.bind(this);var i=this.code.set;this.code.set=function(t,e){i.call(this,t,e),this.utils.isEmpty()&&this.observe.toolbar()}.bind(this)}}}; +$.Redactor.prototype.WoltLabCode=function(){"use strict";return{init:function(){require(["WoltLabSuite/Core/Ui/Redactor/Code"],function(t){new t(this)}.bind(this));var t=this.code.start;this.code.start=function(i){t.call(this,i),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","codeStart_"+this.$element[0].id)}.bind(this);var i=this.code.set;this.code.set=function(t,e){i.call(this,t,e),this.utils.isEmpty()&&this.observe.toolbar()}.bind(this);var e=this.code.get;this.code.get=function(){return this.code.html=!1,this.code.startSync(this.core.editor().html()),e.call(this)}.bind(this)}}}; // WoltLabColor.js $.Redactor.prototype.WoltLabColor=function(){"use strict";var o=["000000","800000","8B4513","2F4F4F","008080","000080","4B0082","696969","B22222","A52A2A","DAA520","006400","40E0D0","0000CD","800080","808080","FF0000","FF8C00","FFD700","008000","00FFFF","0000FF","EE82EE","A9A9A9","FFA07A","FFA500","FFFF00","00FF00","AFEEEE","ADD8E6","DDA0DD","D3D3D3","FFF0F5","FAEBD7","FFFFE0","F0FFF0","F0FFFF","F0F8FF","E6E6FA","FFFFFF"];return{init:function(){for(var t,e=this.WoltLabColor.setColor.bind(this),r={},F=0,i=o.length;i>F;F++)t=o[F],r["color_"+t]={title:"#"+t,func:e};r.removeColor={title:this.lang.get("remove-color"),func:this.WoltLabColor.removeColor.bind(this)};var s=this.button.add("woltlabColor","");this.button.addDropdown(s,r);var l=s.data("dropdown");l.find("a").each(function(o,t){t.className.match(/redactor-dropdown-color_([A-F0-9]{6})/)&&(t.style.setProperty("color","#"+RegExp.$1,""),t.parentNode.classList.add("woltlab-color-selection"))}),$('

').insertBefore(l.children("li").last())},setColor:function(o){o=o.replace(/^color_/,""),this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(t){this.buffer.set(),t.format(this.$editor[0],"color","#"+o),this.buffer.set()}.bind(this)),this.selection.restore()},removeColor:function(){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(o){this.buffer.set(),o.removeFormat(this.$editor[0],"color"),this.buffer.set()}.bind(this)),this.selection.restore()}}}; // WoltLabDragAndDrop.js -- 2.20.1