├── README.md ├── index.html └── index.js /README.md: -------------------------------------------------------------------------------- 1 | # A:BC (About:Blank Cloak) 2 | A javascript library for creating websites with hidden urls. [Demo](https://fognetwork.github.io/ABC) 3 | 4 | ## Types 5 | ### About 6 | This method seems to be quite old and I first found in an old bookmarklet that had many little features using it to "clone" websites by geting the innerHTML of the whole page and making it in an about:blank page. To use it you just make a new var with a window.open like `var page = window.open()` but not adding a url. Then use innerHTML of document write like `page.document.write("test")`. It has been used in SC and Utopia but can be found in older bookmarklets. 7 | 8 | ### Blob 9 | This method creates a blob url (a temporary url that thats stores data in a file-like object). It's a feature thats used by many websites and is well documented but not used by the community. You can find the official Mdn docs [here](https://developer.mozilla.org/en-US/docs/Web/API/Blob). 10 | 11 | ### Overwrite 12 | Just sets the innerHTML of the current page. 13 | 14 | ## Notes 15 | ### How it Works 16 | Basically creates a full screen iframe with whatever url you want. 17 | 18 | ### Hide From History 19 | The about method does hide the website from your history. The blob one does go into your history but is deleted very soon after. The overwrite method just shows the current website you are on. Extensions like securly that have iframe detection might still see it. 20 | 21 | ### Unblockable 22 | Despite what you have heard, it will still be blockable because your viewing the website just in an iframe. 23 | 24 | ## Basic Example 25 | Note: You can also locally host ABC on your website. Just download [this file](https://github.com/FogNetwork/ABC/blob/main/index.js) and change the src to `/index.js` or your file path 26 | 27 | **HTML** 28 | ```html 29 | 30 | ``` 31 | **Javascript** 32 | ```js 33 | //Creates new ABC 34 | var page = new ABC({ 35 |     "type": "blank", //Blank, blob, or overwrite 36 |     "url": "https://example.com" //Any url 37 | }) 38 | //Set the type 39 | page.setType("blank") 40 | //Set the url 41 | page.setUrl("https://example.com") 42 | //Get iframe code 43 | console.log(page.getCode()) 44 | //Open page 45 | page.open() 46 | ``` 47 | 48 | ## Credits 49 | Nebelung - For this thing 50 | 51 | Veracity - See below 52 | 53 | Both the about:blank method and fullscreen iframe have be around for a while but veracity combined them to from [Utopia](https://discord.gg/hFZC5cgsmq) 54 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | A:BC Demo 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 |

A:BC Demo

14 | 28 | 29 |
30 | 31 | 32 |
33 | 34 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | class ABC { 2 | constructor(config = {}) { 3 | this.type = config.type || "blank" 4 | this.url = config.url || "about:blank" 5 | } 6 | setType(type) { 7 | if (!type) return; 8 | this.type = type 9 | } 10 | setUrl(url) { 11 | if (!url) return; 12 | this.url = url 13 | } 14 | getCode() { 15 | return `` 16 | } 17 | open() { 18 | if (this.type == "blank") { 19 | try { 20 | var page = window.open() 21 | page.document.body.innerHTML = `` 22 | } catch { 23 | } 24 | } else if (this.type == "blob") { 25 | try { 26 | var page = new Blob([``], {type: "text/html"}) 27 | window.open(URL.createObjectURL(page)) 28 | } catch { 29 | } 30 | } else if (this.type == "overwrite") { 31 | try { 32 | document.body.innerHTML = `` 33 | } catch { 34 | } 35 | } 36 | } 37 | } 38 | --------------------------------------------------------------------------------