Files
openlayers/demo/loader.js
tschaub d435f6b4fd Simplifying the loader.
Plovr checks the referrer for query string parameters (like mode), so we don't need any of this query string parsing (thanks @elemoine for the tip).

The reason we still dynamically generate the script tag is to work on other domains (e.g. testing on a VM or mobile device).  In this case, we make use of the `window.location.hostname`.
2012-07-05 13:55:24 -06:00

8 lines
239 B
JavaScript

/**
Adds the plovr generated script to the document.
*/
(function() {
var url = "http://" + window.location.hostname + ":9810/compile?id=ol";
document.write("<script type='text/javascript' src='" + url + "'></script>");
})();