Fix minor bugs

This commit is contained in:
Austen Adler 2016-02-21 13:38:40 -05:00
parent 1c38d4aa23
commit 81f356a697

View File

@ -7,7 +7,9 @@
// @homepage https://austenwares.com/gogs/stonewareslord/ytch // @homepage https://austenwares.com/gogs/stonewareslord/ytch
// @include http://youtube.com/watch* // @include http://youtube.com/watch*
// @include https://youtube.com/watch* // @include https://youtube.com/watch*
// @run-at document-start // @include http://www.youtube.com/watch*
// @include https://www.youtube.com/watch*
// @run-at document-body
// ==/UserScript== // ==/UserScript==
// Options // Options
@ -23,7 +25,7 @@ var wordList = [
"Example third string (with quotes)", "Example third string (with quotes)",
'Example last string (no comma after tick)' 'Example last string (no comma after tick)'
]; ];
function clearComments(words){ function clearComments(){
comments = document.querySelectorAll('.comment-item>.content>.comment-text>.comment-text-content'); comments = document.querySelectorAll('.comment-item>.content>.comment-text>.comment-text-content');
for (var i = 0; i < comments.length; i++) { for (var i = 0; i < comments.length; i++) {
for (var j = 0; j < wordList.length; j++) { for (var j = 0; j < wordList.length; j++) {
@ -37,4 +39,4 @@ function clearComments(words){
} }
} }
} }
setInterval(clearComments(wordList), 1000); setInterval(clearComments, 1000);