Skip to content

Instantly share code, notes, and snippets.

@Habetdin
Created July 6, 2022 19:41
Show Gist options
  • Save Habetdin/cd596d183c6aa7c222e9540fe1928db6 to your computer and use it in GitHub Desktop.
Save Habetdin/cd596d183c6aa7c222e9540fe1928db6 to your computer and use it in GitHub Desktop.
Steam Summer Sale 2022 Quest Helper
// ==UserScript==
// @author Habetdin
// @name [Steam] Find CL.0R/TH.4X
// @version 2022
// @include https://store.steampowered.com/*
// @run-at document-end
// ==/UserScript==
(function() {
'use strict';
let found = null;
function zaLoopA() {
if (found === null) {
let poop = document.querySelectorAll('.ImpressionTrackedElement');
console.log('Searching CL.0R/TH.4X in ' + poop.length + ' items');
for(let i = 0, n = poop.length; i < n; ++i) {
if (/(CL.0R|TH.4X)/.test(poop[i].innerText)) {
found = poop[i];
console.log('Found CL.0R/TH.4X');
}
}
} else {
found.style.outline = '10px solid lime';
found.scrollIntoView({block: 'center', behavior: 'smooth'});
}
}
setInterval(() => zaLoopA(), 1000);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment