Skip to content

Instantly share code, notes, and snippets.

@crashmax-dev
Created December 19, 2025 16:45
Show Gist options
  • Select an option

  • Save crashmax-dev/2530e07d45d5617cb0aee2f6446b71a2 to your computer and use it in GitHub Desktop.

Select an option

Save crashmax-dev/2530e07d45d5617cb0aee2f6446b71a2 to your computer and use it in GitHub Desktop.
Global Variables
// ==UserScript==
// @name Global Variables
// @version 2025-12-19
// @author crashmax
// @match *://*/*
// @grant none
// @run-at document-body
// ==/UserScript==
function getMemoryInfo() {
if (!performance.memory) return 'N/A';
const used = (performance.memory.usedJSHeapSize / 1048576).toFixed(1);
const total = (performance.memory.totalJSHeapSize / 1048576).toFixed(1);
return `${used}/${total} МБ`;
}
window.getMemoryInfo = getMemoryInfo;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment