Skip to content

Commit

Permalink
added Brugeloons prank "add"
Browse files Browse the repository at this point in the history
  • Loading branch information
arthur-adriansens authored Nov 30, 2023
1 parent 1fcbd58 commit 4c984a2
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
1 change: 1 addition & 0 deletions sqlite.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ module.exports = {
// add user
if (!userInfo.length) {
success = await db.run("INSERT INTO Scores (username, highscore, ip) VALUES (?, ?, ?);", [user, newScore, ip]);
await db.run("INSERT INTO Daily (username, highscore, ip, day) VALUES (?, ?, ?);", [user, newScore, ip]);
return success.changes > 0;
}

Expand Down
16 changes: 12 additions & 4 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -482,15 +482,23 @@ <h2>next block</h2>
<h2>stored block</h2>
</div>
<div class="canvas_wrapper">
<canvas id="stored_piece"></canvas>
<canvas id="stored_piece" class="youtube_background"> </canvas>
<!-- <div class="youtube_wrapper">
<script src="https://apis.google.com/js/platform.js"></script>
<div class="g-ytsubscribe" data-channelid="UCkuuvKL973p_36xk2sC9phg" data-layout="full" data-count="default"></div>
<img
class="youtube"
src="https://yt3.googleusercontent.com/FlzAFFDcLjYJAHPqEP_aQSm-tOQn_AdQ9kHiRU4wyYT3Z5mPdyXSfz_z0VlMQwfLDYSROB1liHk=s176-c-k-c0x00ffffff-no-rj"
/>
</div> -->
</div>
</div>
</div>
</div>

<script src="setup.js"></script>
<script src="game.js"></script>
<script src="piece.js"></script>
<script src="js/setup.js"></script>
<script src="js/game.js"></script>
<script src="js/piece.js"></script>

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XFR11CZ1ZZ"></script>
Expand Down
2 changes: 1 addition & 1 deletion src/js/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ function new_score(newScore, level, final = false) {
function upload_highscore(score) {
if (score == 0 || !username) return;

const url = "https://sjh-tetris.glitch.me/newScore";
const url = "https://alpha-tetris.glitch.me/newScore";
const data = { user: username, score: score };

fetch(url, {
Expand Down
8 changes: 8 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ canvas#game {
margin-bottom: 0;
}

.youtube_background {
background-image: url(https://yt3.googleusercontent.com/FlzAFFDcLjYJAHPqEP_aQSm-tOQn_AdQ9kHiRU4wyYT3Z5mPdyXSfz_z0VlMQwfLDYSROB1liHk=s176-c-k-c0x00ffffff-no-rj);
background-size: cover;
border: none !important;
box-shadow: rgba(100, 100, 111, 0.05) 0px 7px 8px 0px !important;
cursor: pointer;
}

.game {
border-radius: 10px;
border: 1px solid lightgrey;
Expand Down

0 comments on commit 4c984a2

Please sign in to comment.