diff --git a/source/Ox.UI/js/Code/Ox.SourceViewer.js b/source/Ox.UI/js/Code/Ox.SourceViewer.js index 0413126d..36dae3f0 100644 --- a/source/Ox.UI/js/Code/Ox.SourceViewer.js +++ b/source/Ox.UI/js/Code/Ox.SourceViewer.js @@ -46,7 +46,7 @@ Ox.SourceViewer = function(options, self) { if (!/^\/\//.test(text)) { if (type == 'comment') { i && sections.push({comment: '', code: ''}); - text = Ox.sub(text, 2, -2); + text = text.slice(2, -2); self.options.replaceComment.forEach(function(replace) { text = text.replace(replace[0], replace[1]); }); diff --git a/source/Ox.UI/js/Core/Ox.URL.js b/source/Ox.UI/js/Core/Ox.URL.js index cead8619..59edf95b 100644 --- a/source/Ox.UI/js/Core/Ox.URL.js +++ b/source/Ox.UI/js/Core/Ox.URL.js @@ -397,7 +397,7 @@ Ox.URL = function(options) { var ret; if (condition[0] == '(') { // re-insert subcondition - ret = parseFind(subconditions[parseInt(Ox.sub(condition, 1, -1))]); + ret = parseFind(subconditions[parseInt(condition.slice(1, -1))]); } else { ret = parseCondition(condition); } diff --git a/source/Ox.UI/js/Video/Ox.VideoElement.js b/source/Ox.UI/js/Video/Ox.VideoElement.js index c84f0484..b1129857 100644 --- a/source/Ox.UI/js/Video/Ox.VideoElement.js +++ b/source/Ox.UI/js/Video/Ox.VideoElement.js @@ -116,7 +116,7 @@ Ox.VideoElement = function(options, self) { if (Ox.every(item.durations)) { item.duration = Ox.sum(item.durations); item.offsets = Ox.range(item.parts).map(function(i) { - return Ox.sum(Ox.sub(item.durations, 0, i)); + return Ox.sum(item.durations.slice(0, i)); }); //Ox.Log('Video', 'METADATA OF', src, 'LOADED', item) if (self.isPlaylist) { diff --git a/source/Ox.UI/js/Window/Ox.Dialog.js b/source/Ox.UI/js/Window/Ox.Dialog.js index a0ec5150..fb7e68a8 100644 --- a/source/Ox.UI/js/Window/Ox.Dialog.js +++ b/source/Ox.UI/js/Window/Ox.Dialog.js @@ -498,8 +498,8 @@ Ox.Dialog = function(options, self) { buttonsRight, index = Ox.indexOf(self.options.buttons, Ox.isEmpty); if (index) { - buttonsLeft = Ox.sub(self.options.buttons, 0, index); - buttonsRight = Ox.sub(self.options.buttons, index + 1); + buttonsLeft = self.options.buttons.slice(0, index); + buttonsRight = self.options.buttons.slice(index + 1); } else { buttonsLeft = []; buttonsRight = self.options.buttons; diff --git a/source/Ox/js/Array.js b/source/Ox/js/Array.js index 8e845c40..3944672f 100644 --- a/source/Ox/js/Array.js +++ b/source/Ox/js/Array.js @@ -214,8 +214,8 @@ Ox.api = function(items, options) { } if (options.range) { // apply range - result.data.items = Ox.sub( - result.data.items, options.range[0], options.range[1] + result.data.items = result.data.items.slice( + options.range[0], options.range[1] ); } } diff --git a/source/Ox/js/Geo.js b/source/Ox/js/Geo.js index 93c98ff1..dc189bf7 100644 --- a/source/Ox/js/Geo.js +++ b/source/Ox/js/Geo.js @@ -314,7 +314,7 @@ } }; } - Ox.forEach(Ox.sub(areas, 1), function(parts) { + Ox.forEach(areas.slice(1), function(parts) { if (ret.length == 1 && parts.length == 1) { ret = intersect(ret[0], parts[0]); } else { @@ -383,7 +383,7 @@ }); return ret; } - Ox.sub(areas, 1).forEach(function(area) { + areas.slice(1).forEach(function(area) { var index, indices, intersections; if (area.sw.lat < ret.sw.lat) { ret.sw.lat = area.sw.lat; diff --git a/source/Ox/js/JavaScript.js b/source/Ox/js/JavaScript.js index f6b760fb..fcebca11 100644 --- a/source/Ox/js/JavaScript.js +++ b/source/Ox/js/JavaScript.js @@ -280,7 +280,7 @@ Ox.doc = (function() { } }); function unwrap(str) { - return (isArray = /^\[.+\]$/.test(str)) ? Ox.sub(str, 1, -1) : str; + return (isArray = /^\[.+\]$/.test(str)) ? str.slice(1, -1) : str; } function wrap(str) { return isArray ? '[' + str + 's' + ']' : str;