Skip to content

Commit

Permalink
Working commit
Browse files Browse the repository at this point in the history
  • Loading branch information
abchatra committed Mar 3, 2025
1 parent efdab64 commit 05a1973
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions docfiles/script.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ <h2 class="ui item header no-select">@title@</h2>
<button id="multiplayer-share-button" class="ui mini default button" role="menuitem" style="display: none">Host Game</button>
<div class="dropdown">
<button onclick="toggleDropdown()">Send To ▼</button>
<div id="send-to-dropdown-menu" class="dropdown-content">
<a href="/--kiosk" target="_blank" rel="noopener">Kiosk</a>
<a href="/--eval" target="_blank" rel="noopener">Code Eval tool</a>
<div id="dropdownMenu" class="dropdown-content">
<a href="#" onclick="openLink('/--kiosk')">Kiosk</a>
<a href="#" onclick="openLink('/--eval')">Code Eval tool</a>
</div>
</div>
<a href="https://makecode.com/org" title="Go to Microsoft MakeCode" aria-label="Microsoft MakeCode Logo" role="menuitem" target="blank" rel="noopener" class="ui item logo organization no-select">
Expand Down Expand Up @@ -180,7 +180,6 @@ <h2 class="ui item header no-select">@title@</h2>
</div>
<div class="script-bookend">
<div style="text-align: center;">

<div class="ui container horizontal mini link list">
<!-- <a class="ui item " href="https://makecode.com/contact " target="_blank " rel="noopener ">Contact Us</a> -->
<a class="ui item no-select" href="https://makecode.com/privacy " target="_blank " rel="noopener ">Privacy &amp; Cookies</a>
Expand Down Expand Up @@ -256,15 +255,17 @@ <h2 class="ui item header no-select">@title@</h2>

window.open(multiplayerHostUrl, "_blank");
})

/*
sendToDropDownMenu.addEventListener("click", function() {
window.pxtTickEvent('share.sendToDropDownMenu', { target: "arcade" });
window.pxtTickEvent('share.
', { target: "arcade" });
const domain = pxt.BrowserUtils.isLocalHostDev() ? "http://localhost:3000" : "";
const multiplayerHostUrl = `${domain}${pxt.webConfig.relprefix}multiplayer?host=@id@`;
window.open(multiplayerHostUrl, "_blank");
})

*/
var shareLinkIsApproved = false;

window.pxtTargetConfigPromise
Expand Down Expand Up @@ -412,6 +413,15 @@ <h2 class="ui item header no-select">@title@</h2>
document.getElementById("dropdownMenu").classList.remove("show");
}
}

openLink = function(link) {

const domain = pxt.BrowserUtils.isLocalHostDev() ? "https://makecode.microbit.org" : "";
const evalUrl = `${domain}${pxt.webConfig.relprefix}eval?project=@id@`;

window.open(evalUrl, "_blank");
}

</script>

<!-- @include tracking.html -->
Expand Down

0 comments on commit 05a1973

Please sign in to comment.