OYA Download, Copy & Device Info
Download files, copy to clipboard, detect phone, tablet or desktop, and set or clean URL parameters without a reload.
Getting started#
- In the Bubble editor, open Plugins, choose Add plugins and search for “OYA Download, Copy & Device Info”. Install it.
- For the device information and the events, place one OYA Browser element on the page. It is invisible and any size will do. The six actions work without it.
- Add the actions to your workflows, for example: When Button Export is clicked → OYA Browser — Download text as a file, with Content set to your CSV text and File name to export.csv.
- Use the element’s states in conditions and text, for example: OYA Browser A’s is a phone is yes.
The element: OYA Browser#
An invisible element. Place one on a page to read the visitor's device, browser, operating system, screen and settings as states, and to hear when an OYA Browser action has copied or downloaded something (the events). The actions below work without it; it is only needed for the states and events.
| Setting | Type | Notes |
|---|---|---|
| Update the viewport size when the window is resized | yes / no | Off: the viewport states are read once, when the page loads. Required. Default: yes. |
States#
Read them as OYA Browser A's … in any expression or condition.
| State | Type | What it holds |
|---|---|---|
| device (phone, tablet or computer) | text | One of phone, tablet, computer. |
| is a phone | yes / no | |
| is a tablet | yes / no | |
| is a computer | yes / no | |
| browser name | text | Chrome, Safari, Firefox, Edge, Opera, Samsung Internet, or empty when not recognised. |
| browser version | text | |
| operating system | text | Windows, macOS, iOS, iPadOS, Android, ChromeOS, Linux, or empty. |
| operating system version | text | |
| operating system architecture (32 or 64) | number | Empty when the browser does not say. |
| operating system description | text | Name, version and architecture in one line, e.g. "Windows 10 64-bit". |
| browser and system description | text | e.g. "Chrome 130.0 on Windows 10 64-bit". |
| has a touch screen | yes / no | |
| viewport width (px) | number | |
| viewport height (px) | number | |
| preferred language | text | A language tag such as en-AU. |
| time zone | text | An IANA zone such as Australia/Sydney. |
| URL parameters (the text after ?) | text | |
| last copied text | text | |
| last downloaded file name | text | |
| last copy or download error | text |
Events#
Start a workflow with When OYA Browser A ….
| Event | When it fires |
|---|---|
| text copied | When the matching action finishes. |
| copy failed | When the matching action finishes. |
| file downloaded | When the matching action finishes. |
| download failed | When the matching action finishes. |
| URL parameters changed | When the matching action finishes. |
Read the device again (an element action): Re-reads every state now (normally they update by themselves).
Actions#
All six run in the visitor’s browser (client side). Find them under Plugins in the workflow editor.
Download file from URL#
Saves the file at a URL to the visitor's device under the name given. Files uploaded to your app download directly; a file on another site that does not allow it is opened in a new tab instead.
| Field | Type | Notes |
|---|---|---|
| File URL | text | Required. |
| Save as (file name) | text | Empty: the name at the end of the URL. Optional. |
Download text as a file#
Saves text your app builds (plain text, CSV, JSON, HTML…) as a file on the visitor's device.
| Field | Type | Notes |
|---|---|---|
| Content | text | Required. |
| File name | text | Required. Default: download.txt. |
| File type (MIME) | text | Empty: chosen from the file name's extension (.csv is text/csv, .json is application/json, otherwise text/plain). Optional. |
| Add a byte-order mark (helps Excel read accented CSV) | yes / no | Optional. Default: no. |
Copy to clipboard#
Copies text to the visitor's clipboard. Run it from a click: browsers only allow copying in answer to the visitor's own action.
| Field | Type | Notes |
|---|---|---|
| Text to copy | text | Required. |
Set URL parameter#
Sets one parameter in the page's address without reloading the page. An empty value removes the parameter.
| Field | Type | Notes |
|---|---|---|
| Parameter name | text | Required. |
| Value | text | Optional. |
| Add to the browser's history (Back returns to the old address) | yes / no | Optional. Default: no. |
Remove URL parameters#
Removes the named parameters from the page's address without reloading the page.
| Field | Type | Notes |
|---|---|---|
| Parameter names (comma-separated) | text | Required. |
Clean URL parameters#
Tidies the page's address without reloading: removes empty parameters, and, when a list is given, every parameter not on it.
| Field | Type | Notes |
|---|---|---|
| Keep only these parameters (comma-separated; empty keeps all) | text | Optional. |
| Remove parameters with no value | yes / no | Required. Default: yes. |
Good to know#
Copying and downloading must start from a click. Browsers only allow them in answer to the visitor’s own action, so a copy run from “Page is loaded” fails, and the copy failed event says so.
A file on another site that does not allow direct downloads opens in a new tab instead of saving. Files uploaded to your own app always download directly.
Set URL parameter changes the page’s address in place: no “Go to page” back to the current page, no reload. Its Parameter name can be dynamic as well as its value, so one action can serve a whole row of filters. (Bubble’s own “Get data from page URL” still reads by a fixed name; the element’s URL parameters state gives you all of them.)
The states update by themselves: the viewport on resize, the URL parameters whenever these actions change them. “Read the device again” re-reads everything at once, for changes the element cannot see, such as another script changing the address.
Nothing is sent anywhere. Everything is read and done in the visitor’s browser, with no keys and no accounts.
How it is tested#
Before every release the plugin passes its checklist inside a Bubble app. The latest run, 25 October 2026:
Inside a Bubble app: 31 of 31 checklist steps, with the plugin installed on a test app that holds no data.
In a test page, in a real browser: 52 of 52 checklist steps and 64 of 64 deeper checks, on a desktop screen and an emulated iPhone.
Unit tests: 30 unit tests on the shared code and 2 on the plugin code, run on every change.
Licence and support#
Free and open source under the MIT licence: the code may be read, copied and changed. Version 1.0.0, released 9 November 2026.
To report a problem or ask a question, email support@ownyourapp.io. Please say which plugin and version, and what you expected to happen.