Skip to content

Instantly share code, notes, and snippets.

@palikhov
Created February 11, 2019 08:11
Show Gist options
  • Save palikhov/10872b2f19c70fc5c52e72f91169042e to your computer and use it in GitHub Desktop.
Save palikhov/10872b2f19c70fc5c52e72f91169042e to your computer and use it in GitHub Desktop.
Bookmarklet for LFG: to filter out Roll 20 LFG games with too many players
javascript:((thresh) => {$(`.lfglisting`).each((i, e) => {const $e = $(e);const cur = Number($e.find(`strong:contains('Current Player')`).text().replace(/^([\d,.]+) C.*$/g, "$1"));const open = Number($e.find(`span:contains('Open Slot')`).text().replace(/[()]/g, "").replace(/^([\d,.]+) O.*$/g,"$1"));const total = cur + open;if (total > thresh) $e.remove();});})(50);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment