Skip to content

Commit

Permalink
~
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent.abbal committed Nov 30, 2024
1 parent af5bb1b commit ea74522
Show file tree
Hide file tree
Showing 7 changed files with 195 additions and 183 deletions.
194 changes: 11 additions & 183 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,184 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="google" value="notranslate">
<meta name="description" content="TurboWarp is a Scratch mod with a compiler to run projects faster, dark mode for your eyes, a bunch of addons to improve the editor, and more." />
<title>TurboWarp - Run Scratch projects faster</title>
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">

<link rel="manifest" href="manifest.webmanifest">

<style>
.splash-screen {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
display: flex;
flex-direction: column;
gap: 1rem;
align-items: center;
justify-content: center;
text-align: center;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.splash-screen[hidden] {
display: none;
}
.splash-screen[data-theme="dark"] {
background-color: #333;
color: white;
}
.splash-screen > * {
max-width: 80%;
}
.splash-spinner:after {
content: " ";
display: block;
width: 64px;
height: 64px;
border-radius: 50%;
border: 6px solid;
border-color: currentColor transparent currentColor transparent;
animation: splash-spinner 1.2s linear infinite;
}
@keyframes splash-spinner {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.splash-error-title {
font-weight: bold;
}
.splash-error-title a {
color: inherit;
}
.splash-errors {
font-family: monospace;
}
.splash-error-list {
white-space: pre-wrap;
}
.splash-reset {
color: inherit;
background: none;
padding: 0;
margin: 0;
border: none;
text-decoration: underline;
cursor: pointer;
}
.splash-reset:disabled {
opacity: 0.8;
}
</style>
</head>
<body>
<noscript>
<div class="splash-screen">
<div>
<h1>TurboWarp requires JavaScript</h1>
<p>Consider using <a href="https://desktop.turbowarp.org/">TurboWarp Desktop</a> if you are afraid of remote JavaScript.</p>
</div>
</div>
</noscript>

<div class="splash-screen spash-waiting-for-js" hidden>
<div class="splash-spinner"></div>

<div class="splash-error-title" hidden>Something went wrong. <a href="https://scratch.mit.edu/users/GarboMuffin/#comments" target="_blank" rel="noreferrer">Please report</a> with the information below.</div>
<div class="splash-errors" hidden></div>
<button class="splash-reset" hidden>Click here to reset caches (can fix some errors)</button>
</div>

<script>
(function () {
'use strict';

var theme = '';
var accent = '#ff4c4c';

try {
var themeSetting = localStorage.getItem('tw:theme');
} catch (e) {
// ignore
}
if (themeSetting === 'light') {
theme = 'light';
} else if (themeSetting === 'dark') {
theme = 'dark';
} else if (themeSetting) {
try {
var parsed = JSON.parse(themeSetting);
if (parsed.accent === 'purple') {
accent = '#855cd6';
} else if (parsed.accent === 'blue') {
accent = '#4c97ff';
}
if (parsed.gui === 'dark' || parsed.gui === 'light') {
theme = parsed.gui;
}
} catch (e) {
// ignore
}
}

if (!theme) {
theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
}

var splash = document.querySelector('.spash-waiting-for-js');
splash.setAttribute('data-theme', theme);
if (theme !== 'dark') {

splash.style.color = accent;

}
splash.hidden = false;

var splashErrorTitle = document.querySelector('.splash-error-title');
var splashError = document.querySelector('.splash-errors');
var splashReset = document.querySelector('.splash-reset');

var totalErrors = 0;
window.onerror = function (event, source, line, col, err) {
if (++totalErrors > 5) return; // dont bother logging more
splashErrorTitle.hidden = splashError.hidden = splashReset.hidden = false;
var el = document.createElement('div');
el.textContent = 'Error (splash) in ' + source + ' (' + line + ':' + col + '): ' + err;
splashError.appendChild(el);
};

splashReset.onclick = function () {
splashReset.disabled = true;
function hardRefresh() {
var search = location.search.replace(/[?&]nocache=\d+/, '');
location.replace(location.pathname + search + (search ? '&' : '?') + 'nocache=' + Math.floor(Math.random() * 100000));
}
if ('serviceWorker' in navigator) {
setTimeout(hardRefresh, 5000);
navigator.serviceWorker.getRegistration("")
.then(function(registration) {
if (registration) {
return registration.unregister();
}
})
.then(hardRefresh)
.catch(hardRefresh);
} else {
hardRefresh();
}
};

window.SplashEnd = () => {
splash.hidden = true;
window.onerror = null;
};
})();
</script>

<div id="app"></div>
<script src="js/vendors~addon-settings~credits~editor~embed~fullscreen~player.js"></script><script src="js/vendors~editor~embed~fullscreen~player.js"></script><script src="js/addon-settings~addons~editor~fullscreen~player.js"></script><script src="js/addon-settings~editor~embed~fullscreen~player.js"></script><script src="js/player.js"></script></body>
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="https://www.nuitducode.net/img/favicon.svg">
<title>NDC Lecteur Scratch</title>
</head>
<body>
<code>Format: https://nuitducode.github.io/ndc-lecteur-scratch/embed.html?project_url=www.site.com/jeu.sb3<code>
</body>
</html>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
184 changes: 184 additions & 0 deletions old/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="google" value="notranslate">
<meta name="description" content="TurboWarp is a Scratch mod with a compiler to run projects faster, dark mode for your eyes, a bunch of addons to improve the editor, and more." />
<title>TurboWarp - Run Scratch projects faster</title>
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">

<link rel="manifest" href="manifest.webmanifest">

<style>
.splash-screen {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
display: flex;
flex-direction: column;
gap: 1rem;
align-items: center;
justify-content: center;
text-align: center;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.splash-screen[hidden] {
display: none;
}
.splash-screen[data-theme="dark"] {
background-color: #333;
color: white;
}
.splash-screen > * {
max-width: 80%;
}
.splash-spinner:after {
content: " ";
display: block;
width: 64px;
height: 64px;
border-radius: 50%;
border: 6px solid;
border-color: currentColor transparent currentColor transparent;
animation: splash-spinner 1.2s linear infinite;
}
@keyframes splash-spinner {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.splash-error-title {
font-weight: bold;
}
.splash-error-title a {
color: inherit;
}
.splash-errors {
font-family: monospace;
}
.splash-error-list {
white-space: pre-wrap;
}
.splash-reset {
color: inherit;
background: none;
padding: 0;
margin: 0;
border: none;
text-decoration: underline;
cursor: pointer;
}
.splash-reset:disabled {
opacity: 0.8;
}
</style>
</head>
<body>
<noscript>
<div class="splash-screen">
<div>
<h1>TurboWarp requires JavaScript</h1>
<p>Consider using <a href="https://desktop.turbowarp.org/">TurboWarp Desktop</a> if you are afraid of remote JavaScript.</p>
</div>
</div>
</noscript>

<div class="splash-screen spash-waiting-for-js" hidden>
<div class="splash-spinner"></div>

<div class="splash-error-title" hidden>Something went wrong. <a href="https://scratch.mit.edu/users/GarboMuffin/#comments" target="_blank" rel="noreferrer">Please report</a> with the information below.</div>
<div class="splash-errors" hidden></div>
<button class="splash-reset" hidden>Click here to reset caches (can fix some errors)</button>
</div>

<script>
(function () {
'use strict';

var theme = '';
var accent = '#ff4c4c';

try {
var themeSetting = localStorage.getItem('tw:theme');
} catch (e) {
// ignore
}
if (themeSetting === 'light') {
theme = 'light';
} else if (themeSetting === 'dark') {
theme = 'dark';
} else if (themeSetting) {
try {
var parsed = JSON.parse(themeSetting);
if (parsed.accent === 'purple') {
accent = '#855cd6';
} else if (parsed.accent === 'blue') {
accent = '#4c97ff';
}
if (parsed.gui === 'dark' || parsed.gui === 'light') {
theme = parsed.gui;
}
} catch (e) {
// ignore
}
}

if (!theme) {
theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
}

var splash = document.querySelector('.spash-waiting-for-js');
splash.setAttribute('data-theme', theme);
if (theme !== 'dark') {

splash.style.color = accent;

}
splash.hidden = false;

var splashErrorTitle = document.querySelector('.splash-error-title');
var splashError = document.querySelector('.splash-errors');
var splashReset = document.querySelector('.splash-reset');

var totalErrors = 0;
window.onerror = function (event, source, line, col, err) {
if (++totalErrors > 5) return; // dont bother logging more
splashErrorTitle.hidden = splashError.hidden = splashReset.hidden = false;
var el = document.createElement('div');
el.textContent = 'Error (splash) in ' + source + ' (' + line + ':' + col + '): ' + err;
splashError.appendChild(el);
};

splashReset.onclick = function () {
splashReset.disabled = true;
function hardRefresh() {
var search = location.search.replace(/[?&]nocache=\d+/, '');
location.replace(location.pathname + search + (search ? '&' : '?') + 'nocache=' + Math.floor(Math.random() * 100000));
}
if ('serviceWorker' in navigator) {
setTimeout(hardRefresh, 5000);
navigator.serviceWorker.getRegistration("")
.then(function(registration) {
if (registration) {
return registration.unregister();
}
})
.then(hardRefresh)
.catch(hardRefresh);
} else {
hardRefresh();
}
};

window.SplashEnd = () => {
splash.hidden = true;
window.onerror = null;
};
})();
</script>

<div id="app"></div>
<script src="js/vendors~addon-settings~credits~editor~embed~fullscreen~player.js"></script><script src="js/vendors~editor~embed~fullscreen~player.js"></script><script src="js/addon-settings~addons~editor~fullscreen~player.js"></script><script src="js/addon-settings~editor~embed~fullscreen~player.js"></script><script src="js/player.js"></script></body>
</html>
File renamed without changes.

0 comments on commit ea74522

Please sign in to comment.