Skip to content

Instantly share code, notes, and snippets.

@RadarCZ
Last active August 11, 2017 04:50
Show Gist options
  • Save RadarCZ/9c4e89e8e0e5972de6c909f8d5bb0766 to your computer and use it in GitHub Desktop.
Save RadarCZ/9c4e89e8e0e5972de6c909f8d5bb0766 to your computer and use it in GitHub Desktop.
PlugDJ woot counter - changes title of the page to "({usersWooting}/{usersInRoom}) {roomName}". Firing every second, so the change is almost instant.
// ==UserScript==
// @name plugdj title extender
// @namespace radarovo
// @include https://plug.dj/*
// @version 1
// @grant none
// ==/UserScript==
function main(){
var pplInRoom = parseInt($(".bar-count").text());
var pplWoot = $("#woot .value").text();
var roomName = $("#room-name .bar-value").text();
document.title= "("+pplWoot+"/"+(pplInRoom-1)+") "+roomName;
}
window.setInterval(main, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment