mirror of
https://github.com/kiwix/kiwix-js.git
synced 2025-09-22 12:01:15 -04:00
Upgrade requirejs to 2.1.9 instead of 2.1.8
This commit is contained in:
parent
7283f88535
commit
a6eea6c9f9
@ -1,5 +1,5 @@
|
|||||||
/** vim: et:ts=4:sw=4:sts=4
|
/** vim: et:ts=4:sw=4:sts=4
|
||||||
* @license RequireJS 2.1.8 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
|
* @license RequireJS 2.1.9 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
|
||||||
* Available via the MIT or new BSD license.
|
* Available via the MIT or new BSD license.
|
||||||
* see: http://github.com/jrburke/requirejs for details
|
* see: http://github.com/jrburke/requirejs for details
|
||||||
*/
|
*/
|
||||||
@ -12,7 +12,7 @@ var requirejs, require, define;
|
|||||||
(function (global) {
|
(function (global) {
|
||||||
var req, s, head, baseElement, dataMain, src,
|
var req, s, head, baseElement, dataMain, src,
|
||||||
interactiveScript, currentlyAddingScript, mainScript, subPath,
|
interactiveScript, currentlyAddingScript, mainScript, subPath,
|
||||||
version = '2.1.8',
|
version = '2.1.9',
|
||||||
commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
|
commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
|
||||||
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
|
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
|
||||||
jsSuffixRegExp = /\.js$/,
|
jsSuffixRegExp = /\.js$/,
|
||||||
@ -22,7 +22,7 @@ var requirejs, require, define;
|
|||||||
hasOwn = op.hasOwnProperty,
|
hasOwn = op.hasOwnProperty,
|
||||||
ap = Array.prototype,
|
ap = Array.prototype,
|
||||||
apsp = ap.splice,
|
apsp = ap.splice,
|
||||||
isBrowser = !!(typeof window !== 'undefined' && navigator && window.document),
|
isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document),
|
||||||
isWebWorker = !isBrowser && typeof importScripts !== 'undefined',
|
isWebWorker = !isBrowser && typeof importScripts !== 'undefined',
|
||||||
//PS3 indicates loaded and complete, but need to wait for complete
|
//PS3 indicates loaded and complete, but need to wait for complete
|
||||||
//specifically. Sequence is 'loading', 'loaded', execution,
|
//specifically. Sequence is 'loading', 'loaded', execution,
|
||||||
@ -373,7 +373,6 @@ var requirejs, require, define;
|
|||||||
function hasPathFallback(id) {
|
function hasPathFallback(id) {
|
||||||
var pathConfig = getOwn(config.paths, id);
|
var pathConfig = getOwn(config.paths, id);
|
||||||
if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) {
|
if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) {
|
||||||
removeScript(id);
|
|
||||||
//Pop off the first array value, since it failed, and
|
//Pop off the first array value, since it failed, and
|
||||||
//retry
|
//retry
|
||||||
pathConfig.shift();
|
pathConfig.shift();
|
||||||
@ -1464,6 +1463,8 @@ var requirejs, require, define;
|
|||||||
var map = makeModuleMap(id, relMap, true),
|
var map = makeModuleMap(id, relMap, true),
|
||||||
mod = getOwn(registry, id);
|
mod = getOwn(registry, id);
|
||||||
|
|
||||||
|
removeScript(id);
|
||||||
|
|
||||||
delete defined[id];
|
delete defined[id];
|
||||||
delete urlFetched[map.url];
|
delete urlFetched[map.url];
|
||||||
delete undefEvents[id];
|
delete undefEvents[id];
|
||||||
@ -1609,7 +1610,7 @@ var requirejs, require, define;
|
|||||||
|
|
||||||
//Join the path parts together, then figure out if baseUrl is needed.
|
//Join the path parts together, then figure out if baseUrl is needed.
|
||||||
url = syms.join('/');
|
url = syms.join('/');
|
||||||
url += (ext || (/\?/.test(url) || skipExt ? '' : '.js'));
|
url += (ext || (/^data\:|\?/.test(url) || skipExt ? '' : '.js'));
|
||||||
url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url;
|
url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1918,7 +1919,7 @@ var requirejs, require, define;
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Look for a data-main script attribute, which could also adjust the baseUrl.
|
//Look for a data-main script attribute, which could also adjust the baseUrl.
|
||||||
if (isBrowser) {
|
if (isBrowser && !cfg.skipDataMain) {
|
||||||
//Figure out baseUrl. Get it from the script tag with require.js in it.
|
//Figure out baseUrl. Get it from the script tag with require.js in it.
|
||||||
eachReverse(scripts(), function (script) {
|
eachReverse(scripts(), function (script) {
|
||||||
//Set the 'head' where we can append children by
|
//Set the 'head' where we can append children by
|
||||||
|
Loading…
x
Reference in New Issue
Block a user