CoreFiles by mySites.guru
resize.min.js1 lines, 1,332 bytes, from Joomla_4.0.0-rc1-Release_Candidate-Full_Package.zip
Raw History Compare with 3.10.12-rc1
md5
9ee8b4202307aff127dcf738c04e4ade
sha1
32c45b9fd20e36efc1d81025bf8fe89f946353c6
sha256
e394d04e0fda4fc27041e1532f03bc3a615a63cdacce75dcc462096e317bfac6
Joomla=window.Joomla||{},Joomla.MediaManager=Joomla.MediaManager||{},Joomla.MediaManager.Edit=Joomla.MediaManager.Edit||{},(()=>{const e=(e,t)=>{const a=document.getElementById("image-source"),n=document.createElement("canvas");n.width=e,n.height=t,n.getContext("2d").drawImage(a,0,0,e,t);const i="jpg"===Joomla.MediaManager.Edit.original.extension?"jpeg":Joomla.MediaManager.Edit.original.extension,o=document.getElementById("jform_resize_quality").value;Joomla.MediaManager.Edit.current.contents=n.toDataURL(`image/${i}`,o);const d=document.getElementById("image-preview");d.width=e,d.height=t,d.src=Joomla.MediaManager.Edit.current.contents,document.getElementById("jform_resize_width").value=parseInt(e,10),document.getElementById("jform_resize_height").value=parseInt(t,10),window.dispatchEvent(new Event("mediaManager.history.point"))};Joomla.MediaManager.Edit.resize={Activate(t){setTimeout((()=>{const t=document.getElementById("image-source"),a=document.getElementById("jform_resize_width"),n=document.getElementById("jform_resize_height");a.value=t.width,n.value=t.height,a.addEventListener("change",(({target:a})=>{e(parseInt(a.value,10),parseInt(a.value,10)/(t.width/t.height))})),n.addEventListener("change",(({target:a})=>{e(parseInt(a.value,10)*(t.width/t.height),parseInt(a.value,10))}))}),1e3)},Deactivate(){}}})();

The same content is in 4 releases, Joomla 4.0.0-rc1 to 4.0.0-rc4. See them all, or every version of this file.