Viewing a response to: @justyy/simple-video-downloader-3-0-9-extract-the-links-add-whichav-site
Thanks for the contribution, @justyy! It's cool that you keep adding more support to your extension, and also include tests every time you do so! As for the code: * There are still some places where `const` should be used, but `let` is used instead. * There are a lot of nested *if* statements - maybe you could try swapping them around to avoid this. * I'm not sure if using a regular expression is the best way to find all URLs of the current page. It's possible you could do something like this instead if you need URLs from an external page ``` fetch("https://steemit.com/utopian-io/@justyy/simple-video-downloader-3-0-9-extract-the-links-add-whichav-site") .then(response => response.text()) .then(text => { const parser = new DOMParser(); const htmlDocument = parser.parseFromString(text, "text/html"); const urls = new Set(Array.from(htmlDocument.links).map(link => link.href)); console.log(urls); }); ``` but since you say you extract links from the current page you could just do ``` const urls = new Set(Array.from(document.links).map(link => link.href)); ``` --- Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category. To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/3/2-3-3-2-2-1-4-). ---- Need help? Chat with us on [Discord](https://discord.gg/uTyJkNm). [[utopian-moderator]](https://join.utopian.io/)
author | amosbastian |
---|---|
permlink | re-justyy-simple-video-downloader-3-0-9-extract-the-links-add-whichav-site-20190128t113825243z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"users":["justyy"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/3/2-3-3-2-2-1-4-","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"} |
created | 2019-01-28 11:38:24 |
last_update | 2019-01-28 11:38:24 |
depth | 1 |
children | 1 |
last_payout | 2019-02-04 11:38:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 5.842 HBD |
curator_payout_value | 1.862 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1,549 |
author_reputation | 174,473,586,900,705 |
root_title | "Simple Video Downloader 3.0.9 - Extract the Links + Add WhichAV Site" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 79,055,179 |
net_rshares | 15,474,638,004,171 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
espoem | 0 | 28,171,333,449 | 15% | ||
utopian-io | 0 | 15,207,917,770,669 | 10.54% | ||
shammi | 0 | 397,155,942 | 7% | ||
steemtaker | 0 | 5,896,229,591 | 6% | ||
organicgardener | 0 | 4,969,623,868 | 25% | ||
holger80 | 0 | 56,480,451,390 | 10% | ||
reazuliqbal | 0 | 13,914,981,433 | 10% | ||
mightypanda | 0 | 133,053,698,138 | 65% | ||
ulockblock | 0 | 13,206,003,475 | 4.76% | ||
fastandcurious | 0 | 2,699,199,901 | 60% | ||
linknotfound | 0 | 1,605,646,170 | 100% | ||
ascorphat | 0 | 2,163,937,599 | 2.5% | ||
monster-inc | 0 | 4,161,972,546 | 100% |
Thank you for your review, @amosbastian! Keep up the good work!
author | utopian-io |
---|---|
permlink | re-re-justyy-simple-video-downloader-3-0-9-extract-the-links-add-whichav-site-20190128t113825243z-20190131t080523z |
category | utopian-io |
json_metadata | "{"app": "beem/0.20.17"}" |
created | 2019-01-31 08:05:24 |
last_update | 2019-01-31 08:05:24 |
depth | 2 |
children | 0 |
last_payout | 2019-02-07 08:05:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 63 |
author_reputation | 152,955,367,999,756 |
root_title | "Simple Video Downloader 3.0.9 - Extract the Links + Add WhichAV Site" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 79,200,474 |
net_rshares | 0 |