1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 21:00:23 +01:00
CanvasBlocker/test/dataUrlTest.js

13 lines
356 B
JavaScript
Raw Normal View History

(function(){
"use strict";
2019-12-16 19:27:28 +01:00
const iframeCode = atob(
document.getElementById("iframe").src.replace(/^.+base64,/, "")
);
document.getElementById("code").textContent = iframeCode;
2019-12-16 19:27:28 +01:00
const blob = new Blob([iframeCode], {type: "text/html"});
const newurl = window.URL.createObjectURL(blob);
document.getElementById("blobIframe").src = newurl;
}());