mirror of
https://github.com/ThisIsBenny/iOS-Widgets.git
synced 2025-05-12 17:37:43 +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.
|
// Variables used by Scriptable.
|
||||||
// These must be at the very top of the file. Do not edit.
|
// These must be at the very top of the file. Do not edit.
|
||||||
// icon-color: deep-blue; icon-glyph: shopping-cart;
|
// icon-color: deep-blue; icon-glyph: shopping-cart;
|
||||||
// Version 1.1.3
|
// Version 1.1.4
|
||||||
|
|
||||||
const cacheMinutes = 60 * 2
|
const cacheMinutes = 60 * 2
|
||||||
const today = new Date()
|
const today = new Date()
|
||||||
|
@ -10,16 +10,19 @@ const h = 5
|
||||||
const debug = false
|
const debug = false
|
||||||
|
|
||||||
if (config.widgetFamily === 'small') {
|
if (config.widgetFamily === 'small') {
|
||||||
width = 100
|
width = 200
|
||||||
} else {
|
} else {
|
||||||
width = 300
|
width = 400
|
||||||
}
|
}
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
let widgetInputRAW = args.widgetParameter;
|
let widgetInputRAW = args.widgetParameter;
|
||||||
let widgetInput;
|
let widgetInput;
|
||||||
if (widgetInputRAW !== null) {
|
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])) {
|
if (widgetInput[2] && !/^[\d]+$/.test(widgetInput[2])) {
|
||||||
throw new Error('Third parameter has to be a number')
|
throw new Error('Third parameter has to be a number')
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue