jerone / UserScripts

🐵 My UserScripts
https://github.com/jerone/UserScripts#readme
GNU General Public License v3.0
342 stars 39 forks source link

(Github Comment Enhancer) Chrome browser compatibility #11

Closed tophf closed 10 years ago

tophf commented 10 years ago

Uncaught TypeError: undefined is not a function at this line

document.querySelectorAll returns not an array but a NodeList object which has no (should have no) method forEach.

The workarounds.

jerone commented 10 years ago

This code indeed has issues with Chrome. I build it for Firefox and that browser supports the shortcut Array.forEach. Every other browser you have to use Array.prototype.forEach.

If you add a PR with your fixes, I'm willing to merge it in...