forked from 0x2620/oxjs
some improvements for menu and select
This commit is contained in:
parent
ec1693c2c4
commit
4cc7bad63c
2 changed files with 29 additions and 23 deletions
|
|
@ -80,7 +80,7 @@ Ox.user = function() {
|
|||
var result = re(v);
|
||||
results[result[1].replace(/Your |\*/, "")] = result[2];
|
||||
});
|
||||
console.log(results)
|
||||
Ox.print(results)
|
||||
});
|
||||
return {
|
||||
document: {
|
||||
|
|
@ -815,7 +815,7 @@ Encoding functions
|
|||
}
|
||||
c.context.putImageData(c.imageData, 0, 0);
|
||||
data = atob(c.canvas.toDataURL().split(",")[1]);
|
||||
console.log("deflate", len, "->", data.length - 20);
|
||||
Ox.print("deflate", len, "->", data.length - 20);
|
||||
return data.substr(8, data.length - 20);
|
||||
}
|
||||
|
||||
|
|
@ -827,7 +827,7 @@ Encoding functions
|
|||
str = Ox.map(Ox.canvas(image).data, function(v, i) {
|
||||
return i % 4 < 3 ? Ox.char(v) : "";
|
||||
}).join("");
|
||||
//console.log(str.length, "len", Ox.decodeBase256(str.substr(0, 4)), str)
|
||||
//Ox.print(str.length, "len", Ox.decodeBase256(str.substr(0, 4)), str)
|
||||
return Ox.decodeUTF8(str.substr(4, Ox.decodeBase256(str.substr(0, 4))));
|
||||
}
|
||||
|
||||
|
|
@ -916,7 +916,7 @@ Encoding functions
|
|||
if (len == 0 && !flag) {
|
||||
len = Ox.decodeBase256(str);
|
||||
if (len <= 0 || len > max(img.width, img.height)) {
|
||||
console.log(len);
|
||||
Ox.print(len);
|
||||
throwPNGError("de");
|
||||
}
|
||||
str = "";
|
||||
|
|
@ -927,7 +927,7 @@ Encoding functions
|
|||
try {
|
||||
return Ox.decodeDeflate(str);
|
||||
} catch(e) {
|
||||
console.log(e.toString());
|
||||
Ox.print(e.toString());
|
||||
throwPNGError("de");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue