Update jQuery, update 2024, remove Twitter share (RIP)

This commit is contained in:
Théo Marchal 2024-01-05 18:38:03 +01:00
parent 4ab3df9b81
commit 9992e7cc28
7 changed files with 14 additions and 27 deletions

View File

@ -7,7 +7,7 @@
<link rel="stylesheet" type="text/css" href="normalize-8.0.1.css" id="stylesheet"> <link rel="stylesheet" type="text/css" href="normalize-8.0.1.css" id="stylesheet">
<link rel="stylesheet" type="text/css" href="style.css" id="stylesheet"> <link rel="stylesheet" type="text/css" href="style.css" id="stylesheet">
<link rel="shortcut icon" type="image/png" href="img/favicon.png" /> <link rel="shortcut icon" type="image/png" href="img/favicon.png" />
<script src="jquery-3.6.4.min.js"></script> <script src="jquery-3.7.1.min.js"></script>
<script src="interface.js"></script> <script src="interface.js"></script>
<script src="poketest.js"></script> <script src="poketest.js"></script>
<title>Pokétest - About</title> <title>Pokétest - About</title>
@ -76,13 +76,13 @@
</p> </p>
<h3 id="4">Copyrights</h3> <h3 id="4">Copyrights</h3>
<p>The Pokémon names, the associated artworks and the Pokémon licence is trademarked by <strong>Nintendo</strong> and <strong>The Pokémon Company</strong>, 1996 - 2023.</p> <p>The Pokémon names, the associated artworks and the Pokémon licence is trademarked by <strong>Nintendo</strong> and <strong>The Pokémon Company</strong>, 1996 - 2024.</p>
<p>All the Pokémon artworks were taken from <a href="https://bulbapedia.bulbagarden.net/wiki/Main_Page">Bulbapedia</a>, that I'd like to thank for their huge work for the Pokémon community.</p> <p>All the Pokémon artworks were taken from <a href="https://bulbapedia.bulbagarden.net/wiki/Main_Page">Bulbapedia</a>, that I'd like to thank for their huge work for the Pokémon community.</p>
</div> </div>
</article> </article>
</div> </div>
<footer> <footer>
<p>© 2012 - 2023 Pokétest 2.9</p> <p>© 2012 - 2024 Pokétest 2.9</p>
</footer> </footer>
</body> </body>
</html> </html>

View File

@ -7,7 +7,7 @@
<link rel="stylesheet" type="text/css" href="normalize-8.0.1.css" id="stylesheet"> <link rel="stylesheet" type="text/css" href="normalize-8.0.1.css" id="stylesheet">
<link rel="stylesheet" type="text/css" href="style.css" id="stylesheet"> <link rel="stylesheet" type="text/css" href="style.css" id="stylesheet">
<link rel="shortcut icon" type="image/png" href="img/favicon.png" /> <link rel="shortcut icon" type="image/png" href="img/favicon.png" />
<script src="jquery-3.6.4.min.js"></script> <script src="jquery-3.7.1.min.js"></script>
<script src="waitforimages-2.4.0.min.js"></script> <script src="waitforimages-2.4.0.min.js"></script>
<script src="interface.js"></script> <script src="interface.js"></script>
<script src="flashdex.js"></script> <script src="flashdex.js"></script>
@ -87,7 +87,7 @@
</div> </div>
</article> </article>
<footer> <footer>
<p>© 2012 - 2023 Pokétest 2.9</p> <p>© 2012 - 2024 Pokétest 2.9</p>
</footer> </footer>
</div> </div>
</body> </body>

View File

@ -7,7 +7,7 @@
<link rel="stylesheet" type="text/css" href="normalize-8.0.1.css" id="stylesheet"> <link rel="stylesheet" type="text/css" href="normalize-8.0.1.css" id="stylesheet">
<link rel="stylesheet" type="text/css" href="style.css" id="stylesheet"> <link rel="stylesheet" type="text/css" href="style.css" id="stylesheet">
<link rel="shortcut icon" type="image/png" href="img/favicon.png" /> <link rel="shortcut icon" type="image/png" href="img/favicon.png" />
<script src="jquery-3.6.4.min.js"></script> <script src="jquery-3.7.1.min.js"></script>
<script src="interface.js"></script> <script src="interface.js"></script>
<script src="poketest.js"></script> <script src="poketest.js"></script>
<title>Pokétest</title> <title>Pokétest</title>
@ -120,7 +120,7 @@
<h3>Number of questions</h3> <h3>Number of questions</h3>
<select class="questions first"> <select class="questions first">
<!--<option name="questions" id="1" value="1">1 (debug)</option>--> <!-- <option name="questions" id="1" value="1">1 (debug)</option> -->
<option name="questions" id="15" value="15">15</option> <option name="questions" id="15" value="15">15</option>
<option name="questions" id="30" value="30">30</option> <option name="questions" id="30" value="30">30</option>
<option name="questions" id="50" value="50">50</option> <option name="questions" id="50" value="50">50</option>
@ -131,7 +131,7 @@
<h3>Time to answer</h3> <h3>Time to answer</h3>
<select class="time first"> <select class="time first">
<!--<option name="time" id="1" value="1">1 (debug)</option>--> <!-- <option name="time" id="1" value="1">1 (debug)</option> -->
<option name="time" id="2" value="2">2 seconds</option> <option name="time" id="2" value="2">2 seconds</option>
<option name="time" id="5" value="5" selected>5 seconds</option> <option name="time" id="5" value="5" selected>5 seconds</option>
<option name="time" id="10" value="10">10 seconds</option> <option name="time" id="10" value="10">10 seconds</option>
@ -150,7 +150,7 @@
</div> </div>
</article> </article>
<footer> <footer>
<p>© 2012 - 2023 Pokétest 2.9</p> <p>© 2012 - 2024 Pokétest 2.9</p>
</footer> </footer>
</div> </div>
<script> <script>

2
jquery-3.6.4.min.js vendored

File diff suppressed because one or more lines are too long

2
jquery-3.7.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -346,16 +346,6 @@ $(document).ready(function() {
function score() function score()
{ {
function generateTwitterText()
{
var start_sentence = 'I got ';
var end_sentence = 'Can you get a better score than me?';
var score_sentence = (Math.floor(good_answers/max_questions*100))+'% Pokémons right!'
if (!infinite) return start_sentence+score_sentence+" "+end_sentence;
else return start_sentence+good_answers+" good Pokémon answers! "+end_sentence;
}
function generateSeed() function generateSeed()
{ {
gen = ''; gen = '';
@ -395,10 +385,7 @@ $(document).ready(function() {
$('article #container #seed').empty().append('<p style="margin:0px;">Share your configuration</p><input type="text" name="seed" value="'+ $('article #container #seed').empty().append('<p style="margin:0px;">Share your configuration</p><input type="text" name="seed" value="'+
generateSeed()+'">'); generateSeed()+'">');
$('article #container #share').empty().append('<div id="copyseed"><a href="#">Copy</a></div><a href="https://twitter.com/share" \ $('article #container #share').empty().append('<div id="copyseed"><a href="#">Copy</a></div>');
class="twitter-share-button" data-url="'+generateSeed()+'" data-text="'+generateTwitterText()+
'" data-size="large" data-hashtags="Pokétest">Tweet</a>');
$.getScript("//platform.twitter.com/widgets.js"); // for the twitter button to work
$('article #container #answers').empty().append('<p class="button"><input type="submit" \ $('article #container #answers').empty().append('<p class="button"><input type="submit" \
class="start_again" name="start_again" value="Play again!"></p>'); class="start_again" name="start_again" value="Play again!"></p>');

View File

@ -304,7 +304,6 @@ article #container #seed input {
} }
article #container #copyseed { article #container #copyseed {
float: left;
width: 60px; height: 16px; width: 60px; height: 16px;
display: block; display: block;
padding: 10px; padding-top: 4px; padding-bottom: 8px; padding: 10px; padding-top: 4px; padding-bottom: 8px;
@ -313,7 +312,8 @@ article #container #copyseed {
font-size: 15px; font-size: 15px;
font-variant: small-caps; font-variant: small-caps;
text-decoration: none; text-decoration: none;
cursor:pointer; cursor: pointer;
margin: auto;
} }
article #container #copyseed a { article #container #copyseed a {