https://github.com/plsankar/yeeted
Detect and escape HTML Iframe embedding
https://github.com/plsankar/yeeted
embed escape-embed escape-iframe html iframe web
Last synced: about 2 months ago
JSON representation
Detect and escape HTML Iframe embedding
- Host: GitHub
- URL: https://github.com/plsankar/yeeted
- Owner: plsankar
- License: mit
- Created: 2023-06-12T14:21:07.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-06-12T17:28:39.000Z (about 3 years ago)
- Last Synced: 2025-02-11T23:45:43.065Z (over 1 year ago)
- Topics: embed, escape-embed, escape-iframe, html, iframe, web
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/yeeted
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yeeted
Detect and escape embedding.
[](https://choosealicense.com/licenses/mit/)

[](https://npmjs.com/package/yeeted)
[](https://github.com/plsankar/yeeted/issues)
[](https://npmjs.com/package/yeeted)

[](https://github.com/plsankar/yeeted/releases)
## How does it work?
When the function is called it checks whether the current site is embeded (ie. inside a iframe), if yes then it changes the parents url to this url (ie. escape).
## Use cases
The script can be used escape iframes in demo sites, scripts and templates.
## Installation
Install `yeeted` with npm
```bash
npm install yeeted
```
or, Add via CDN Powered by [unpkg.com](https://www.unpkg.com/)
```html
```
## Usage
```javascript
yeeted();
```
```javascript
yeeted({
delay: 1000,
});
```
## API Reference
#### Get all items
```javascript
yeeted(options);
```
| Parameter | Type | Description |
| :-------- | :------- | :-------------------- |
| `delay` | `number` | Delay in milliseconds |
## License
[MIT](https://choosealicense.com/licenses/mit/)
## Run Locally
Clone the project
```bash
git clone https://github.com/plsankar/yeeted
```
Go to the project directory
```bash
cd yeeted
```
Install dependencies
```bash
npm install
```
Build the library
```bash
npm run build
```