-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
3 lines (3 loc) · 4.28 KB
/
index.html
1
2
3
<h1>Data urls:</h1><br>
<b>#1 Open 100 about blank tabs because why not:</b> data:text/html,%3Cscript%3Efor%2528var%20i%253D0%253Bi%3C100%253Bi%2B%2B%2529%257B%250A%20%20%20%20window.open%2528%22%22%252C%20%22%22%252C%20%22%22%2529.resizeTo%2528window.screen.availWidth%252Cwindow.screen.availHeight%2529%250A%257D%250Awindow.close%28%29%3C%2Fscript%3E<br>
<b>#2 HTML editor:</b> data:text/html,%3Chtml%20style%253D%22background-color%253Ablack%253B%22%3E%250A%3Cstyle%3Ebutton%257Bborder%253Anone%253Bbackground-color%253Ablack%253Bcolor%253Awhite%253B%257D%3C%2Fstyle%3E%250A%3Cdiv%20contenteditable%253D%22true%22%20id%253D%22main%22%20spellcheck%253D%22false%22%20style%253D%22border%253A%205px%20solid%20black%253Bfont-family%253Amonospace%253B%20width%253A%20100%2525%253B%20height%253A%20100%2525%253Boutline%253A%20none%253Bbackground-color%253A%2523000%253Bcolor%253A00FF00%253B%22%20autofocus%3E%3C%2Fdiv%3E%250A%3Ctitle%3EHTML%3C%2Ftitle%3E%250A%3Cscript%20src%253D%22https%253A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Face%2F1.4.13%2Face.js%22%3E%3C%2Fscript%3E%250A%3Cscript%20src%253D%22https%253A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Face%2F1.4.13%2Fext-language%5ftools.min.js%22%3E%3C%2Fscript%3E%250A%3Cscript%3E%250A%20%20%20%20var%20editor%20%253D%20ace.edit%2528%22main%22%2529%253B%250A%20%20%20%20editor.setTheme%2528%22ace%2Ftheme%2Fambiance%22%2529%253B%250A%20%20%20%20editor.session.setMode%2528%22ace%2Fmode%2Fhtml%22%2529%253B%250A%20%20%20%20editor.setOptions%2528%257B%250A%20%20%20%20%20%20%20%20enableBasicAutocompletion%253A%20true%252C%250A%20%20%20%20%20%20%20%20enableLiveAutocompletion%253A%20true%250A%20%20%20%20%257D%2529%253B%250A%20%20%20%20function%20run%2528%2529%257B%250A%20%20%20%20%20%20%20%20let%20blob%20%253D%20new%20Blob%2528%255Beditor.getValue%2528%2529%255D%252C%20%257Btype%253A%20%2527text%2Fhtml%2527%257D%2529%253B%250A%20%20%20%20%20%20%20%20var%20n%20%253D%20window.URL.createObjectURL%2528blob%2529%253B%250A%20%20%20%20%20%20%20%20window.open%2528n%2529%253B%250A%20%20%20%20%20%20%20%20window.URL.revokeObjectURL%2528n%2529%250A%20%20%20%20%257D%250A%20%20%20%20function%20save%2528%2529%257B%250A%20%20%20%20%20%20%20%20window.open%2528%2529.document.write%2528%2527data%253Atext%2Fhtml%252C%2527%20%2B%20escape%2528editor.getValue%2528%2529%2529%2529%253B%250A%20%20%20%20%257D%250A%20%20%20%20function%20save64%2528%2529%257B%250A%20%20%20%20%20%20%20%20window.open%2528%2529.document.write%2528%2527data%253Atext%2Fhtml%253Bbase64%252C%2527%20%2B%20btoa%2528editor.getValue%2528%2529%2529%2529%253B%250A%20%20%20%20%257D%250A%20%20%20%20function%20savefile%2528%2529%257B%250A%20%20%20%20%20%20%20%20let%20link%20%253D%20document.createElement%2528%2527a%2527%2529%253B%250A%20%20%20%20%20%20%20%20var%20name%20%253D%20prompt%2528%2527What%20do%20want%20the%20file%20to%20be%20called%253F%2528include%20file%20format%2527%2529%253B%250A%20%20%20%20%20%20%20%20link.download%20%253D%20name%253B%250A%20%20%20%20%20%20%20%20let%20blob%20%253D%20new%20Blob%2528%255Beditor.getValue%2528%2529%255D%252C%20%257Btype%253A%20%2527text%2Fhtml%2527%257D%2529%253B%250A%20%20%20%20%20%20%20%20link.href%20%253D%20window.URL.createObjectURL%2528blob%2529%253B%250A%20%20%20%20%20%20%20%20link.click%2528%2529%253B%250A%20%20%20%20%20%20%20%20window.URL.revokeObjectURL%2528link.href%2529%253B%250A%20%20%20%20%257D%250A%3C%2Fscript%3E%250A%3Cbutton%20onclick%253D%22run%2528%2529%22%3ERun%3C%2Fbutton%3E%250A%3Cbutton%20onclick%253D%22save%2528%2529%22%3ESave%3C%2Fbutton%3E%250A%3Cbutton%20onclick%253D%22save64%2528%2529%22%3ESave%20as%20base64%3C%2Fbutton%3E%250A%3Cbutton%20onclick%253D%22savefile%2528%2529%22%3ESave%20as%20file%3C%2Fbutton%3E%250A%3Cbutton%20onclick%253D%22editor.setValue%2528unescape%2528prompt%2528%2527Paste%20here%2527%2529.substring%252815%2529%2529%2529%253B%22%3EImport%20From%20Data%20Url%3C%2Fbutton%3E%250A%3Cbutton%20onclick%253D%22editor.setValue%2528unescape%2528atob%2528prompt%2528%2527Paste%20here%2527%2529.substring%252822%2529%2529%2529%2529%253B%22%3EImport%20From%20Base64%20Data%20Url%3C%2Fbutton%3E%250A%3Cscript%3E%250Awindow.addEventListener%2528%2527beforeunload%2527%252C%20function%2528e%2529%257B%250A%20%20%20%20e.preventDefault%2528%2529%253B%250A%20%20%20%20e.returnValue%20%253D%20%2527%2527%253B%250A%257D%2529%253B%250A%3C%2Fscript%3E%3C%2Fhtml%3E