Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NodeList.prototype.forEach = Array.prototype.forEach;
- var byhref = {};
- document.querySelectorAll("a[href]").forEach(function(e){
- byhref[e.href] = "undefined" === typeof byhref[e.href] ? [e] : [].concat(byhref[e.href],e); //collect links (different objects, same url)
- });
- byhref
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement