remove useless code

This commit is contained in:
Ashley 2023-05-15 16:30:02 +00:00
parent 464c2b37e8
commit 5784318de5

View file

@ -45,31 +45,5 @@ if (window.location.hostname === "poketube.fun" && config.plausible_enabled == t
}
}
const setFont = () => {
const poketubeFlexFont = 'Poketube Flex';
const gintoNordFont = 'Ginto Nord';
const gintoNordWidth = '1000px';
const elements = document.getElementsByTagName('*');
for (let i = 0; i < elements.length; i++) {
const style = window.getComputedStyle(elements[i]);
const font = style.getPropertyValue('font-family');
const width = style.getPropertyValue('width');
if (font === poketubeFlexFont && width === gintoNordWidth) {
elements[i].style.fontFamily = gintoNordFont;
}
}
};
const userAgent = window.navigator.userAgent;
const isWindows10OrNewer = /Windows NT 10/.test(userAgent);
const isOlderWindows = /Windows NT [6-8]\./.test(userAgent);
if (isOlderWindows && !isWindows10OrNewer) {
setFont();
}
// @license-end