Files
openlayers/examples/index.js
Tom Payne e9dbb00039 Pass query string through example index
This is so that visiting

    /examples/index.html?mode=RAW&Debug=true

will automatically add ?mode=RAW&Debug=true to all links in the
generated index.
2012-10-17 11:31:40 +02:00

17 lines
414 B
JavaScript

/**
* Loader to append the query string to every A element in the document.
*
* This is so that (for example) visiting
* /examples/index.html?mode=RAW&Debug=true
* will cause all links to automatically include the ?mode=RAW&Debug=true.
*/
(function() {
var as = document.getElementsByTagName('a');
var i, n = as.length;
for (i = 0; i < n; ++i) {
as[i].href += window.location.search;
}
})();