fix Ox.PATH

This commit is contained in:
rolux 2013-12-01 13:24:59 +01:00
parent acbc0f4e59
commit 41af852f17

View file

@ -91,8 +91,8 @@ Ox.SHORT_MONTHS = Ox.MONTHS.map(function(val) {
Ox.PATH = (function() {
// IE8 can't apply slice to NodeLists, see Ox.slice
var index, scripts = document.getElementsByTagName('script');
for (index = scripts.length; index >= 0; index--) {
var src = element.src;
for (index = scripts.length - 1; index >= 0; index--) {
var src = scripts[index].src;
if (/Ox\.js(\?\d+|)$/.test(src)) {
return src.replace(/Ox\.js(\?\d+|)$/, '');
}