Skip to content

Instantly share code, notes, and snippets.

@arnav-t
Created September 8, 2021 14:38
Show Gist options
  • Save arnav-t/bb3f1177c135c1ba069bd87eeb78d34d to your computer and use it in GitHub Desktop.
Save arnav-t/bb3f1177c135c1ba069bd87eeb78d34d to your computer and use it in GitHub Desktop.
Blur Codeforces tags
// ==UserScript==
// @name Codeforces Hide Problemset Tags
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Hide tags unless hovered over
// @author arnav-t
// @match https://codeforces.com/problemset*
// @icon https://www.google.com/s2/favicons?domain=codeforces.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
const links = document.querySelectorAll('a.notice');
for (let a of links) {
if (a.href.startsWith('https://codeforces.com/problemset?tags=')) {
a.style.filter = 'blur(4px)';
a.addEventListener('mouseover', () => a.style.filter = 'blur(0px)', false);
a.addEventListener('mouseout', () => a.style.filter = 'blur(4px)', false);
}
}
const tags = document.querySelectorAll('span.tag-box');
for (let span of tags) {
span.style.filter = 'blur(4px)';
span.addEventListener('mouseover', () => span.style.filter = 'blur(0px)', false);
span.addEventListener('mouseout', () => span.style.filter = 'blur(4px)', false);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment