scripts.md 1000 B

Scripts

Reference

Type Runtime
Bash (on Windows) Git Bash
UserScript Violentmonkey
DevTools Browser DevTools Console
Node Node.js
Python Python

Zip all folders in working directory

=== "Bash on Windows"

```sh
zipdirs () {
    for name in */; do "C:/Program Files/7-Zip/7z.exe" a -r "${name::-1}.zip" "$name"; done
}
```

Copy links of loaded albums from Amazon Music search

=== "DevTools"

```js
copy(Array.from(document.querySelectorAll('music-vertical-item[primary-href*="albums"]').map(el => location.origin + el.getAttribute('primary-href')).join('\n'));
```