Skip to content

Instantly share code, notes, and snippets.

@vanowm
vanowm / gist:837e9de8d76a63e1bca2dd31c826e37f
Created December 29, 2023 01:34
Epic games transactions counter
// Snippet to run at https://www.epicgames.com/account/transactions?lang=en-US&productName=egs&historyType=PAYMENT_HISTORY
{
let count = 0, elTitle = document.getElementById("transaction-history-view-title"), title = elTitle.textContent,
loop = page => fetch("https://www.epicgames.com/account/v2/payment/ajaxGetOrderHistory?nextPageToken=" + page).then(data => data.json()).then(data =>
{
elTitle.textContent = title + " (" + (count += data.orders.length) + ")";
data.nextPageToken && loop(data.nextPageToken, count, elTitle, title);
});
loop();
}
@vanowm
vanowm / index.html
Last active April 6, 2022 12:50
Collapsed console.trace() ( https://stackoverflow.com/q/71766903 )
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'self'">
<script src="renderer.js"></script>
</head>
</html>
@vanowm
vanowm / index.html
Last active April 6, 2022 12:52
Electron console.trace() doesn't show all traces (https://stackoverflow.com/questions/71720061)
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
</head>
</html>
@vanowm
vanowm / index.html
Last active January 22, 2021 03:10
mainWindow.setIcon() doesn't work when executed while window is in "attention" state (https://github.com/electron/electron/issues/27321)
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
<link rel="stylesheet" type="text/css" href="./styles.css">
</head>
<body>
<h1>Hello World!</h1>
<!-- All of the Node.js APIs are available in this renderer process. -->