-
Notifications
You must be signed in to change notification settings - Fork 28
/
daily.html
152 lines (142 loc) · 6.49 KB
/
daily.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Squirdle Daily</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Telex" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="scripts/game.js" type="module"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body class="daily">
<h2>Squirdle Daily</h2>
<h3>A Pokémon Wordle-like by <a href="https://www.fireblend.com">Fireblend</a></h3>
<p>
I'm thinking of a Pokémon. Guess which! You have <span id="attempts"></span> guesses left today.
<span class="tooltip">Emoji Key<span class="tooltiptext">🟩: Correct guess<br>🟥: Incorrect Guess<br>🟨: Type in wrong position<br>🔼: Guessed too low<br>🔽: Guessed too high</span></span>
<br>
(Updates @ 00:00 your time!)<br>
<a href="filters.html">Advanced filters guide</a>
</p>
<div id="news" style="background-color: rgb(104, 27, 27);display:none;">
<p style="font-size: 15px"><b>Warning!</b></a>.
<br><button onclick="getElementById('news').style.display='none'">Hide</button></p>
</div>
<div id="guesses" class="guesses" style="display: none;">
<div class="row" id="hinttitles">
<div class='column'>
<p class="hint">Gen</p>
</div>
<div class='column'>
<p class="hint">Type 1</p>
</div>
<div class='column'>
<p class="hint">Type 2</p>
</div>
<div class='column'>
<p class="hint">Height</p>
</div>
<div class='column'>
<p class="hint">Weight</p>
</div>
</div>
</div>
<br>
<p id="error" style="display: none;">Pokémon not found!</p>
<form id="guessform" autocomplete="off" onsubmit="return false;">
<div class="autocomplete">
<input class="guess_input" id="guess" type="text" name="guess" placeholder="Who's that Pokémon?">
</div>
<input id="guess_submit" class="guess_input" type="submit" value="Submit">
<br><a class="type-block hintbtn" id="toggleinfo" href="#" title="Show Pokémon info in autocomplete entries">📋 Pokémon Info ON</a>
</form>
<div id="results" style="display: none;">
<span id="won" style="display: none;">You won!</span>
<span id="lost" style="display: none;">You lost!</span>
<span>The secret Pokémon was <b><span id="secretpoke"></span></b>!</span><br>
<a id="share_lnk" class="togglec" href="#">📄 Share</a>
<a id="share_with_names_lnk" class="togglec" href="#">👀 Share w/names</a><br>
<span id="streak"></span>
</div>
<br>
<div id="type_Normal" class="type-block" style="background-color: rgba(177, 177, 177);">Normal</div>
<div id="type_Fire" class="type-block" style="background-color: rgb(255, 97, 6);">Fire</div>
<div id="type_Water" class="type-block" style="background-color: rgb(57, 159, 255);">Water</div>
<div id="type_Grass" class="type-block" style="background-color: rgb(32, 255, 11);">Grass</div>
<div id="type_Electric" class="type-block" style="background-color: rgb(192, 196, 0);">Electric</div>
<div id="type_Ice" class="type-block" style="background-color: rgb(80, 243, 255);">Ice</div>
<br>
<div id="type_Fighting" class="type-block" style="background-color: rgba(230, 0, 0);">Fighting</div>
<div id="type_Poison" class="type-block" style="background-color: rgb(143, 0, 187);">Poison</div>
<div id="type_Ground" class="type-block" style="background-color: rgb(170, 130, 0);">Ground</div>
<div id="type_Flying" class="type-block" style="background-color: rgb(235, 81, 255);">Flying</div>
<div id="type_Psychic" class="type-block" style="background-color: rgb(255, 46, 210);">Psychic</div>
<div id="type_Bug" class="type-block" style="background-color: rgb(156, 199, 0);">Bug</div>
<br>
<div id="type_Rock" class="type-block" style="background-color: rgb(129, 84, 0);">Rock</div>
<div id="type_Ghost" class="type-block" style="background-color: rgb(68, 0, 255);">Ghost</div>
<div id="type_Dark" class="type-block" style="background-color: rgb(131, 107, 0);">Dark</div>
<div id="type_Dragon" class="type-block" style="background-color: rgb(119, 0, 255);">Dragon</div>
<div id="type_Steel" class="type-block" style="background-color: rgb(122, 109, 129);">Steel</div>
<div id="type_Fairy" class="type-block" style="background-color: rgb(255, 140, 230);">Fairy</div>
<div id="type_" class="type-block" style="background-color: rgb(255, 171, 115);">Single-Type</div>
<br><br>
<br><a href="index.html">Free Play</a>
<br><br>Pokémon names:
<a id="lang_en_lnk" href="#">🇺🇸</a> |
<a id="lang_ko_lnk" href="#">🇰🇷</a> |
<a id="lang_ja_lnk" href="#">🇯🇵</a> |
<a id="lang_fr_lnk" href="#">🇫🇷</a> |
<a id="lang_de_lnk" href="#">🇩🇪</a>
<br>Issues? <a href="cacheclear.html">Clear your cache!</a>
<script type="module">
import {getCookie, getLocalDateDay} from "./scripts/utils.js";
import {setLanguage} from "./scripts/i18n.js";
import {handleGuess, toggleHints, copyCurrentDay} from "./scripts/game.js";
var day = 0
window.dailypoke = ""
document.addEventListener('DOMContentLoaded', (event) => {
$.getJSON("data/pokedex.json", function (data1) {
pokedex = data1
$.getJSON("data/daily.json", function (data2) {
let localDateDay = getLocalDateDay()
day = parseInt(data2[localDateDay][0])
window.dailypoke = data2[localDateDay][1]
let lang = getCookie('lang', false)
setLanguage(lang, true)
});
})
});
document.querySelector('#guess_submit').addEventListener('click', () => {
handleGuess(true)
});
document.querySelector('#toggleinfo').addEventListener('click', () => {
toggleHints(true)
});
document.querySelector('#share_lnk').addEventListener('click', () => {
copyCurrentDay(day, false)
});
document.querySelector('#share_with_names_lnk').addEventListener('click', () => {
copyCurrentDay(day, true)
});
document.querySelector('#lang_en_lnk').addEventListener('click', () => {
setLanguage('en', true)
});
document.querySelector('#lang_ko_lnk').addEventListener('click', () => {
setLanguage('ko', true)
});
document.querySelector('#lang_ja_lnk').addEventListener('click', () => {
setLanguage('ja', true)
});
document.querySelector('#lang_fr_lnk').addEventListener('click', () => {
setLanguage('fr', true)
});
document.querySelector('#lang_de_lnk').addEventListener('click', () => {
setLanguage('de', true)
});
</script>
</body>
</html>