forked from 0x2620/oxjs
use [].slice, not Ox.sub
This commit is contained in:
parent
915e98f829
commit
f990f3b857
7 changed files with 10 additions and 10 deletions
|
|
@ -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]);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue