Last active
January 1, 2018 11:31
-
-
Save chirag64/34ca715aacd3c86ff5ef4fd7e97175ad to your computer and use it in GitHub Desktop.
Load the webpage with all restaurants that deliver at your desired address (like https://www.swiggy.com/mumbai/restaurants) with all restaurants loaded on the web page (keep scrolling down till it loads all) and then run the script. For 1 time use, copy-paste the code of unminified file in your browser console. For regular use, create a bookmark…
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 characters
| javascript:(function(){var r=$(".restaurant-container:not(:has(.closed))");r.css("border","");var o=Math.floor(Math.random()*r.length);r[o].style.border="3px solid red";r[o].scrollIntoView();})(); |
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 characters
| // Load the webpage with all restaurants that deliver at your desired address (like https://www.swiggy.com/mumbai/restaurants) with all restaurants loaded on the web page (keep scrolling down till it loads all) and then run the script. | |
| var restaurants = $('.restaurant-container:not(:has(.closed))'); | |
| restaurants.css('border', ''); | |
| var randomNumber = Math.floor(Math.random() * restaurants.length); | |
| restaurants[randomNumber].style.border = '3px solid red'; | |
| restaurants[randomNumber].scrollIntoView(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment