document.documentElement.className += 'night-mode';
document.documentElement.classList.add('night-mode');
Traditionally, and according to ECMAScript, all primitives and objects are loosely unequal to undefined and null
if (target.closest('.category-button')) {
...
}
let diff = (new Date('01 Dec 2022') - new Date()) / 1000;
const seconds = diff % 60;
diff = (diff - seconds) / 60;
const minutes = diff % 60;
diff = (diff - minutes) / 60;
const hours = diff % 24;
const days = (diff - hours) / 24;
console.log(days, hours, minutes, seconds);
// 587 6 30 21.51799999922514
document
.getElementsByTagName('iframe')[0]
.contentWindow
.document
.getElementsByTagName('iframe')[0]
.contentWindow
.document
.getElementsByClassName('it_this')[0]