- Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDataFromShortcut.js
More file actions
Latest commit
24 lines (19 loc) · 626 Bytes
/
Copy pathDataFromShortcut.js
File metadata and controls
24 lines (19 loc) · 626 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: green; icon-glyph: magic;
functiongetInput(argName){
letparams=URLScheme.allParameters();
returndecodeURIComponent(params[argName]);
}
functioncallBack(argName,value){
letparams=URLScheme.allParameters();
letbaseURL=params['x-success'];
leturl=baseURL+'?'+argName+'='+encodeURIComponent(value);
Safari.open(url);
}
letarg=getInput('arg');
letalert=newAlert();
alert.title=arg;
alert.addAction('Continue');
awaitalert.present();
callBack('result','OK');