mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-08 05:32:33 +01:00
This commit is contained in:
parent
d30ba8049c
commit
9f55cd125d
2 changed files with 10 additions and 3 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue