Vanessa 2025-12-17 09:58:37 +08:00
parent d30ba8049c
commit 9f55cd125d
2 changed files with 10 additions and 3 deletions

View file

@ -8,6 +8,10 @@ import {clipboard, ipcRenderer} from "electron";
import {processSYLink} from "../../editor/openLink";
/// #endif
export const isPhablet = () => {
return /Android|webOS|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|Tablet/i.test(navigator.userAgent) || isIPhone() || isIPad();
};
export const encodeBase64 = (text: string): string => {
if (typeof Buffer !== "undefined") {
return Buffer.from(text, "utf8").toString("base64");