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
| (?:https?://)?(?:[a-zA-Z0-9\-]+\.)?(?:amazon|amzn){1}\.(?P<tld>[a-zA-Z\.]{2,})\/(gp/(?:product|offer-listing|customer-media/product-gallery)/|exec/obidos/tg/detail/-/|o/ASIN/|dp/|(?:[A-Za-z0-9\-]+)/dp/)?(?P<ASIN>[0-9A-Za-z]{10}) | |
| I created this a number of years ago for an irc bot (https://github.com/rmmh/skybot) to recognize amazon urls. Keep forgetting to hang onto it. |
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
| function copyAllLinks() { | |
| let linksStr = ''; | |
| [].slice.call(document.getElementsByTagName('a')) | |
| .forEach(function(element) { | |
| let link = document.createElement('a'); | |
| link.href = element.getAttribute('href'); | |
| linksStr += link.href + '\n'; | |
| }); | |
| let linksTextarea = document.createElement('textarea'); | |
| linksTextarea.style.opacity = 0; |