extract settings from main
This commit is contained in:
parent
0b997bb8e2
commit
0e3074229a
5 changed files with 524 additions and 496 deletions
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
(function () {
|
||||
|
||||
const { kiri, moto } = self;
|
||||
const { kiri, moto, data } = self;
|
||||
|
||||
function parseOpt(ov) {
|
||||
let opt = {}, kv, kva;
|
||||
|
|
@ -46,6 +46,10 @@ function js2o(s,def) {
|
|||
}
|
||||
}
|
||||
|
||||
function ls2o(key,def) {
|
||||
return js2o(data.local.getItem(key),def);
|
||||
}
|
||||
|
||||
// split 24 bit color into [ r, g, b ]
|
||||
function rgb(c) {
|
||||
return [ (c >> 16) & 0xff, (c >> 8) & 0xff, c & 0xff ];
|
||||
|
|
@ -96,6 +100,7 @@ kiri.utils = {
|
|||
ajax,
|
||||
o2js,
|
||||
js2o,
|
||||
ls2o,
|
||||
avgc,
|
||||
rgb,
|
||||
a2c
|
||||
|
|
|
|||
Loading…
Reference in a new issue