Merge pull request #2077 from bnjmnt4n/js-load

Allow JS files with query strings to be loaded.
This commit is contained in:
Hakim El Hattab 2018-01-22 10:09:46 +01:00 committed by GitHub
commit 40e5544776
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -418,7 +418,7 @@
} }
function loadScript( s ) { function loadScript( s ) {
head.ready( s.src.match( /([\w\d_\-]*)\.?js$|[^\\\/]*$/i )[0], function() { head.ready( s.src.match( /([\w\d_\-]*)\.?js(\?[\w\d.=&]*)?$|[^\\\/]*$/i )[0], function() {
// Extension may contain callback functions // Extension may contain callback functions
if( typeof s.callback === 'function' ) { if( typeof s.callback === 'function' ) {
s.callback.apply( this ); s.callback.apply( this );