MCPcopy Create free account
hub / github.com/NsLearning/LangHelper / zoom

Function zoom

ChatGPT/src-tauri/src/scripts/core.js:146–159  ·  view source on GitHub ↗
(callback)

Source from the content-addressed store, hash-verified

144 zoomTipDom.id = 'ZoomTopTip';
145 document.body.appendChild(zoomTipDom);
146 function zoom(callback) {
147 if (window.zoomSetTimeout) clearTimeout(window.zoomSetTimeout);
148 const htmlZoom = window.localStorage.getItem("htmlZoom") || "100%";
149 const html = document.getElementsByTagName("html")[0];
150 const zoom = callback(htmlZoom);
151 html.style.zoom = zoom;
152 window.localStorage.setItem("htmlZoom", zoom);
153 zoomTipDom.innerHTML = zoom;
154 zoomTipDom.style.display = 'block';
155 zoomTipDom.classList.remove('ZoomTopTipAni');
156 window.zoomSetTimeout = setTimeout(() => {
157 zoomTipDom.classList.add('ZoomTopTipAni');
158 }, 2500);
159 }
160 function zoomDefault() {
161 const htmlZoom = window.localStorage.getItem("htmlZoom");
162 if (htmlZoom) {

Callers 3

zoomInFunction · 0.85
zoomOutFunction · 0.85
zoom0Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected