I'm trying to launch DataTables on a website that is not my own, using TamperMonkey for Chrome (similar to GreaseMonkey for Firefox). The website in question is Discogs, and the TABLE has the ID "#versions" and appears on pages like this one: http://www.discogs.com/David-Bowie-David-Bowie/master/50884
It's the long list of releases I want to use with DataTables to enable sorting & searching.
- The first issue is to modify the TABLE as it's lacking a THEAD. That's easy.
- The second issue is to load dataTable on to this manipulated table. This is where I'm stuck... Is it even possible? Will dataTables even know I have modified the TABLE? I get the "Cannot read property 'mData' of undefined"-error no matter what. Is dataTables reading the original DOM and can't find my new fancy THEAD? The DataTables Debugger says "DataTables is not available on this page." - but inspecting the DOM reveals that there indeed is a "dataTable"-class on the TABLE, which I didn't put there, but that's it...