-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
25 lines (22 loc) · 1.06 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// ==UserScript==
// @name Stuff You Stuff Comments
// @version 0.1
// @description A userscript for hiding stuff.co.nz comments
// @author You
// @namespace http://www.stuff.co.nz
// @include https://www.stuff.co.nz
// @include http://www.stuff.co.nz/*
// @include https://www.stuff.co.nz/*
// ==/UserScript==
function random_num_from_interval(min,max){
return Math.floor(Math.random() * (max - min) + min);
}
var new_comments = ["I'm an idiot","I have a stupid opinion","Hurp durp","Probably just a troll","I was raised poorly","Ignorance is bliss","Just another stuff commenter", "Something about PC-gone-mad", "Even my parents can't stand me"];
window.addEventListener('load', function () {
const commentButton = document.getElementsByClassName('sics-component__gigya-comments-button');
var old_comments = document.getElementsByClassName("gig-comment-body");
for (var i=0;i<old_comments.length;i++){
var comment = (new_comments[random_num_from_interval(0,new_comments.length)]);
old_comments[i].innerHTML = comment;
}
})