-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
123 lines (108 loc) · 17.1 KB
/
index.php
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
<?php
include 'functions.php';
$search = false;
if (isset($_POST['searchQueryInput'])) {
// recherche effectuer
$keyword = $_POST['searchQueryInput'];
if ($keyword == '') {
header("Location: /");
exit;
}
$search = true;
}
$accountPP = getAccountPP();
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Anime Squad</title>
<link rel="shortcut icon" href="/icon/favicon.ico" type="image/x-icon">
<link href="/styles.css" rel="stylesheet">
</head>
<body>
<nav class="sidebar">
<div class="logo">
<!-- svg en fonction de l'appareil aslogo -->
<!-- //aslogo -->
<div class="logoTop"><a href="/"><svg id="aslogo" version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" xml:space="preserve"> <style type="text/css"> .st0{fill:#FEFEFE;} .st1{fill:#ff8f45;} </style> <g> <path stroke="none" class="st0" d="M918.18,719.84c-10.26,4-21.16,5.55-31.88,5.16c-34.55-1.25-57.44,16.3-74.09,44.34c-11.01,18.54-17.13,38.72-18.5,60.3c-0.25,3.91-0.87,7.81-1.33,11.71c-16.56-0.74-32.85,1.25-49.02,4.63 c-35.97,7.53-70.13,20.86-104.82,32.53c-28.65,9.64-57.03,20.88-88.25,18.03c2.69-22.76,8.4-44.28,25.78-60.76 c6.31-5.99,13.66-10.19,22.66-10.27c4.08-0.04,6.81-2.3,8.56-5.25c11.45-19.36,15.15-40.05,5.84-60.95 c-6.55-14.7-21.2-20.42-35.71-24.78c-17.12-5.15-34.79-6.89-52.6-8.37c-20.87-1.73-41.63-0.77-62.35,0.57 c-18.76,1.22-37.51,3.89-54.9,11.76c-13.27,6.01-22.73,15.46-25.23,30.67c-2.57,15.58-2.43,30.73,5.04,45.14 c3.35,6.47,7.24,10.95,15.76,11.54c10.44,0.71,18.44,7.6,24.92,15.52c8.46,10.33,14.13,22.11,16.33,35.41 c-7.45,0.31-14.89,0.6-22.31-0.65c-29.61-4.97-56.51-17.12-82.29-31.84c-16.58-9.47-33.58-17.39-52.92-18.24 c-39.38-1.73-55.85,9.29-70.59,40.37c-2.25,4.74-4.3,9.57-6.44,14.35c-2.85-10.49-4.02-21.2-3.75-32.02 c0.58-23.66-3.24-46.57-13.33-67.96c-11.58-24.54-27.78-44.83-55.2-53.23c-5.9-1.81-11.88-2.27-18.02-2.4 c-29.47-0.62-57.41-7.08-82.06-23.94c-17.32-11.85-30.86-27-35.68-48.18c-5.13-22.55,0.8-42.56,15.57-59.93 c9.83-11.56,21.79-20.59,35.59-27.06c19.89,16.72,43.02,28.03,66.11,39.35c13.63,6.68,28.21,11.17,42.59,15.76 c26.42,8.43,53.78,12.36,81.5,13.66c40.77,1.91,80.61-4.49,119.93-14.3c17.52-4.37,35.19-8.23,52.41-13.95 c15.12-5.02,30.83-8.22,45.99-13.15c25.15-8.17,49.99-17.32,75.1-25.63c44.6-14.76,88.82-30.78,134.59-41.8 c26.81-6.46,53.53-13.19,81.5-12.52c25.74,0.61,50.51,5.59,72.73,18.48c22.69,13.17,41.46,31.13,56.78,52.73 C911.03,625.33,925.29,669.69,918.18,719.84z"/> <path class="st1" d="M918.18,719.84c7.11-50.14-7.15-94.5-35.98-135.17c-15.32-21.6-34.09-39.56-56.78-52.73 c-22.22-12.9-47-17.87-72.73-18.48c-27.97-0.67-54.68,6.07-81.5,12.52c-45.77,11.02-89.99,27.04-134.59,41.8 c-25.11,8.31-49.95,17.46-75.1,25.63c-15.15,4.92-30.87,8.12-45.99,13.15c-17.21,5.72-34.89,9.58-52.41,13.95 c-39.32,9.81-79.16,16.21-119.93,14.3c-27.72-1.3-55.09-5.23-81.5-13.66c-14.38-4.59-28.95-9.08-42.59-15.76 c-23.09-11.31-46.22-22.63-66.11-39.35c15.42-7.11,31.53-12.43,48.35-14.28c7.73-0.85,15.6-2.23,23.46-1.82 c14.26,0.74,25.94-5.34,36.43-13.95c25.21-20.68,37.36-48.39,42.28-79.92c1.74-11.17,2.58-22.39,2.75-33.68 c13.64,0.55,27.19,0.99,40.86-1.07c23.11-3.48,46.07-8.01,68.48-14.15c17.42-4.77,35.02-9.47,51.99-16.22 c19.01-7.57,38.82-13.09,58.12-19.95c21.76-7.73,43.31-16.08,65.03-23.92c9.44-3.41,19.08-6.19,28.82-8.78 c14.73-3.92,28.55-10.79,43.69-13.91c9.8-2.02,19.42-5.25,28.97-8.57c23.12-8.04,47.58-10.22,71.55-14.16 c34.32-5.64,68.93-4.82,103.5-0.98c8.17,0.91,15.64,5.5,24.13,4.04c1.62,2.33,1.19,5,1.19,7.58c0.01,38.21,0.06,76.41-0.01,114.62 c-0.04,25.29,4.26,49.76,15.15,72.64c11.46,24.09,29.8,41.21,55.31,49.83c4.57,1.54,9.67,1.79,14.7,1.94 c31.47,0.93,61.58,6.61,87.42,26.35c19.65,15.02,33.15,33.93,33.83,59.35c0.44,16.26-5.08,31.32-15.4,44.23 c-16.14,20.2-37.94,31.36-62.12,38.66C920.46,720.2,919.28,719.87,918.18,719.84z M494.23,451c-8.01,0.76-20.64-0.36-33.33,1 c-16.09,1.72-32,3.72-47.13,9.56c-23.83,9.2-34.05,20.39-32.68,46.94c0.73,14.24,8.67,22.48,19.78,27.87 c19.37,9.4,40.68,11.23,61.8,13.69c10.24,1.19,20.31,0.61,30.41-0.16c11.68-0.89,23.23,1.12,35,0.28 c22.05-1.57,43.48-5.02,63.91-13.58c26.63-11.15,31.42-34.31,21.11-56.45c-6.28-13.5-20.57-17.52-33.78-21.16 C553.01,451.75,526,450.27,494.23,451z"/> <path class="st0" d="M791.39,304.72c-8.49,1.46-15.97-3.14-24.13-4.04c-34.57-3.84-69.18-4.66-103.5,0.98 c-23.97,3.94-48.43,6.12-71.55,14.16c-9.56,3.32-19.18,6.55-28.97,8.57c-15.14,3.12-28.96,9.99-43.69,13.91 c-9.74,2.59-19.38,5.37-28.82,8.78c-21.73,7.84-43.27,16.18-65.03,23.92c-19.3,6.86-39.11,12.38-58.12,19.95 c-16.97,6.76-34.57,11.45-51.99,16.22c-22.41,6.14-45.37,10.68-68.48,14.15c-13.67,2.06-27.22,1.62-40.86,1.07 c-0.06-33.57-0.15-67.15-0.17-100.72c-0.03-53.99,0.31-107.98-0.13-161.96c-0.26-31.9,7.67-61.14,24.77-87.98 c2.52,2.54,4.5-0.11,6.37-0.96c18.57-8.42,37.27-16.5,56.53-23.21c22.96-8,46.44-12.34,70.78-8.99 c27.93,3.84,51.4,16.81,72.1,35.66c14.08,12.82,27.11,26.78,42.17,38.52c20.88,16.28,44.11,27.21,70.62,29.63 c35.16,3.21,68.35-4.68,100.1-19.59c21.21-9.96,41.03-22.2,59.35-36.7c12.95-10.25,24.76-21.89,36.5-33.52 c1.38-1.37,3.01-2.65,2.92-4.92c20.97,19.76,33.26,44.46,40.39,71.95c3.68,14.21,4.21,28.76,4.14,43.42 c-0.22,45.02-0.06,90.04-0.15,135.06C792.52,300.25,793.86,302.87,791.39,304.72z M498.65,275.67c9.7,0.89,19.24-1.27,28.87-1.27 c9.64,0,19.18-1.37,28.61-2.9c14.23-2.31,28.16-5.81,41.16-12.71c19.88-10.55,23.76-27.34,18.66-48.26 c-3.51-14.41-15.8-20.02-28.18-24.54c-30.41-11.11-62.39-11.31-94.09-11.55c-15.82-0.12-31.86,0.77-47.66,3.48 c-15.84,2.72-31.02,6.73-45.57,14.06c-23.4,11.78-28.18,53.32-2.99,66.16c4.04,2.06,8.13,4.12,12.38,5.69 C438.56,274.4,468.71,274.34,498.65,275.67z"/> <path class="st1" d="M748.15,47.63c0.08,2.27-1.55,3.55-2.92,4.92c-11.75,11.64-23.55,23.27-36.5,33.52 c-18.32,14.5-38.14,26.74-59.35,36.7c-31.75,14.91-64.94,22.8-100.1,19.59c-26.51-2.42-49.74-13.36-70.62-29.63 c-15.07-11.74-28.09-25.71-42.17-38.52c-20.7-18.85-44.17-31.81-72.1-35.66c-24.33-3.35-47.82,1-70.78,8.99 c-19.27,6.71-37.97,14.79-56.53,23.21c-1.87,0.85-3.85,3.5-6.37,0.96c13.04-20.74,30.21-37.1,51.29-49.63 c16.95-10.07,35.21-16.33,54.29-20.46c5.25-1.14,10.75-1.48,16.14-1.48c94.17-0.09,188.34-0.27,282.51,0.05 c36.45,0.12,69.45,11.07,98.09,34.33C738.24,38.74,742.52,43.96,748.15,47.63z"/> <path class="st1" d="M209.85,879.77c2.14-4.79,4.19-9.62,6.44-14.35c14.74-31.08,31.22-42.09,70.59-40.37 c19.34,0.85,36.34,8.77,52.92,18.24c25.78,14.72,52.68,26.87,82.29,31.84c7.42,1.24,14.86,0.95,22.31,0.65 c3.04,5.16,3.25,11.16,3.96,16.75c4.96,39.07-7.88,66.32-44.89,87.53c-17.18,9.85-35.84,14.54-55.42,17.33 c-32.04,4.57-60.78-2.15-85.65-22.72c-20.6-17.03-35.29-38.64-44.44-63.82C214.29,900.76,210.1,890.76,209.85,879.77z"/> <path class="st1" d="M550.3,896.54c31.22,2.85,59.6-8.39,88.25-18.03c34.69-11.68,68.85-25,104.82-32.53 c16.17-3.38,32.46-5.37,49.02-4.63c0.94,39.77-8.85,76.54-32.33,108.87c-16.97,23.36-38.69,40.9-67.71,47.22 c-14.1,3.07-28.37,2.47-42.76,0.91c-19.51-2.12-37.68-7.89-54.7-17.37c-21.85-12.17-37.97-29.28-44.2-54.17 C548.2,916.83,548.04,906.65,550.3,896.54z"/></g></svg></a></div>
<div class="logoBottom">
<!-- //discord -->
<div><a href="https://discord.gg/UVmVkqF2ve" target="_blank"><svg id="discord" viewBox="0 -28.5 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid"><g fill="#ffff"><path d="M216.856339,16.5966031 C200.285002,8.84328665 182.566144,3.2084988 164.041564,0 C161.766523,4.11318106 159.108624,9.64549908 157.276099,14.0464379 C137.583995,11.0849896 118.072967,11.0849896 98.7430163,14.0464379 C96.9108417,9.64549908 94.1925838,4.11318106 91.8971895,0 C73.3526068,3.2084988 55.6133949,8.86399117 39.0420583,16.6376612 C5.61752293,67.146514 -3.4433191,116.400813 1.08711069,164.955721 C23.2560196,181.510915 44.7403634,191.567697 65.8621325,198.148576 C71.0772151,190.971126 75.7283628,183.341335 79.7352139,175.300261 C72.104019,172.400575 64.7949724,168.822202 57.8887866,164.667963 C59.7209612,163.310589 61.5131304,161.891452 63.2445898,160.431257 C105.36741,180.133187 151.134928,180.133187 192.754523,160.431257 C194.506336,161.891452 196.298154,163.310589 198.110326,164.667963 C191.183787,168.842556 183.854737,172.420929 176.223542,175.320965 C180.230393,183.341335 184.861538,190.991831 190.096624,198.16893 C211.238746,191.588051 232.743023,181.531619 254.911949,164.955721 C260.227747,108.668201 245.831087,59.8662432 216.856339,16.5966031 Z M85.4738752,135.09489 C72.8290281,135.09489 62.4592217,123.290155 62.4592217,108.914901 C62.4592217,94.5396472 72.607595,82.7145587 85.4738752,82.7145587 C98.3405064,82.7145587 108.709962,94.5189427 108.488529,108.914901 C108.508531,123.290155 98.3405064,135.09489 85.4738752,135.09489 Z M170.525237,135.09489 C157.88039,135.09489 147.510584,123.290155 147.510584,108.914901 C147.510584,94.5396472 157.658606,82.7145587 170.525237,82.7145587 C183.391518,82.7145587 193.761324,94.5189427 193.539891,108.914901 C193.539891,123.290155 183.391518,135.09489 170.525237,135.09489 Z" fill-rule="nonzero"></path></g></svg></a></div>
<!-- //twitter -->
<div><a href="https://twitter.com/animesquadfr" target="_blank"><svg id="twitter" viewBox="0 -2 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill-rule="evenodd"><g id="Dribbble-Light-Preview" transform="translate(-60.000000, -7521.000000)" fill="#ffff"><g id="icons" transform="translate(56.000000, 160.000000)"><path d="M10.29,7377 C17.837,7377 21.965,7370.84365 21.965,7365.50546 C21.965,7365.33021 21.965,7365.15595 21.953,7364.98267 C22.756,7364.41163 23.449,7363.70276 24,7362.8915 C23.252,7363.21837 22.457,7363.433 21.644,7363.52751 C22.5,7363.02244 23.141,7362.2289 23.448,7361.2926 C22.642,7361.76321 21.761,7362.095 20.842,7362.27321 C19.288,7360.64674 16.689,7360.56798 15.036,7362.09796 C13.971,7363.08447 13.518,7364.55538 13.849,7365.95835 C10.55,7365.79492 7.476,7364.261 5.392,7361.73762 C4.303,7363.58363 4.86,7365.94457 6.663,7367.12996 C6.01,7367.11125 5.371,7366.93797 4.8,7366.62489 L4.8,7366.67608 C4.801,7368.5989 6.178,7370.2549 8.092,7370.63591 C7.488,7370.79836 6.854,7370.82199 6.24,7370.70483 C6.777,7372.35099 8.318,7373.47829 10.073,7373.51078 C8.62,7374.63513 6.825,7375.24554 4.977,7375.24358 C4.651,7375.24259 4.325,7375.22388 4,7375.18549 C5.877,7376.37088 8.06,7377 10.29,7376.99705" id="twitter-[#154]"></path></g></g></g></svg></a></div>
<?php
#account
echo '<div><a href="/account.php"><img id="account" src="/' . $accountPP . '" alt="Account Circle"></a></div>' . PHP_EOL;
?>
</div>
</div>
</nav>
<header id="indexHeader">
<div id="aslogo"><a href="/"><svg data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 758.1 758.36"><defs><style>.cls-1{fill:#fff;}</style></defs><path class="cls-1" d="M485.61,120.07c36.32,0,72.65-.23,109,.08,25.45.21,47.87,9.31,67.87,24.84a117.91,117.91,0,0,1,44.7,77.83c.94,7.14.75,14.19.76,21.26.09,67.31-.07,134.63.13,201.94.06,18.13,3.37,35.84,11.67,52.12,8.56,16.78,20.29,30.48,38.85,37.2,6.89,2.5,14,2,20.78,2.36,22.27,1.27,42.71,7.56,60.38,20.89,11.86,8.95,21.21,20.57,23.95,35.91,2.86,16-1.38,30.33-11.66,42.9-14.69,18-34.53,26.34-56.64,30.62a119.28,119.28,0,0,1-21,2c-18.25.29-32.29,8.44-43.8,22.51-11,13.4-17.06,28.79-20.38,45.29a142.39,142.39,0,0,0-2.32,27.45c-.13,27.62-8.28,53.05-24.42,75.24-12.73,17.52-29.1,31.09-51.25,35.8-10.75,2.29-21.46,1.9-32.31.76a105.07,105.07,0,0,1-29.47-7.18C550,861.4,533,849.12,525.66,827.07c-3.49-10.42-2.62-21-1-31.8,1.6-10.53,4.32-20.54,9.52-29.65,4.79-8.41,11.13-15.57,20.93-18.78,4.15-1.35,9.25-.11,12.3-4.75a44.63,44.63,0,0,0,7.35-21.65c.49-7.24,1.37-14.71-1.63-21.89-3.93-9.4-11.37-14.91-20.32-18.5-11.74-4.7-24.05-7.07-36.7-8.2-12.82-1.14-25.66-2.56-38.5-1.76-18.79,1.18-37.75,1.33-55.88,7.8-11.33,4-21.22,9.89-24.15,22.2-3.21,13.5-3.26,27.18,4.42,39.71,2.22,3.61,5,6.31,9.78,6.21,5.47-.11,9.78,3,13.85,6.16,8.85,6.82,13.71,16.51,17.18,26.68a93.75,93.75,0,0,1,5.05,32.58c-.44,18-8.47,32.34-22.47,43.87-14.55,12-31.36,18.51-49.47,21.42-18.9,3-37.78,2.4-55.31-6.9-15.84-8.4-27.92-20.93-37.5-35.79a126.88,126.88,0,0,1-17.88-45.94,115.37,115.37,0,0,1-2.27-25c.62-18.12-2.6-35.78-10.52-52-8.86-18.11-21-33.49-41.88-39.38a56.21,56.21,0,0,0-15-1.86,114,114,0,0,1-50.94-12.2c-14.53-7.33-26.5-18-33.52-33A46.44,46.44,0,0,1,110,586.51c8.34-20.69,24.68-32.67,44.6-40.69a120.37,120.37,0,0,1,36.76-8.07c9.51-.69,19.19-.4,28.37-5.45,11.83-6.52,20.39-15.68,27.39-26.79,8.29-13.17,12.61-27.79,14.68-43a112.66,112.66,0,0,0,1.25-15.22c0-72-.19-143.95.1-215.93.08-18.74,6.46-36.06,15.46-52.37a111,111,0,0,1,18.9-24.68,115.47,115.47,0,0,1,31.13-22.24c16.27-7.93,33.27-12.21,51.5-12.08C415.3,120.25,450.46,120.07,485.61,120.07Zm-.27,209.21c13.08-1,26.37-1.19,39.58-3.13,11.71-1.72,23.17-3.93,33.76-9.41,17.4-9,18.63-20.85,15.08-37.32-2.32-10.74-12.1-14.93-21.45-18.31-11.77-4.25-24.1-5.79-36.51-7.32-9.86-1.21-19.79-1.09-29.53-1.24a242.2,242.2,0,0,0-30,1.28c-12.29,1.34-24.48,2.93-36,7.37-8.38,3.23-16.5,7.16-21.11,16-3.05,5.84-3.1,11.79-3.2,18a20.5,20.5,0,0,0,6.73,16.09c5.94,5.58,13.23,8.5,20.83,10.75C443.65,328,464.47,328,485.34,329.28ZM485.91,537c8-.67,17.39.18,26.86-.82,12.77-1.35,25.42-2.78,37.54-7.22,15.9-5.83,26.46-14.07,24.87-33.49-.83-10-5.64-16.74-13.72-21.24-16.88-9.4-35.8-11.15-54.48-12-16.52-.73-33.15-1.06-49.74.59-12.46,1.25-24.79,2.79-36.52,7.21-7.53,2.83-14.72,6.23-19.72,13.27-4.56,6.44-5,13.4-5.07,20.83,0,8.31,3.54,14.4,10.25,18.81,14,9.17,30.1,10.86,46.08,13C463,537.42,473.74,536.89,485.91,537Z" transform="translate(-106.44 -119.99)"/></svg></a></div>
<div class="wrapper">
<form class="searchBar" action="." method="post">
<input id="searchQueryInput" type="text" name="searchQueryInput" placeholder="Anime Squad" value="" />
<button id="searchQuerySubmit" type="submit" name="searchQuerySubmit">
<svg id="magnify" viewBox="0 0 24 24"><path fill="#ffff" d="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z" /></svg>
</button>
</form>
</div>
<?php echo '<div id="account"><a href="/account.php"><img src="/' . $accountPP . '" alt="Account Circle"></a></div>' . PHP_EOL; ?>
</header>
<section class="container">
<div class="grid">
<?php
include 'db.php';
if($search) {
$query = "SELECT * FROM info WHERE name LIKE ? ORDER BY name ASC";
$stmt = $mysqli->prepare($query);
if ($stmt) {
$stmt->bind_param("s", $keyword); // Lier le paramètre avec le placeholder dans la requête
} else {
// echo "Error: " . $mysqli->error;
echo "<p> Erreur : search failed </p>";
}
$result = $mysqli->query("SELECT * FROM info WHERE name LIKE '%$keyword%' ORDER BY name ASC;");
// modifier le imput pour qui la recherche se voit
echo "<script> var input = document.getElementById('searchQueryInput'); input.value = '$keyword'; </script>";
} else {
$result = $mysqli->query("SELECT * FROM info ORDER BY name ASC;");
}
$count = 0;
if ($result->num_rows > 0) {
// Parcourir les résultats
while ($row = $result->fetch_assoc()) {
$count = $count + 1;
$poster = explode('|', $row["poster_online"]);
echo "<a class='title' href=". "/page.php?id=". $row["id"] ."><article title=\"". $row["name"] ."\" id=\"". $row["id"] ."\" class=\"item\">";
echo "<img src=\"". $poster[0] ."\" alt=\"" . $row["name"] . " (". $row["type"] . ")\">";
echo "<h2>" . $row["name"] . "</h2>";
echo "</article></a>\n";
}
}
if($count == 0) {
echo "<p> Aucun résultat n'a été trouvé. </p>";
}
?>
</div>
</section>
<script>
const h2Elements = document.querySelectorAll('.item h2');
var maxLenth = 50;
if(window.innerHeight > window.innerWidth) {
maxLenth = 40;
}
function shortenText(maxLenth) {
h2Elements.forEach(h2 => {
if (h2.textContent.length > maxLenth) {
const shortenedText = h2.textContent.substring(0, maxLenth) + '...';
h2.textContent = shortenedText;
}
});
}
shortenText(shortenText);
</script>
</body>
</html>