thingspeak/app/assets/javascripts/noapi.js
2014-02-17 12:05:39 -05:00

5 lines
182 B
JavaScript

// if on api subdomain, redirect
var wloc = window.location.toString();
if (wloc.indexOf('api') != -1 && wloc.indexOf('api') < 10) {
window.location = wloc.replace('api', 'www');
}