You need to include the code so that it's executed BEFORE indexOf is called.
Just add this to the top of your CSJS-library: (as per the instructions from the link)
if (!Array.indexOf) {
Array.prototype.indexOf = function (obj, start) {
for (var i = (start || 0); i < this.length; i++) {
if (this[i] == obj) {
return i;
}
}
return -1;
}
}
Copy/Paste the above to avoid any typos.
What prototype does is to append functionality to an already existing object, you can easily add your own (like done above). Just make sure that you always have consistent return points.
/J