mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-02 11:01:53 +08:00
pikvm/pikvm#1148: workaround for clipboard on firefox
This commit is contained in:
@@ -170,15 +170,10 @@ export function Ocr(__getGeometry) {
|
||||
let http = tools.makeRequest("GET", url, function() {
|
||||
if (http.readyState === 4) {
|
||||
if (http.status === 200) {
|
||||
navigator.clipboard.writeText(http.responseText).then(function() {
|
||||
wm.info("The text is copied to the clipboard");
|
||||
}, function(err) {
|
||||
wm.error("Can't copy text to the clipboard:<br>", err);
|
||||
});
|
||||
wm.copyTextToClipboard(http.responseText);
|
||||
} else {
|
||||
wm.error("OCR error:<br>", http.responseText);
|
||||
}
|
||||
|
||||
tools.el.setEnabled($("stream-ocr-button"), true);
|
||||
tools.el.setEnabled($("stream-ocr-lang-selector"), true);
|
||||
$("stream-ocr-led").className = "led-gray";
|
||||
|
||||
Reference in New Issue
Block a user