mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-25 13:39:06 +01:00
try fix
This commit is contained in:
parent
7f96ad9cb4
commit
378ba46ef8
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "misskey",
|
||||
"version": "12.118.1-calc.rc.4",
|
||||
"version": "12.118.1-calc.rc.4.1",
|
||||
"codename": "aqua",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -146,6 +146,7 @@ export default defineComponent({
|
||||
|
||||
caption: async () => {
|
||||
const img = document.getElementById('imgtocaption');
|
||||
const textarea = document.getElementById("captioninput");
|
||||
await worker.load();
|
||||
await worker.loadLanguage('eng');
|
||||
await worker.initialize('eng', OEM.LSTM_ONLY);
|
||||
@ -153,9 +154,8 @@ export default defineComponent({
|
||||
tessedit_pageseg_mode: PSM.SINGLE_BLOCK,
|
||||
});
|
||||
const { data: { text } } = await worker.recognize(img);
|
||||
const allowedLength = 512 - this.inputValue.length;
|
||||
// @ts-ignore
|
||||
document.getElementById("captioninput").value += text.slice(0, allowedLength);
|
||||
const allowedLength = 512 - textarea.value.length;
|
||||
textarea.value += text.slice(0, allowedLength);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user