Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: ClaytonTDM <claytontdm@gmail.com>
  • Loading branch information
ClaytonTDM committed Dec 27, 2024
1 parent 95f4af2 commit 2a7f844
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion game/iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,16 @@ <h2>⚠️ Different Website Warning ⚠️</h2>
</div>
<script>
(function checkSite() {
// First check referrer - if it exists and is official site, we're good
if (document.referrer && document.referrer.includes('roblnet13.github.io')) {
return; // Exit early if referrer is from official site
}

// Otherwise check current URL only if referrer is empty/missing
var currentUrl = window.location.href;
var isOfficialSite = currentUrl.includes('roblnet13.github.io') || document.referrer.includes('roblnet13.github.io');
var isOfficialSite = !document.referrer && currentUrl.includes('roblnet13.github.io');

// Show warning if neither check passed
if (!isOfficialSite) {
document.getElementById('stolen-warning').style.display = 'flex';
}
Expand Down

0 comments on commit 2a7f844

Please sign in to comment.