Skip to content

Instantly share code, notes, and snippets.

@kiwiyou
Last active January 14, 2022 13:36
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kiwiyou/ffb8beab11cbc64cb696639fd0c984c7 to your computer and use it in GitHub Desktop.
Save kiwiyou/ffb8beab11cbc64cb696639fd0c984c7 to your computer and use it in GitHub Desktop.
Baekjoon Online Judge Status Offender
// ==UserScript==
// @name Baeggro - BOJ Result Offender
// @match https://www.acmicpc.net/status*
// @grant none
// @version 4.0
// @author kiwiyou <kiwiyou.dev@gmail.com>, RanolP <public.ranolp@gmail.com>
// @downloadURL https://gist.githubusercontent.com/kiwiyou/ffb8beab11cbc64cb696639fd0c984c7/raw/baeggro.js
// @updateURL https://gist.githubusercontent.com/kiwiyou/ffb8beab11cbc64cb696639fd0c984c7/raw/baeggro.js
// ==/UserScript==
const status = document.getElementById('status-table').rows;
let prev_id = '', streak = 0;
for (let i = status.length - 1; i > 0; --i) {
const id = status[i].cells[2].textContent;
const result = status[i].cells[3].firstChild;
if (id !== prev_id) {
prev_id = id;
streak = 0;
}
if (!result.matches('.result-ac')) {
result.textContent += 'ㅋ'.repeat(streak++);
} else {
streak = 0;
}
}
@kiwiyou
Copy link
Author

kiwiyou commented May 20, 2020

TamperMonkey (Chrome), GreaseMonkey / ViolentMonkey (Firefox)를 통해서 스크립트를 추가할 수 있습니다.

@Kinetic27
Copy link

잘 보고갑니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment