mirror of
https://github.com/hkalexling/Mango.git
synced 2026-04-25 00:00:52 -04:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c9b8770b9f | |||
| e568ec8878 |
@@ -50,10 +50,10 @@ $(() => {
|
|||||||
sortedKeys.sort((a, b) => {
|
sortedKeys.sort((a, b) => {
|
||||||
// sort by frequency of the key first
|
// sort by frequency of the key first
|
||||||
if (keyRange[a][2] !== keyRange[b][2]) {
|
if (keyRange[a][2] !== keyRange[b][2]) {
|
||||||
return keyRange[a][2] < keyRange[b][2];
|
return (keyRange[a][2] < keyRange[b][2]) ? 1 : -1;
|
||||||
}
|
}
|
||||||
// then sort by range of the key
|
// then sort by range of the key
|
||||||
return (keyRange[a][1] - keyRange[a][0]) < (keyRange[b][1] - keyRange[b][0]);
|
return ((keyRange[a][1] - keyRange[a][0]) < (keyRange[b][1] - keyRange[b][0])) ? 1 : -1;
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(sortedKeys);
|
console.log(sortedKeys);
|
||||||
@@ -70,7 +70,7 @@ $(() => {
|
|||||||
return -1;
|
return -1;
|
||||||
if (a.numbers[key] === b.numbers[key])
|
if (a.numbers[key] === b.numbers[key])
|
||||||
continue;
|
continue;
|
||||||
return a.numbers[key] > b.numbers[key];
|
return (a.numbers[key] > b.numbers[key]) ? 1 : -1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
@@ -102,12 +102,11 @@ $(() => {
|
|||||||
res = ap > bp;
|
res = ap > bp;
|
||||||
}
|
}
|
||||||
if (dir === 'up')
|
if (dir === 'up')
|
||||||
return res;
|
return res ? 1 : -1;
|
||||||
else
|
else
|
||||||
return !res;
|
return !res ? 1 : -1;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
var html = '';
|
|
||||||
$('#item-container').append(items);
|
$('#item-container').append(items);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: mango
|
name: mango
|
||||||
version: 0.2.4
|
version: 0.2.5
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- Alex Ling <hkalexling@gmail.com>
|
- Alex Ling <hkalexling@gmail.com>
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ require "./context"
|
|||||||
require "./mangadex/*"
|
require "./mangadex/*"
|
||||||
require "option_parser"
|
require "option_parser"
|
||||||
|
|
||||||
VERSION = "0.2.4"
|
VERSION = "0.2.5"
|
||||||
|
|
||||||
config_path = nil
|
config_path = nil
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user