INNER CODE UNIT · Python

rect

yaojingang/GEOFlow · scripts/audit-admin-ui-v3-navigation.py:27

    const rect = (selector) => {
        const element = document.querySelector(selector);
        if (!element) return null;
        const bounds = element.getBoundingClientRect();
        return { x: bounds.x, width: bounds.width };
    };
    const sample = () => {
        window.__gfFrames.push({
            state: document.documentElement.getAttribute('data-gf-sidebar-state'),
            sidebar: rect('.gf-sidebar'),
            shellBody: rect('.gf-shell__body'),
        });
        count += 1;
        if (count < 40) requestAnimationFrame(sample);
    };
    requestAnimationFrame(sample);
})();
"""

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…