From 5df525e0310f9064e604f00381e11652af8f638e Mon Sep 17 00:00:00 2001 From: WoltLab Date: Mon, 21 Dec 2020 13:54:52 +0000 Subject: [PATCH] Updating minified JavaScript files --- .../files/js/3rdParty/redactor2/redactor.combined.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/redactor.combined.min.js b/wcfsetup/install/files/js/3rdParty/redactor2/redactor.combined.min.js index 1abf7e557b..88cd472e16 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/redactor.combined.min.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/redactor.combined.min.js @@ -100,7 +100,7 @@ (function (window, undefined) { $.Redactor.prototype.WoltLabSize=function(){"use strict";return{init:function(){for(var e,t=[8,10,12,14,18,24,36],i=this.WoltLabSize.setSize.bind(this),o={},s=0,r=t.length;s').insertBefore(a.children("li").last())},setSize:function(t){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(e){this.buffer.set(),e.format(this.$editor[0],"font-size",t.replace(/^size_/,"")+"pt"),this.buffer.set()}.bind(this)),this.selection.restore()},removeSize:function(){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(e){this.buffer.set(),e.removeFormat(this.$editor[0],"font-size"),this.buffer.set()}.bind(this)),this.selection.restore()}}}; })(this); // plugins/WoltLabSmiley.js -(function (window, undefined) { undefined })(this); +(function (window, undefined) { $.Redactor.prototype.WoltLabSmiley=function(){"use strict";var c=0;return{init:function(){require(["EventHandler"],function(e){e.add("com.woltlab.wcf.redactor2","insertSmiley_"+this.$element[0].id,this.WoltLabSmiley._insert.bind(this))}.bind(this))},_insert:function(e){var t,i,o,n,r,d;this.WoltLabSource.isActive()||(this.buffer.set(),t="wscSmiley_"+this.uuid+"_"+c++,(i=e.img.cloneNode()).id=t,this.insert.html(i.outerHTML),(i=elById(t)).removeAttribute("id"),(o=i.nextSibling)&&o.nodeType===Node.TEXT_NODE&&"​"===o.textContent&&o.remove(),i.parentNode.insertBefore(document.createTextNode(" "),i),n=document.createTextNode(" "),i.parentNode.insertBefore(n,i.nextSibling),i.outerHTML=i.outerHTML,r=window.getSelection(),(d=document.createRange()).selectNode(n),d.collapse(!1),r.removeAllRanges(),r.addRange(d),this.WoltLabCaret.forceSelectionSave())}}}; })(this); // plugins/WoltLabSource.js (function (window, undefined) { $.Redactor.prototype.WoltLabSource=function(){"use strict";return{init:function(){function i(e){elBySelAll("woltlab-quote",e,function(e){var t;2!==e.childElementCount||"P"!==e.children[0].nodeName||"P"!==e.children[1].nodeName||""===(t=e.children[0]).innerHTML.trim()&&"
"===e.children[1].innerHTML.trim()&&e.removeChild(t)})}var l=this.$element[0].id;var n=this.source.hide;this.source.hide=function(){var e,t=$("
").html(this.source.$textarea.val());e=t[0],elBySelAll(".icon, .fa",e,function(e){var t=(t=e.className.split(" ")).filter(function(e){return"fa"!==e&&"icon"!==e&&(!e.match(/^icon\d{2}$/)&&!e.match(/^fa-[a-z\-]+$/))});e.className=t.join(" "),""===e.className.trim()&&""===e.innerHTML&&elRemove(e)}),this.source.$textarea.val(t[0].innerHTML),n.call(this),setTimeout(function(){this.focus.end(),i(this.core.editor()[0])}.bind(this),100),this.placeholder.enable()}.bind(this);var o=this.source.$textarea[0];this.$element[0].parentNode.insertBefore(o,this.$element[0]);var a=this.source.show;this.source.show=function(){var e=this.$editor[0].offsetHeight,t=this.code.get();a.call(this),this.source.$textarea.val(t.replace(/ /g," ")),o.style.setProperty("height",Math.ceil(e)+"px",""),o.style.setProperty("display","block","");var n,r=elCreate("div");r.innerHTML=o.value,i(r),n=r,elBySelAll("pre, woltlab-quote, woltlab-spoiler",n,function(e){e.removeAttribute("data-title")}),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","source_stripIntermediateCode_"+l,{div:n}),o.value=this.WoltLabSource.format(r.innerHTML),o.selectionStart=o.selectionEnd=o.value.length}.bind(this),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","validate_"+l,function(e){o.clientHeight&&(e.api.throwError(this.$element[0],WCF.Language.get("wcf.editor.source.error.active")),e.valid=!1)}.bind(this))},isActive:function(){return"none"===this.$editor[0].style.getPropertyValue("display")},format:function(e){var t=["ul","ol","li","table","tbody","thead","tr","td","th"];this.block.tags.forEach(function(e){t.push(e)}),t=t.join("|").toLowerCase();for(var n,r=["p","li","td","th"],i="[^'\">]*(?:(?:\"[^\"]*\"|'[^']*')[^'\">]*)*",l=[],o=(e=(e=(e=(e=(e=(e=(e=e.replace(new RegExp("[\\s\\S]*?","g"),function(e){return l.push(e),"@@@WCF_PRE_BACKUP_"+(l.length-1)+"@@@"})).replace(new RegExp("\\s*\\s*","g"),function(e,t){return(-1===r.indexOf(t)?"\n":"")+""})).replace(new RegExp("\\s*<("+t+")("+i+")>\\s*","g"),function(e,t,n){return"\n<"+t+n+">"+(-1===r.indexOf(t)?"\n":"")})).replace(new RegExp("(<(?:"+t+")(?:"+i+")>\n)\n+(?=<(?:"+t+")(?:"+i+")>)","g"),"$1")).replace(/]*)>\n\t*\n(\t*)

\n$2\\s*","g"),"<$1$2>\n")).replace(/(<\/[ou]l>)<\/li>/g,"$1\n")).split(/\n/),a=0,c=new RegExp("^<("+t+")"),s=new RegExp("^$"),h=!1,u=0,d=o.length;u/g,"")).trim()}}}; })(this); -- 2.20.1