-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsalmonsays.html
154 lines (136 loc) · 6.47 KB
/
salmonsays.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<!DOCTYPE html>
<!--This is a template for creating pages for games-->
<html>
<script>
//Hi BBFC Members! To redirect this game to the under development page, uncomment it (remove // from the beginning)
//window.location.replace("https://bbfcgaming.github.io/GameDevelopment.html")
</script>
<head lang="en">
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<!--
____ ____ ____________ ______ _
/ __ )/ __ )/ ____/ ____/ / ____/___ _____ ___ (_)___ ____ _
/ __ / __ / /_ / / / / __/ __ `/ __ `__ \/ / __ \/ __ `/
/ /_/ / /_/ / __/ / /___ / /_/ / /_/ / / / / / / / / / / /_/ /
/_____/_____/_/ \____/ \____/\__,_/_/ /_/ /_/_/_/ /_/\__, /
/____/
-->
<!--Game title goes here-->
<title>Salmon Says - BBFC Gaming</title>
<!-- Global site tag (gtag.js) - Google Analytics (DON'T CHANGE THIS!!!) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-129128356-2"></script>
<script type="text/javascript" src="cookieconsent.js"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-129128356-2');
</script>
<link rel = "stylesheet"
type = "text/css"
href = "stylesheet.css" />
</head>
<center><iframe id="banner" src="banner.html" height="50px" width="100%" frameBorder="0"></iframe></center>
<div id="title">
<div style="border:5px solid red; text-align:center;"><h1>BBFC Gaming</h1></div>
<!--Buttons-->
<div id="buttons">
<a href="nojs.html" class="buttons-link">No JavaScript?</a>
</div>
<script>
$(function(){
$("#buttons").load("buttons.html");
});
</script>
<hr>
<br>
<br>
</div>
<h2>Salmon Says</h2>
<div id="signin">
<button style="background-color:orange;" onclick="custom()">Sign in to Scratch</button>(To save scores, etc. This does not give us any access to your account. Once you have signed in, you can close the Scratch website.)
</div>
<script>
function custom() {
window.open('https://scratch.mit.edu/accounts/login/');
document.getElementById("signin").innerHTML = "You've signed in to Scratch!"
localStorage.setItem('signedIn', 'true');
}
function checkSignedIn() {
var signedIn = localStorage.getItem('signedIn');
if(signedIn == "true"){
document.getElementById("signin").innerHTML = "You've signed in to Scratch!"
}
}
checkSignedIn();
</script>
<br>
<br>
<br>
This game uses sounds! Turn up your volume!
<br>
<br>
<iframe src="https://scratch.mit.edu/projects/335527250/embed" allowtransparency="true" width="970" height="804" frameborder="0" scrolling="no" allowfullscreen></iframe>
<br>
<br>
<br>
<div class="theme-switch-wrapper">
<label class="theme-switch" for="checkbox">
<input type="checkbox" id="checkbox" />
<div class="slider round"></div>
</label>
Enable Light Mode
</div>
<script>
const toggleSwitch = document.querySelector('.theme-switch input[type="checkbox"]');
function switchTheme(e) {
if (e.target.checked) {
var r = confirm("Are you sure you want to switch on light mode? (It won't work if you have a dark mode browser extension installed)");
if(r == true) {
document.documentElement.setAttribute('data-theme', 'light');
localStorage.setItem('theme', 'light'); //add this
sessionStorage.setItem('bgColor', 'purple');
sessionStorage.setItem('textColor', 'white');
sessionStorage.setItem('buttonBg', 'black');
sessionStorage.setItem('versionTextColor', 'black');
sessionStorage.setItem('copyTextColor', 'black');
document.getElementById('banner').src = document.getElementById('banner').src
document.getElementById('version').src = document.getElementById('version').src
document.getElementById('copy').src = document.getElementById('copy').src
$(function(){
$("#buttons").load("buttons.html");
});
}else {
toggleSwitch.checked = false;
}
}
else {
document.documentElement.setAttribute('data-theme', 'dark');
localStorage.setItem('theme', 'dark'); //add this
sessionStorage.setItem('textColor', 'black');
sessionStorage.setItem('bgColor', 'red');
sessionStorage.setItem('buttonBg', 'blue');
sessionStorage.setItem('versionTextColor', 'white');
sessionStorage.setItem('copyTextColor', 'white');
document.getElementById('banner').src = document.getElementById('banner').src
document.getElementById('version').src = document.getElementById('version').src
document.getElementById('copy').src = document.getElementById('copy').src
$(function(){
$("#buttons").load("buttons.html");
});
}
}
const currentTheme = localStorage.getItem('theme') ? localStorage.getItem('theme') : null;
if (currentTheme) {
document.documentElement.setAttribute('data-theme', currentTheme);
if (currentTheme === 'light') {
toggleSwitch.checked = true;
}
}
toggleSwitch.addEventListener('change', switchTheme, false);
</script>
<div id="myCookieConsent">
<a id="cookieButton">Understood</a>
<div>This website is using cookies. <a href="privacypolicy.html">More details</a></div>
</div>
</html>