Skip to content

Instantly share code, notes, and snippets.

for (const ele of document.querySelectorAll('.btn.btn-primary.btn-md')) {
const url = ele.href;
ele.href = "#";
ele.target = "";
ele.onclick = () => {
let f = document.createElement('iframe');
f.src = url;
f.style = 'z-index: 9999; width: 100vw; height: 100vh; position: absolute; left: 0; top: 0;';
f.onload = () => {
let cw = document.querySelector('iframe').contentWindow;