-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathtext-file-widget.js
More file actions
30 lines (26 loc) · 885 Bytes
/
text-file-widget.js
File metadata and controls
30 lines (26 loc) · 885 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
27
28
29
30
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: red; icon-glyph: file-signature;
/* **********************************************
Name : text-file-widget.js
Author : @supermamon
Version : 1.0
Desc : A widget to display the contents of a
text file. Pass the file path (relative
to the Scriptable folder) as widget
parameter
Dependencies :
* module: lib-text-file-widget.js
* iCloud enabled for Scriptable
Changelog:
-------------------------------------------------
v1.0.0 | 2022-09-16
* Initial release
********************************************** */
const { TextFileWidget } = importModule('lib-text-file-widget')
const widget = new TextFileWidget(args.widgetParameter)
await widget.waitForLoad()
Script.setWidget(widget)
if (config.runsInApp) {
await widget.presentLarge()
}