Comment Stream

Search and bookmark options Close
Search for:
Search by:
Clear bookmark | How bookmarks work
Note: Bookmarks are ignored for all search results

Total Found: 1 (Showing 1-1)

Page 1 of 1
Set Bookmark
Rene B.
Tue, Apr 23, 2019, 4:40am (UTC -5)
Re: DSC S2: Such Sweet Sorrow, Part 2

I too am happy with producers' decision to pull the plug on STD. It was doomed from the beginning.
Anyway, complaining about double-digit-iq entertainment is not what I'm here for.

Since this place has become host to such a 'heated' discussion I have expanded a bit on Galadriel's work and present to you a
JavaScript based approach for minimal forum statistics. You can use the following JS-Code and simply paste it into the developer console of any of the review sites.
This should work for all episodes of all series. The script will give you a sorted list of the authors, their postcount in the current comment section and the number of characters
they have used in total. If desired, the script can be easily extended to include word-count or even average comment length.

Enjoy :)

Here are the current top-15 for this comment section:

0: {author: "Alan Roi", postCount: 36, characterCount: 19695}
1: {author: "Booming", postCount: 24, characterCount: 17488}
2: {author: "Cody B", postCount: 19, characterCount: 11283}
3: {author: "Artymiss", postCount: 14, characterCount: 4116}
4: {author: "SlackerInc", postCount: 8, characterCount: 5790}
5: {author: "Tim C", postCount: 7, characterCount: 7627}
6: {author: "Daya", postCount: 7, characterCount: 4734}
7: {author: "Boura", postCount: 7, characterCount: 2122}
8: {author: "Kinematic", postCount: 7, characterCount: 10188}
9: {author: "Peter G.", postCount: 7, characterCount: 6020}
10: {author: "Trent", postCount: 7, characterCount: 13979}
11: {author: "Chrome", postCount: 6, characterCount: 5001}
12: {author: "OmicronThetaDeltaPhi", postCount: 6, characterCount: 5778}
13: {author: "axiom", postCount: 6, characterCount: 8381}
14: {author: "Galadriel", postCount: 6, characterCount: 21624}
15: {author: "Mertov", postCount: 6, characterCount: 10632}

And here is the code:

let commentBoxes = [];
let authorsAndComments = [];
let authors = [];
let resultArr = [];
let countDic = {};

function compare(a,b) {
if (a.postCount > b.postCount) {
return -1;
}
if (a.postCount < b.postCount) {
return 1;
}
return 0;
};

commentBoxes = document.getElementsByClassName('commentbox');

for (var box of commentBoxes) {
authors.push(box.children[0].children[0].innerText);
authorsAndComments.push(
{'author': box.children[0].children[0].innerText,
"commentText" : box.children[1].innerText}
);
}

var uniqueAuthors = [...new Set(authors)]

for (var author of uniqueAuthors) {
var authorCount = 0;
var characterCount = 0;
for (var item of authorsAndComments) {
if (item.author === author) {
authorCount++;
characterCount += item.commentText.length;
}
}
countDic[author] = { "authorCount" : authorCount, "characterCount" : characterCount };
}

for (var usr in countDic) {
let userCounts = countDic[usr];
resultArr.push({
author: usr,
postCount: userCounts.authorCount,
characterCount: userCounts.characterCount
});
}

resultArr.sort(compare);
Page 1 of 1
▲Top of Page | Menu | Copyright © 1994-2019 Jamahl Epsicokhan. All rights reserved. Unauthorized duplication or distribution of any content is prohibited. This site is an independent publication and is not affiliated with or authorized by any entity or company referenced herein. See site policies.