Fun and Games Let's Count to 100,000!

LW

Community Manager
Administrator
Moderator
Freedom! Member
Apr 2, 2016
3,045
1,251
21
Vienna, Austria
twitter.com
YouTube
lw_001
10,030
The commas break my script for this thread ree

Edit: Fixed it ;) On to another 10k!
Here's the thing I've been using for a while
Code:
// ==UserScript==
// @name         Counting Thread Mod Script
// @version      0.1
// @description  moderate counting thread by having a thing screaming at you when it's off
// @author       LW
// @include      /https\:\/\/freedom\.community\.tm\/threads\/.*\.?1923.*/
// @require      http://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js
// ==/UserScript==

(function() {
    'use strict';
    var mst = 0;
    $('.postNumber').each( function(idx) {
        console.log(idx + ' ' + $(this).text().substr(1) + ' ' + $('blockquote.messageText')[idx].innerHTML.includes($(this).text().substr(1)));
        var nr = $(this).text().substr(1);
        if (!($('blockquote.messageText')[idx].innerHTML.replace(/,/g, '').includes($(this).text().substr(1)))) {
            mst++;
        }
    });
    if (mst > 0) alert('Something\'s up here!\n' + mst + ' Counting mistakes on this page!');
})();
 
Last edited: