-
Notifications
You must be signed in to change notification settings - Fork 523
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make refactoring of jquery-loader.js
- Loading branch information
1 parent
0dfe69c
commit b969407
Showing
2 changed files
with
12 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
(function () { | ||
// Get any jquery=___ param from the query string. | ||
var jqversion = location.search.match(/[?&]jquery=(.*?)(?=&|$)/); | ||
!(function() { | ||
|
||
document.write("<script src='../libs/jquery" + jqversion[1] + "/dist/jquery.js'></script>"); | ||
// Get any lib=___ param from the query string. | ||
var library = location.search.match(/[?&]lib=(.*?)(?=&|$)/); | ||
|
||
/* jshint -W060 */ | ||
if (library) { | ||
document.write('<script src="../libs/' + library[1] + '"></script>'); | ||
} else { | ||
document.write('<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>'); | ||
} | ||
}()); |