MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / openPopupWithHtml

Function openPopupWithHtml

scripts/helpers/utils.js:693–706  ·  view source on GitHub ↗
(html, width = 300, height = 300)

Source from the content-addressed store, hash-verified

691}
692
693export function openPopupWithHtml(html, width = 300, height = 300) {
694 let win = window.open(
695 "",
696 "",
697 `scrollbars=yes,width=${width},height=${height}`
698 );
699 win.document.write(html);
700 setTimeout(() => {
701 win.focus();
702 }, 500);
703 return {
704 closePopup: () => win?.close?.(),
705 };
706}
707
708// #endregion

Callers 4

showResultFunction · 0.85
savevideo_me.jsFile · 0.85

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected