Created
August 6, 2015 19:23
-
-
Save adtaylor/b75410e0cc9bd13c93c5 to your computer and use it in GitHub Desktop.
Output a RMT ready string from the FPL 'Pick My Team' page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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