Skip to content

Commit

Permalink
Add domain warning (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
frostzzone authored Sep 29, 2023
1 parent ffab3ad commit 05f5ee5
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/components/BlocklyComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,26 @@ const customBlockModule = require("./NavigationBar/cbmodule");
import { disableUnapplicable } from "../restrictions";
import toolbox from "../toolbox";
var renderer = "zelos";

/* Domain change swal */
if(window.location.hostname == "scratch-for-discord.com"){
swal.fire({
title: 'Hey this domain is going to be removed',
text: "Do you want to be taken to the new domain?",
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes!',
cancelButtonText: 'No.'
}).then((result) => {
if (result.isConfirmed) {
console.log('redirecting...');
window.location.assign("https://s4d.discodes.xyz");
};
});
};

switch (String(window.location.pathname).replace(/\//gmi, "")) {
case 'rge':
renderer = "geras"
Expand Down

1 comment on commit 05f5ee5

@vercel
Copy link

@vercel vercel bot commented on 05f5ee5 Sep 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.