-
-
Notifications
You must be signed in to change notification settings - Fork 88
Expand file tree
/
Copy pathcapacitor.mjs
More file actions
26 lines (24 loc) · 796 Bytes
/
Copy pathcapacitor.mjs
File metadata and controls
26 lines (24 loc) · 796 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { NodeJS } from 'capacitor-nodejs'
import { KeepAwake } from '@capacitor-community/keep-awake';
import { App } from '@capacitor/app';
import { NativeFileDownloader } from '@eoscz/capacitor-plugin-native-file-downloader'
import { Keyboard } from '@capacitor/keyboard';
import { Share } from '@capacitor/share';
import { Clipboard } from '@capacitor/clipboard';
import { BackgroundMode } from '@anuradev/capacitor-background-mode';
import { PIP } from 'tv.megacubo.pip';
const clipboard = async text => {
if(typeof text === 'string') {
await Clipboard.write({string: text})
} else {
const { type, value } = await Clipboard.read()
return {type, value}
}
}
window.capacitor = {
NodeJS, App, Share,
KeepAwake, Keyboard,
NativeFileDownloader,
clipboard, PIP,
BackgroundMode
}