utils._routeType: object
| Field | Type | Description |
|---|---|---|
host |
str | "defly.io" |
params |
str | Use _route.params['example'] !== null to check if ?example is present in the URL |
path |
str | "/" |
url |
str | "https://defly.io/" |
utils.getAccountDataType: Function
Retrieves the current account data.
utils.getAccountData().then((data) => {
// Do something with data...
})
utils.getExtensionAccountDataType: Function
Retrieves the current extension account data.
utils.getExtensionAccountData().then((data) => {
// Do something with data...
})
utils.ConfigType: object
utils.Config.CloudSaves data to the cloud using the website's storage, making it accessible across different devices connected to the same DPU account.
Type: Function
| Field | Required | Type | Description |
|---|---|---|---|
feature |
True | str | Feature name |
key |
True | str | Variable name |
callback |
False | fn | Called when the request completes |
Type: Function
| Field | Required | Type | Description |
|---|---|---|---|
feature |
True | str | Feature name |
key |
True | str | Variable name |
value |
True | str | Data to store |
callback |
False | fn | Called when the request completes |
utils.Config.LocalType: Function
| Field | Required | Type | Description |
|---|---|---|---|
key |
True | str | Variable name |
Type: Function
| Field | Required | Type | Description |
|---|---|---|---|
key |
True | str | Variable name |
value |
True | str | Data to store |
utils.applyStylesType: Function
Injects CSS into the page.
| Field | Required | Type | Description |
|---|---|---|---|
styles |
True | str | CSS string to apply |
id |
False | str | ID of the style element |
utils.applyHTMLType: Function
Injects HTML into the page.
| Field | Required | Type | Description |
|---|---|---|---|
html |
True | str | HTML string to inject |
location |
False | str | Selector path for the target element |
id |
False | str | ID of the container element |
utils.popupType: Function
Displays a popup with custom HTML content.
| Field | Required | Type | Description |
|---|---|---|---|
id |
True | str | ID of the container element |
html |
True | str | HTML content to display |
utils.watchStylesType: Function
Watches a target element for style changes and fires a callback when they occur.
| Field | Required | Type | Description |
|---|---|---|---|
element |
True | HTMLInputElement | Target element to watch |
callback |
True | fn | Called when a style change is detected |
utils.changeShowStateType: Function
Cycles a target element through three visibility states: visible, 50% opacity, and hidden.
| Field | Required | Type | Description |
|---|---|---|---|
element |
True | HTMLInputElement | Target element |
utils.hexToHslType: Function
Converts a hexadecimal color code to HSL.
| Field | Required | Type | Description |
|---|---|---|---|
hex |
True | str | Hexadecimal color code |
utils.hslToHexType: Function
Converts HSL values to a hexadecimal color code.
| Field | Required | Type | Description |
|---|---|---|---|
h |
True | int | Hue |
s |
True | int | Saturation |
l |
True | int | Lightness |
utils.filesType: object
Type: Function
Downloads a file to the user's device.
| Field | Required | Type | Description |
|---|---|---|---|
data |
True | str | File content |
filename |
True | str | Name of the file |
type |
True | str | File extension |
Type: class
Creates a new file uploader instance.
| Field | Required | Type | Description |
|---|---|---|---|
id |
True | str | ID of the uploader instance |
onchange |
True | fn | Callback fired on file selection |
accept |
True | str | Accepted file types |
utils.setNFSType: Function
Sets the allowed frame shift range.
| Field | Required | Type | Description |
|---|---|---|---|
min |
True | int | Minimum frame shift |
max |
False | int | Maximum frame shift |
utils.isActiveTabType: Function
Returns a bool indicating whether the user is currently focused on the page.
utils.get1v1PlayersType: Function
Returns a list of player names in the current 1v1 match.
window.codertjpType: String
Returns the URL to codertjp. This may point to the dev site, a local instance, or the public site depending on the environment.