Closed tkulpa closed 6 years ago
This breaks compile script, I'll try to fix it later. As for modules, as far as I know browsers still don't support them (you have to manually enable it in chrome:flags for Chrome or about:config for Firefox). I'd like to keep things simple and avoid using polyfills. As for ESLint - I've never used it, I'll check it out. Thanks.
Just added ESLint to this branch https://github.com/ge-ku/AutoJoin-for-SteamGifts/commit/6ab8ea0d9263154d47b1ea2d4ef7dcc927bfe710 Cool stuff!
I just merged that branch into this one and moved files into directories (it had conflicts, so couldn't just merge this pull request). About your previous suggestion to start using array of objects representing giveaways, what do you think is the best way to accomplish it keeping a link between these objects and corresponding DOM elements?
Parse site once every time user opens/refresh it and scrap all needed data to object(new Giveaway(...)), dont store dom elements
But then how do we call methods of Giveaway objects on click of buttons besides each giveaway? Search for corresponding object (by giveaway code) each time?
This will be separate thing, all actions will be standalone but background join and autojoin will depend on scraped objects
That would be fine for background autojoin (and it's basically how it is now) but for autojoin button - it should update DOM elements dynamically. Ideally there it's some kind of binding between DOM elements and objects, at least in my mind. But I'm not sure what is the best way to approach this.
I put files in the appropriate folders, checked autoentry and it worked, i didnt touch compile.sh file. I think next step is to remake files to modules and introduce eslint