-
Notifications
You must be signed in to change notification settings - Fork 0
/
Word Unformat.js
32 lines (26 loc) · 936 Bytes
/
Word Unformat.js
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
31
32
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: blue; icon-glyph: cut; share-sheet-inputs: plain-text;
// @ts-ignore
// eslint-disable-next-line
try { require; } catch(e) { require = importModule; }
const { getInput, string, copy, paste, output } = require('./lib/lib.js');
const main = async () => {
const input = await getInput({
name: 'Word Unformat',
help: 'Removes a string\'s formatting and copies it to the clipboard.',
inScriptable: false,
args: [{
name: 'string',
shortName: 's',
help: 'The string to remove formatting from (and copy).',
type: 'string',
share: true
}]
});
if (!input) { return; }
const outText = string(input.string) || paste();
copy(outText);
output('Word Unformat', 'Unformatted text copied to clipboard.');
};
main();