API endpoint detection for count.min.js

This commit is contained in:
Martin Zimmermann 2013-10-02 16:16:08 +02:00
parent a7cc1cdf4d
commit ef463eb517

View File

@ -21,7 +21,7 @@ define(["q"], function(Q) {
if (js[i].src.match("/js/components/requirejs/require\\.js$")) { if (js[i].src.match("/js/components/requirejs/require\\.js$")) {
endpoint = js[i].src.substring(0, js[i].src.length - 35); endpoint = js[i].src.substring(0, js[i].src.length - 35);
break; break;
} else if (js[i].src.match("/js/embed\\.min\\.js$")) { } else if (js[i].src.match("/js/(embed|count)\\.min\\.js$")) {
endpoint = js[i].src.substring(0, js[i].src.length - 16); endpoint = js[i].src.substring(0, js[i].src.length - 16);
break; break;
} }