Show Flairless Count

Estimate flairless users on /r/thebutton/

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

You will need to install an extension such as Tampermonkey to install this script.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name         Show Flairless Count
// @namespace    http://your.homepage/
// @version      0.2
// @description  Estimate flairless users on /r/thebutton/
// @author       /u/bwochinski
// @match        *://www.reddit.com/r/thebutton/*
// @grant        none
// ==/UserScript==

function parseFlairNum(flairLine) {
    flairLine = flairLine.split("~");
    var total = parseInt(flairLine.shift().split(" ")[0].replace(",",""));
    var estFlair = 0;
    for (var est in flairLine) {
        var curEst = parseInt(flairLine[est].split(" ")[0]);
        estFlair += curEst;
    }
    return total - estFlair;
}

var estFlairless = parseFlairNum($('div.titlebox p').text());
$('div.titlebox p:last').after("<p> &nbsp; &nbsp; ~" + estFlairless + " flairless users</p>");

//add flair text
$('div.titlebox p span.flair-no-press').text("non presser");
$('div.titlebox p span.flair-press-6').text("60-52s");
$('div.titlebox p span.flair-press-5').text("51-42s");
$('div.titlebox p span.flair-press-4').text("41-32s");
$('div.titlebox p span.flair-press-3').text("31-22s");
$('div.titlebox p span.flair-press-2').text("21-12s");
$('div.titlebox p span.flair-press-1').text("11-1s");
$('div.titlebox p span.flair-cant-press').text("can't press");