Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

witcat ext 1.1 修复文本框获取颜色的BUG #64

Merged
merged 8 commits into from
Jan 19, 2023
4 changes: 2 additions & 2 deletions wit_cat/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ let keypress = {};
let lastKey = "", MouseWheel = 0;
let timer;


//找渲染cvs
let cvs = document.getElementsByTagName("canvas")[0];
if (cvs === null) {
Expand Down Expand Up @@ -720,7 +719,7 @@ window.tempExt = {

/* vim: set expandtab tabstop=2 shiftwidth=2: */
//颜色转换
String.prototype.colorHex = () => {
String.prototype.colorHex = function () {
// RGB颜色值的正则
var reg = /^(rgb|RGB)/;
var color = this;
Expand All @@ -741,6 +740,7 @@ String.prototype.colorHex = () => {
return String(color);
}
};

//键盘事件监听
document.addEventListener("keydown", keydown);
document.addEventListener("keyup", keyup);
Expand Down