Last active
January 12, 2021 21:24
-
-
Save scr2em/d82e663f152b275b2b44a6c48d04aed7 to your computer and use it in GitHub Desktop.
Revisions
-
scr2em revised this gist
Jan 12, 2021 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -11,13 +11,14 @@ link = link.split("&")[0] }else{ link = link.split("?")[0] } comments.push({name: x.firstElementChild.firstElementChild.innerHTML,profile:link}) }catch{ } }) var {name,profile} = comments[Math.floor(Math.random()*comments.length)] console.log(`YAY ${name} has won!!! check his profile at ${profile} `) } -
scr2em created this gist
Jan 12, 2021 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ // open the post in a new tap var commentPicker= function(){ var comments =[]; document.querySelectorAll("li div div div div div div div div div div a").forEach(x=>{ try{ var link = x.href if(link.match('profile.php')){ link = link.split("&")[0] }else{ link = link.split("?")[0] } comments.push({name: x.firstElementChild.firstElementChild.innerHTML,comment:'comment:,profile:link}) }catch{ } }) var rand = Math.floor(Math.random()*comments.length) return comments[rand] }