XMOJ-Script-dev / XMOJ-Script

XMOJ增强脚本
https://www.xmoj-bbs.me
GNU General Public License v3.0
5 stars 5 forks source link

[Bug] 更新死循环 #76

Closed langningchen closed 1 year ago

langningchen commented 1 year ago

检查项

描述

@PythonSmall-Q @boomzero @PythonSmall-Q @boomzero @PythonSmall-Q @boomzero @PythonSmall-Q @boomzero @PythonSmall-Q @boomzero @PythonSmall-Q @boomzero @PythonSmall-Q @boomzero @PythonSmall-Q @boomzero @PythonSmall-Q @boomzero

image

更新后还是 1.0.205 ,而不是 1.0.207

重现步骤

No response

控制台错误信息

No response

PythonSmall-Q commented 1 year ago

ok谢谢

langningchen commented 1 year ago

顺便问一下不能-=那怎样删掉部分内容

你自己好好想想

PythonSmall-Q commented 1 year ago

喵呜~lnc好强

PythonSmall-Q commented 1 year ago

我是废物

langningchen commented 1 year ago

Doge

PythonSmall-Q commented 1 year ago

image 问一下为什么这样不能恢复到原来输入的内容,(就是说没办法去掉uploading image

langningchen commented 1 year ago

他是一个指针

PythonSmall-Q commented 1 year ago

errrrrrrrr

PythonSmall-Q commented 1 year ago

langningchen commented 1 year ago

https://blog.csdn.net/icemwj/article/details/119782133

langningchen commented 1 year ago

可以参考一下这篇文章

langningchen commented 1 year ago

dispatch 我也写好了

langningchen commented 1 year ago

效果给你看一下

langningchen commented 1 year ago

https://github.com/XMOJ-Script-dev/XMOJ-Script/assets/81672884/410dc98d-0e7b-4a29-96ea-828218b4a92a

PythonSmall-Q commented 1 year ago

艹没看懂(我是傻子

PythonSmall-Q commented 1 year ago

Recording.2023-10-04.104843.mp4

哇效果真好!!!

langningchen commented 1 year ago

我也没看懂,就是你知道他是类似于指针的东西就好了

langningchen commented 1 year ago

Recording.2023-10-04.104843.mp4

哇效果真好!!!

你要吗?

PythonSmall-Q commented 1 year ago

还是喜欢c++,可以写强制转换

PythonSmall-Q commented 1 year ago

可以呀

PythonSmall-Q commented 1 year ago

(狂喜

langningchen commented 1 year ago

还是喜欢c++,可以写强制转换

所以我就说你去用 TypeScript ,而不是 JavaScript ,前者对类型要求更严格

langningchen commented 1 year ago

可以呀

我都已经是前开发者,说了不帮你们干活了……这怎么办?

PythonSmall-Q commented 1 year ago

我去改badge成开发者

PythonSmall-Q commented 1 year ago

要不就技术顾问吧

PythonSmall-Q commented 1 year ago

(没有工资的那种,就像kkksc03一样

langningchen commented 1 year ago

你看TypeScript官网,第一句话就是 TypeScript is JavaScript with syntax for types.

PythonSmall-Q commented 1 year ago

hh

你看TypeScript官网,第一句话就是 TypeScript is JavaScript with syntax for types.

langningchen commented 1 year ago

(没有工资的那种,就像kkksc03一样

那不太行,我要工资 QAQ

PythonSmall-Q commented 1 year ago

赞助分30%给你(?

PythonSmall-Q commented 1 year ago

(鸽子开始画大饼

langningchen commented 1 year ago

问题是有赞助吗?

PythonSmall-Q commented 1 year ago

可能有吧

langningchen commented 1 year ago

《可能》

langningchen commented 1 year ago

《真·可能》

langningchen commented 1 year ago

要么这样,你同意与我开发其他项目,我就给你我改的代码

PythonSmall-Q commented 1 year ago

可以。

PythonSmall-Q commented 1 year ago

(黑市交易

langningchen commented 1 year ago

比如你去用 https://github.com/langningchen/OJTool

langningchen commented 1 year ago

刚才家长来了

langningchen commented 1 year ago
ContentElement.addEventListener("paste", (EventData) => {
    let Items = EventData.clipboardData.items;
    if (Items.length !== 0) {
        for (let i = 0; i < Items.length; i++) {
            if (Items[i].type.indexOf("image") != -1) {
                let Reader = new FileReader();
                Reader.readAsDataURL(Items[i].getAsFile());
                Reader.onload = () => {
                    let Before = ContentElement.value.substring(0, ContentElement.selectionStart);
                    let After = ContentElement.value.substring(ContentElement.selectionEnd, ContentElement.value.length);
                    const UploadMessage = "![正在上传图片...]()";
                    ContentElement.value = Before + UploadMessage + After;
                    ContentElement.dispatchEvent(new Event("input"));
                    RequestAPI("UploadImage", {
                        "Image": Reader.result
                    }, (ResponseData) => {
                        if (ResponseData.Success) {
                            ContentElement.value = Before + `![](https://api.xmoj-bbs.tech/GetImage?ImageID=${ResponseData.Data.ImageID})` + After;
                            ContentElement.dispatchEvent(new Event("input"));
                        }
                        else {
                            ContentElement.value = Before + `![上传失败!]()` + After;
                            ContentElement.dispatchEvent(new Event("input"));
                        }
                    });
                };
            }
        }
    }
});
PythonSmall-Q commented 1 year ago

艹模拟赛不会做。乱胡了一个上去

langningchen commented 1 year ago

怎么样?能用吗?

PythonSmall-Q commented 1 year ago

我试试

PythonSmall-Q commented 1 year ago

image err图片加载不出来。你看看能加在吗?

langningchen commented 1 year ago

拷给我

langningchen commented 1 year ago

我不愿意手动打 ImageID

PythonSmall-Q commented 1 year ago

langningchen commented 1 year ago

哦,出来了

image

PythonSmall-Q commented 1 year ago

艹那就是我的问题了