mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-18 09:52:17 +09:00
Intercept jQuery.getScript() requests to corrupted symlinks
This commit is contained in:
parent
1476d8d0f4
commit
64b89d7b0d
1 changed files with 10 additions and 0 deletions
|
|
@ -21,6 +21,16 @@ if(jQuery) jQuery.noConflict();
|
|||
($.os.Unix) ? 'Unix' :
|
||||
($.os.Mac) ? 'Mac' : '';
|
||||
|
||||
/* Intercept getScript error due to broken minified script URL */
|
||||
$(document).ajaxError(function(event, jqxhr, settings, thrownError) {
|
||||
if(settings.dataType === "script" && (jqxhr.status >= 400 || (jqxhr.responseText && jqxhr.responseText.length < 32))) {
|
||||
var match = /^(.+)\.min\.(css|js)($|\?)/.exec(settings.url);
|
||||
if(match) {
|
||||
$.getScript(match[1] + "." + match[2], settings.success);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* @brief XE 공용 유틸리티 함수
|
||||
* @namespace XE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue