mirror of
https://github.com/ThisIsBenny/iOS-Widgets.git
synced 2025-04-19 15:27:40 +00:00
update apple store order status
Signed-off-by: Benny Samir Hierl <bennysamir@posteo.de>
This commit is contained in:
parent
9a87e42437
commit
3724cc7fe7
1 changed files with 8 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
|||
// Variables used by Scriptable.
|
||||
// These must be at the very top of the file. Do not edit.
|
||||
// icon-color: deep-blue; icon-glyph: shopping-cart;
|
||||
// Version 1.1.3
|
||||
// Version 1.1.4
|
||||
|
||||
const cacheMinutes = 60 * 2
|
||||
const today = new Date()
|
||||
|
@ -10,16 +10,19 @@ const h = 5
|
|||
const debug = false
|
||||
|
||||
if (config.widgetFamily === 'small') {
|
||||
width = 100
|
||||
width = 200
|
||||
} else {
|
||||
width = 300
|
||||
width = 400
|
||||
}
|
||||
////////////////////////////////////////////////////////////
|
||||
let widgetInputRAW = args.widgetParameter;
|
||||
let widgetInput;
|
||||
if (widgetInputRAW !== null) {
|
||||
widgetInput = widgetInputRAW.toString().trim().split(';')
|
||||
|
||||
widgetInput = widgetInputRAW.toString().trim().split(';').map(v => v.trim())
|
||||
|
||||
if (!/^[A-Za-z][0-9]+/.test(widgetInput[0])) {
|
||||
throw new Error('Invalid ordernumber format: "' + widgetInput[0] + '"')
|
||||
}
|
||||
if (widgetInput[2] && !/^[\d]+$/.test(widgetInput[2])) {
|
||||
throw new Error('Third parameter has to be a number')
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue