Skip to content

Commit 4585fd4

Browse files
committed
2023 update + fixed translation (Google) + keyboard inputs (Space and R) + cosmetic changes
1 parent 86b06ec commit 4585fd4

3 files changed

Lines changed: 48 additions & 5 deletions

File tree

index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<link rel="stylesheet" type="text/css" href="style.css">
88
</head>
99
<body>
10-
<h1 id="title" onclick="randomize();"> RAND<span id="arr"></span>M FAMICASE </h1>
10+
<h1 id="title" onclick="randomize();"> RAND<span id="arr"></span>M FAMICASE </h1>
1111

1212
<div id="container">
1313

@@ -18,6 +18,7 @@ <h1 id="title" onclick="randomize();">→ RAND<span id="arr">↻</span>M FAMICAS
1818
<select id="year">
1919
<option value="-1" selected>ANY YEAR</option>
2020
<option value="-2">ANY BIG</option>
21+
<option value="18"> 2023</option>
2122
<option value="17"> 2022</option>
2223
<option value="16"> 2021</option>
2324
<option value="15"> 2020</option>

js/script.js

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ function qs(s){return document.getElementById(s)};
22
function dc(s){return document.createElement(s)};
33
function rand(min,max){return Math.floor(Math.random()*(max-min+1))+min};
44

5-
var tableIndex = [23,30,46,53,58,78,63,79,89,112,149,162,165,250,261,270,253,253];
5+
var tableIndex = [23,30,46,53,58,78,63,79,89,112,149,162,165,250,261,270,253,253,252];
66
var lastInfo;
77
var startingYear = 2005;
88

@@ -142,7 +142,13 @@ function change(urls)
142142
else
143143
{
144144
link.href = urls.pageUrl;
145-
trans.href = "http://www.microsofttranslator.com/bv.aspx?from=&to=en&a="+encodeURI(urls.pageUrl);
145+
146+
// older Bing translation
147+
//trans.href = "http://www.microsofttranslator.com/bv.aspx?from=&to=en&a="+encodeURI(urls.pageUrl);
148+
149+
//current Google translation
150+
trans.href = link.href.replace("http://","https://").replace("famicase.com","famicase-com.translate.goog")+"?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=fr&_x_tr_pto=wapp";
151+
146152
enableLinks(true)
147153
}
148154

@@ -284,6 +290,16 @@ function refreshList()
284290

285291
}
286292

293+
294+
// Key press event
295+
document.body.onkeyup = function(e){
296+
if (e.key == " " || e.code == "Space" || e.keyCode == 32 || e.key == "r"){
297+
randomize();
298+
}
299+
}
300+
301+
302+
287303
randomize();
288304
refreshList();
289305

@@ -298,10 +314,10 @@ refreshList();
298314
- 2017 : 001 002 003 012 123
299315
- 2018 : 01_sample 02_sample 03_sample 12_sample 123_sample
300316
- 2019 to 2020 : 01_sample 02_sample 03_sample 012_sample 123_sample
301-
- 2021 to 2022 : 001 002 003 012 123
317+
- 2021 to 2023 : 001 002 003 012 123
302318
303319
Index of html pages too :
304320
- 2008 to 2016 : 01 02 03 12 123
305-
- 2017 to 2022 : 001 002 003 012 123
321+
- 2017 to 2023 : 001 002 003 012 123
306322
307323
*/

style.css

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,36 @@ select
126126
text-indent: 3px;
127127
}
128128

129+
#optgroup
130+
{
131+
font-family:"Russo One" !important;
132+
}
133+
129134
select:hover
130135
{
131136
color:orange;
132137
border: solid 2px orange;
133138
cursor:pointer;
139+
}
140+
141+
ul
142+
{
143+
line-height:1em;
144+
145+
/*For custom bullet*/
146+
list-style: none;
147+
margin-left: 0;
148+
padding-left: 1em;
149+
text-indent: -1em;
150+
}
151+
152+
li
153+
{
154+
font-size:0.5em;
155+
}
134156

157+
/*custom bullet*/
158+
li:before {
159+
content: "➤";
160+
padding-right: 5px;
135161
}

0 commit comments

Comments
 (0)