This commit is contained in:
Tom Payne
2012-10-18 11:50:40 +02:00
parent 453f8499d6
commit 1f8c98db8c
9 changed files with 106 additions and 36 deletions

16
master/examples/index.js Normal file
View File

@@ -0,0 +1,16 @@
/**
* 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;
}
})();