From 8e682cc7a4a1ea6569811445a1c91d85ae687e59 Mon Sep 17 00:00:00 2001 From: Andrew Pellerano <2031379+a13o@users.noreply.github.com> Date: Sun, 29 Jul 2018 10:00:50 -0700 Subject: [PATCH] Remove innerHTML warnings from firefox submission --- src/hacker-news/collapse-deep-comments.js | 2 +- src/hacker-news/collapse-low-quality-comments.js | 2 +- src/youtube/remove-comment-count.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hacker-news/collapse-deep-comments.js b/src/hacker-news/collapse-deep-comments.js index 760c99e..9a8574e 100644 --- a/src/hacker-news/collapse-deep-comments.js +++ b/src/hacker-news/collapse-deep-comments.js @@ -28,7 +28,7 @@ const COMMENT_COLLAPSE_DEPTH = 1; // set all of hn's classes for the collapsed comment comment.classList.add('coll') const toggle = comment.querySelector('.togg') - toggle.innerHTML = `[+${toggle.getAttribute('n')}]` + toggle.textContent = `[+${toggle.getAttribute('n')}]` comment.querySelector('.comment').classList.add('noshow') comment.querySelector('.votelinks').classList.add('nosee') diff --git a/src/hacker-news/collapse-low-quality-comments.js b/src/hacker-news/collapse-low-quality-comments.js index 7f2355b..ec4dad1 100644 --- a/src/hacker-news/collapse-low-quality-comments.js +++ b/src/hacker-news/collapse-low-quality-comments.js @@ -16,7 +16,7 @@ // set all of hn's classes for the collapsed comment comment.classList.add('coll') const toggle = comment.querySelector('.togg') - toggle.innerHTML = `[+${toggle.getAttribute('n')}]` + toggle.textContent = `[+${toggle.getAttribute('n')}]` comment.querySelector('.comment').classList.add('noshow') comment.querySelector('.votelinks').classList.add('nosee') } diff --git a/src/youtube/remove-comment-count.js b/src/youtube/remove-comment-count.js index db00bab..51035ef 100644 --- a/src/youtube/remove-comment-count.js +++ b/src/youtube/remove-comment-count.js @@ -12,7 +12,7 @@ const count = document.querySelector('ytd-comments-header-renderer h2#count .count-text') if (!count) { return } - count.innerHTML = count.textContent.replace(/[\d,]+\s/, '') + count.textContent = count.textContent.replace(/[\d,]+\s/, '') observer.disconnect() })