ge-ku / AutoJoin-for-SteamGifts

Automatically enters giveaways from Steamgifts.com
https://chrome.google.com/webstore/detail/autojoin-for-steamgifts/bchhlccjhoedhhegglilngpbnldfcidc
GNU General Public License v2.0
105 stars 22 forks source link

Feature/code clean up #24

Closed tkulpa closed 6 years ago

tkulpa commented 6 years ago

Little code clean up, what do you think of separating scraping of page to separate procedure creating arrays of giveaways objects and then making rests of logic around this array. Second question what do you think about using ES6 features

ge-ku commented 6 years ago

Yes to both of those questions. There's already some ES6 stuff (let, arrow functions), so I'm totally fine with it, this extension is meant to be used on modern browsers so why not, I even started moving some jQuery code to vanilla JS but don't have much time to finish it.

ge-ku commented 6 years ago

I just created a new branch here: https://github.com/ge-ku/AutoJoin-for-SteamGifts/tree/testES2017

There's now a Giveaway class and a function to parse one page. You can expand on it (or rewrite completely if you have better ideas), Giveaway class should probably have a property to store a reference to DOM element, at least. What do you think?