# Scripts

**Reference**

| Type              | Runtime                                          |
| ----------------- | ------------------------------------------------ |
| Bash (on Windows) | [Git Bash](https://gitforwindows.org)            |
| UserScript        | [Violentmonkey](https://violentmonkey.github.io) |
| DevTools          | Browser DevTools Console                         |
| Node              | [Node.js](https://nodejs.dev/)                   |
| Python            | [Python](https://www.python.org/)                |

### 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'));
    ```
