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`.
8 lines
239 B
JavaScript
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>");
|
|
})();
|