-
I created this data uri: data:text/html,%0A%3Cscript%3E%0Afetch(%22https%3A%2F%2Ftiddlywiki.com%22)%0A%20%20.then(result%20%3D%3E%20result.text())%0A%20%20.then(html%20%3D%3E%20%7B%0A%20%20%20%20document.open()%3B%0A%20%20%20%20document.write(html)%3B%0A%20%20%20%20document.close()%3B%0A%20%20%7D)%3B%0A%3C%2Fscript%3E%0A It contains this javascript code: <script>
fetch("https://tiddlywiki.com")
.then(result => result.text())
.then(html => {
document.open();
document.write(html);
document.close();
});
</script> When I paste the above data uri into the browser bar, it will successfully load tiddlywiki.com. However it pops up a "Save your work" modal dialog box whose instructions I don't really understand. @Jermolene do you recall the reason for this modal? The modal was introduced in 2012 in this commit: 507460e Here is the current code which launches this modal: After closing the modal, I'm able to save changes just fine using the download saver. I didn't need to follow any of the instructions given in the modal. Though the filename of the downloaded file is pretty ugly. For what use-case does that modal help? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @btheado good sleuthing! That stuff was to support Safari, which at that time did not support the "download" attribute on the anchor element. Instead, it was possible to create a bookmark from the base64 representation of the wiki. I think the download attribute has now been supported on Safari for several years, so no doubt it can all be removed now. |
Beta Was this translation helpful? Give feedback.
Hi @btheado good sleuthing! That stuff was to support Safari, which at that time did not support the "download" attribute on the anchor element. Instead, it was possible to create a bookmark from the base64 representation of the wiki.
I think the download attribute has now been supported on Safari for several years, so no doubt it can all be removed now.