Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions javascript-injectors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,13 @@ $ screenly asset inject-js "$ASSET_ID" "$JAVASCRIPT_URL"
$ screenly asset inject-js "$ASSET_ID" "$JAVASCRIPT_URL"
```

## Sign in to Unifi Captive portal

```bash
* export JAVASCRIPT_URL='https://github.com/Screenly/playground/tree/master/javascript-injectors/examples/unifi-signin-via-credentials.js'
$ screenly asset inject-js "$ASSET_ID" "$JAVASCRIPT_URL"
```

## Sign in to Jenkins via credentials

<img src="../images/jenkins-logo.png" alt="Jenkins logo" width="200"/>
Expand Down Expand Up @@ -213,3 +220,10 @@ $ screenly asset inject-js "$ASSET_ID" "$JAVASCRIPT_URL"

* Download [cyfe-sign-in-via-credentials.js](https://github.com/Screenly/Playground/tree/master/javascript-injectors/examples/cyfe-sign-in-via-credentials.js) and modify it with your credentials.
* Run `screenly asset inject-js "$ASSET_ID" /path/to/script.js` to add the JavaScript

## Tableau cookies consent closing

```bash
* export JAVASCRIPT_URL='https://github.com/Screenly/playground/tree/master/javascript-injectors/examples/tableau-cookies-consent-closing.js'
$ screenly asset inject-js "$ASSET_ID" "$JAVASCRIPT_URL"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
function closeConsentbox () {
const acceptCookie = document.querySelector('button[id="onetrust-accept-btn-handler"]')
if (acceptCookie) {
acceptCookie.click()
}
}
setInterval(closeConsentbox(), 2000)