From e5119a1344db2bdffa5aa485b5e88c9d1eb3e0a1 Mon Sep 17 00:00:00 2001 From: octospacc Date: Tue, 28 Mar 2023 18:30:19 +0200 Subject: [PATCH] Fix Mines. --- Assets/Assets/MinesweeperEmbed.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Assets/Assets/MinesweeperEmbed.js b/Assets/Assets/MinesweeperEmbed.js index c5d0f8f..25b7a7f 100644 --- a/Assets/Assets/MinesweeperEmbed.js +++ b/Assets/Assets/MinesweeperEmbed.js @@ -73,6 +73,7 @@ document.querySelectorAll('.Minesweeper').forEach(function(Container){ // Add notice to the user saying to win a game to see the content underneath // TODO: Maybe put it instead of the iframe, with a button, and when the user clicks that the iframe is set up? var NoticeEl = document.createElement('p'); + NoticeEl.className = 'Minesweeper-Locker-Notice'; NoticeEl.innerHTML = Notices.NoticeLocked; Container.before(NoticeEl); @@ -154,7 +155,9 @@ document.querySelectorAll('.Minesweeper').forEach(function(Container){ }; LockedEl.style['padding-left'] = ''; LockedEl.style['padding-right'] = ''; - NoticeEl.remove(); + document.querySelectorAll('.Minesweeper-Locker-Notice').forEach(function(El){ + El.remove(); + }); SetupLockGame(); WindowWidth = window.innerWidth; };