Skip to content

Instantly share code, notes, and snippets.

@adtaylor
Created August 6, 2015 19:23
Show Gist options
  • Save adtaylor/b75410e0cc9bd13c93c5 to your computer and use it in GitHub Desktop.
Save adtaylor/b75410e0cc9bd13c93c5 to your computer and use it in GitHub Desktop.
Output a RMT ready string from the FPL 'Pick My Team' page
var s = "\n",
pos = ['GK: ', 'DEF: ', 'MID: ', 'FORW: ', '\n ['];
[].forEach.call( document.querySelectorAll('.ismPitchRow'), function(row, i){
s += pos[i];
[].forEach.call( row.querySelectorAll('.ismPitchWebName'), function(dt){ s += dt.innerHTML });
if( i == 4 ) s += "]";
s += "\n";
}); s;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment