function fullscreen(cell, opts) {
const test =
document.body.requestFullscreen || document.body.webkitRequestFullscreen;
if (!test) return false;
if (document.body.className === "fullscreen") return false;
if (cell.fullscreenicon) cell.fullscreenicon.remove();
cell.fullscreenicon = button();
cell.fullscreenicon.onclick = () => {
const container = cell.parentNode;
if (container.requestFullscreen) container.requestFullscreen();
else if (container.webkitRequestFullscreen)
container.webkitRequestFullscreen();
};
if (cell.parentNode) {
cell.parentNode.prepend(cell.fullscreenicon, cell);
if (opts && opts.center) cell.parentNode.className += " center";
}
if (!style.attached) document.body.appendChild((style.attached = style()));
return true;
}