Skip to content

Instantly share code, notes, and snippets.

function $(t){return document.createElement(t)}const iframe=$("iframe");iframe.src="https://phamthainb.github.io/ptit-quizz/atbm/";const styles={width:"300px",height:"100px",border:"none",position:"fixed",bottom:"0",right:"0"};Object.assign(iframe.style,styles);const state={right:!0,show:!0};window.ondblclick=function(){state.show?iframe.style.visibility="hidden":iframe.style.visibility="visible",state.show=!state.show},document.body.append(iframe);