MCPcopy Create free account
hub / github.com/Normal-Tangerine8609/Scriptable-Widgets / presentError

Function presentError

widgets/tildes-widget.js:178–190  ·  view source on GitHub ↗
(message)

Source from the content-addressed store, hash-verified

176
177// Function to present an error in a widget
178function presentError(message) {
179 const widget = new ListWidget();
180 widget.backgroundColor = Color.black();
181
182 const text = widget.addText(message);
183 text.font = new Font("Menlo", 20);
184 text.centerAlignText();
185 text.minimumScaleFactor = 0.8;
186 text.textColor = Color.red();
187
188 Script.setWidget(widget);
189 widget.presentSmall();
190}
191
192// Function to get the Tildes data
193async function getTildesData(query) {

Callers 1

tildes-widget.jsFile · 0.70

Calls 3

presentSmallMethod · 0.80
addTextMethod · 0.45
centerAlignTextMethod · 0.45

Tested by

no test coverage detected