mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-29 22:45:14 -04:00
Removes unnecessary closures.
This commit is contained in:
parent
b1f6bd0d67
commit
fbff8686bf
10 changed files with 1341 additions and 1370 deletions
|
@ -1,8 +1,6 @@
|
||||||
|
|
||||||
(function ($, H5AI) {
|
(function ($, H5AI) {
|
||||||
|
|
||||||
H5AI.connector = (function () {
|
|
||||||
|
|
||||||
var cache = {},
|
var cache = {},
|
||||||
pathnameStatusCache = {},
|
pathnameStatusCache = {},
|
||||||
contentTypeRegEx = /^text\/html;h5ai=/,
|
contentTypeRegEx = /^text\/html;h5ai=/,
|
||||||
|
@ -105,11 +103,10 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
H5AI.connector = {
|
||||||
getPath: getPath,
|
getPath: getPath,
|
||||||
updatePaths: updatePaths,
|
updatePaths: updatePaths,
|
||||||
fetchStatusAndContent: fetchStatusAndContent
|
fetchStatusAndContent: fetchStatusAndContent
|
||||||
};
|
};
|
||||||
}());
|
|
||||||
|
|
||||||
}(jQuery, H5AI));
|
}(jQuery, H5AI));
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
|
|
||||||
(function ($, H5AI) {
|
(function ($, H5AI) {
|
||||||
|
|
||||||
H5AI.context = (function () {
|
|
||||||
|
|
||||||
var $context,
|
var $context,
|
||||||
qrCodesSize,
|
qrCodesSize,
|
||||||
showQrCode = function ($a) {
|
showQrCode = function ($a) {
|
||||||
|
@ -46,10 +44,8 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
H5AI.context = {
|
||||||
return {
|
|
||||||
init: init
|
init: init
|
||||||
};
|
};
|
||||||
}());
|
|
||||||
|
|
||||||
}(jQuery, H5AI));
|
}(jQuery, H5AI));
|
|
@ -1,8 +1,6 @@
|
||||||
|
|
||||||
(function (window, $, H5AI, config) {
|
(function (window, $, H5AI, config) {
|
||||||
|
|
||||||
H5AI.core = (function () {
|
|
||||||
|
|
||||||
var $window = $(window),
|
var $window = $(window),
|
||||||
defaults = {
|
defaults = {
|
||||||
store: {
|
store: {
|
||||||
|
@ -423,7 +421,7 @@
|
||||||
initIndicators();
|
initIndicators();
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
H5AI.core = {
|
||||||
settings: settings,
|
settings: settings,
|
||||||
hash: hash,
|
hash: hash,
|
||||||
api: api,
|
api: api,
|
||||||
|
@ -436,6 +434,5 @@
|
||||||
getFileType: getFileType,
|
getFileType: getFileType,
|
||||||
init: init
|
init: init
|
||||||
};
|
};
|
||||||
}());
|
|
||||||
|
|
||||||
}(window, jQuery, H5AI, H5AI_CONFIG));
|
}(window, jQuery, H5AI, H5AI_CONFIG));
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
|
|
||||||
(function (document, $, H5AI) {
|
(function (document, $, H5AI) {
|
||||||
|
|
||||||
H5AI.extended = (function () {
|
|
||||||
|
|
||||||
var initBreadcrumb = function () {
|
var initBreadcrumb = function () {
|
||||||
|
|
||||||
var $ul = $("body > nav ul"),
|
var $ul = $("body > nav ul"),
|
||||||
|
@ -124,9 +122,8 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
H5AI.extended = {
|
||||||
init: init
|
init: init
|
||||||
};
|
};
|
||||||
}());
|
|
||||||
|
|
||||||
}(document, jQuery, H5AI));
|
}(document, jQuery, H5AI));
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
|
|
||||||
(function ($, H5AI) {
|
(function ($, H5AI) {
|
||||||
|
|
||||||
H5AI.finder = (function () {
|
|
||||||
|
|
||||||
var filter = function (re) {
|
var filter = function (re) {
|
||||||
|
|
||||||
var match = [],
|
var match = [],
|
||||||
|
@ -101,11 +99,9 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
H5AI.finder = {
|
||||||
return {
|
|
||||||
init: init,
|
init: init,
|
||||||
filter: filter
|
filter: filter
|
||||||
};
|
};
|
||||||
}());
|
|
||||||
|
|
||||||
}(jQuery, H5AI));
|
}(jQuery, H5AI));
|
|
@ -1,8 +1,6 @@
|
||||||
|
|
||||||
(function ($, H5AI) {
|
(function ($, H5AI) {
|
||||||
|
|
||||||
H5AI.html = (function () {
|
|
||||||
|
|
||||||
var onClick = function (path, context) {
|
var onClick = function (path, context) {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -253,12 +251,11 @@
|
||||||
updateTreeHtml(path);
|
updateTreeHtml(path);
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
H5AI.html = {
|
||||||
updateCrumbHtml: updateCrumbHtml,
|
updateCrumbHtml: updateCrumbHtml,
|
||||||
updateExtendedHtml: updateExtendedHtml,
|
updateExtendedHtml: updateExtendedHtml,
|
||||||
updateTreeHtml: updateTreeHtml,
|
updateTreeHtml: updateTreeHtml,
|
||||||
updateHtml: updateHtml
|
updateHtml: updateHtml
|
||||||
};
|
};
|
||||||
}());
|
|
||||||
|
|
||||||
}(jQuery, H5AI));
|
}(jQuery, H5AI));
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
|
|
||||||
(function ($, H5AI) {
|
(function ($, H5AI) {
|
||||||
|
|
||||||
H5AI.sort = (function () {
|
|
||||||
|
|
||||||
var type = function (entry) {
|
var type = function (entry) {
|
||||||
|
|
||||||
var $entry = $(entry);
|
var $entry = $(entry);
|
||||||
|
@ -150,9 +148,8 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
H5AI.sort = {
|
||||||
init: init
|
init: init
|
||||||
};
|
};
|
||||||
}());
|
|
||||||
|
|
||||||
}(jQuery, H5AI));
|
}(jQuery, H5AI));
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
|
|
||||||
(function ($, H5AI) {
|
(function ($, H5AI) {
|
||||||
|
|
||||||
H5AI.util = (function () {
|
|
||||||
|
|
||||||
var reSplitPath = /^\/([^\/]+\/?)$/,
|
var reSplitPath = /^\/([^\/]+\/?)$/,
|
||||||
reSplitPath2 = /^(\/(?:.*\/)*?([^\/]+)\/)([^\/]+\/?)$/,
|
reSplitPath2 = /^(\/(?:.*\/)*?([^\/]+)\/)([^\/]+\/?)$/,
|
||||||
splitPath = function (pathname) {
|
splitPath = function (pathname) {
|
||||||
|
@ -106,7 +104,7 @@
|
||||||
return sequence.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
|
return sequence.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
H5AI.util = {
|
||||||
splitPath: splitPath,
|
splitPath: splitPath,
|
||||||
pathEndsWithSlash: pathEndsWithSlash,
|
pathEndsWithSlash: pathEndsWithSlash,
|
||||||
getAbsHref: getAbsHref,
|
getAbsHref: getAbsHref,
|
||||||
|
@ -115,6 +113,5 @@
|
||||||
checkedDecodeUri: checkedDecodeUri,
|
checkedDecodeUri: checkedDecodeUri,
|
||||||
reEscape: reEscape
|
reEscape: reEscape
|
||||||
};
|
};
|
||||||
}());
|
|
||||||
|
|
||||||
}(jQuery, H5AI));
|
}(jQuery, H5AI));
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
|
|
||||||
(function ($, H5AI) {
|
(function ($, H5AI) {
|
||||||
|
|
||||||
H5AI.zippedDownload = (function () {
|
|
||||||
|
|
||||||
var x = 0,
|
var x = 0,
|
||||||
y = 0,
|
y = 0,
|
||||||
$document = $(document),
|
$document = $(document),
|
||||||
|
@ -183,9 +181,8 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
H5AI.zippedDownload = {
|
||||||
init: init
|
init: init
|
||||||
};
|
};
|
||||||
}());
|
|
||||||
|
|
||||||
}(jQuery, H5AI));
|
}(jQuery, H5AI));
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
(function ($) {
|
(function ($) {
|
||||||
'use strict';
|
'use strict';
|
||||||
/*jslint browser: true, confusion: true, regexp: true, vars: true, white: true */
|
/*jslint browser: true, confusion: true, regexp: true, vars: true, white: true */
|
||||||
/*global Modernizr, jQuery, amplify, H5AI_CONFIG */
|
/*global Modernizr, jQuery, amplify, Base64, H5AI_CONFIG */
|
||||||
|
|
||||||
var H5AI = {};
|
var H5AI = {};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue