MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / updateSize

Function updateSize

scripts/magnify_image.js:903–913  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

901 const desc = toolbar.querySelector(".ufs-desc");
902
903 function updateSize() {
904 if (img.naturalWidth && img.naturalHeight) {
905 let resolution = getResolutionCategory(
906 img.naturalWidth,
907 img.naturalHeight
908 );
909 sizeEle.innerText =
910 `${img.naturalWidth} x ${img.naturalHeight}` +
911 (resolution ? ` ~ ${resolution}` : "");
912 }
913 }
914
915 function updateZoom() {
916 if (img.naturalWidth && img.naturalHeight) {

Callers 1

createPreviewFunction · 0.85

Calls 1

getResolutionCategoryFunction · 0.85

Tested by

no test coverage detected