first commit
This commit is contained in:
1
media/com_contenthistory/js/admin-compare-compare.min.js
vendored
Normal file
1
media/com_contenthistory/js/admin-compare-compare.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(()=>{const e=(e,n)=>{const t=n.nextElementSibling,o=window.Diff.diffWords(e.innerHTML,n.innerHTML),d=document.createDocumentFragment();o.forEach((e=>{let n="";e.added&&(n="#a6f3a6"),e.removed&&(n="#f8cbcb");const t=document.createElement("span");t.style.backgroundColor=n,t.style.borderRadius=".2rem",t.appendChild(document.createTextNode((e=>{const n=document.createElement("textarea");return n.innerHTML=Joomla.sanitizeHtml(e),n.value})(e.value))),d.appendChild(t)})),t.appendChild(d)},n=()=>{[].slice.call(document.querySelectorAll(".original")).forEach((n=>{e(n,n.nextElementSibling)})),document.removeEventListener("DOMContentLoaded",n)};document.addEventListener("DOMContentLoaded",n)})();
|
||||
Reference in New Issue
Block a user