-
Notifications
You must be signed in to change notification settings - Fork 0
/
jscode.js
50 lines (49 loc) · 2.54 KB
/
jscode.js
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
<script type="text/javascript">
var banner= new Array()
var shift= new Array()
var information= new Array()
banner[0]="https://lh6.googleusercontent.com/-kI7owgHFoYc/Tc-Hy5GPzQI/AAAAAAAAA40/D_MY9A5asp8/s1600/101P.jpg"
shift[0]="no-repeat center -50px"
information[0]="Jiufen - Taiwan"
banner[1]="https://lh6.googleusercontent.com/-6HHTbfHiH0s/Tc-HdEiKFhI/AAAAAAAAA4U/T2R5lh5vDbY/s2500/101P.jpg"
shift[1]="no-repeat center 0px"
information[1]="Sun Moon Lake - Taiwan"
banner[2]="https://lh4.googleusercontent.com/-Poj5iXgkHa8/Tc-GuKuEo4I/AAAAAAAAA2s/fXK0-IsgiW0/s2300/101P.jpg"
shift[2]="repeat center 0px"
information[2]="National Sun Yat-sen University - Kaohsiung - Taiwan"
banner[3]="https://lh4.googleusercontent.com/-1f8vKcQ9gVI/UBlNotdUKfI/AAAAAAAACaY/uxL2_YYuxl0/s1000/P1060251-P1060257.jpg"
shift[3]="repeat center 0px"
information[3]="Somewhere near Hue - Vietnam"
banner[4]="https://lh4.googleusercontent.com/-UJutLC4pYGA/UBlL_YBJWCI/AAAAAAAACUQ/HrwUgIfRwOA/s1000/P1060043-P1060061.jpg"
shift[4]="repeat center 0px"
information[4]="Somewhere near Hue - Vietnam"
banner[5]="https://lh6.googleusercontent.com/-FQXkdQ3FW3k/UCpGOSdOJtI/AAAAAAAADLI/FhjXA9PqgbM/s1500/P1060484-P1060486.jpg"
shift[5]="no-repeat center -150px"
information[5]="Danang - Vietnam"
banner[6]="https://lh4.googleusercontent.com/-2436HISmhd8/UBZwvlk_whI/AAAAAAAACRk/JZbupwPi5zo/s912/P1050859-P1050862.jpg"
shift[6]="repeat center 0px"
information[6]="Saigon - Vietnam"
banner[7]="https://lh4.googleusercontent.com/-RIXo53MCuQ8/UEoIVKbVTLI/AAAAAAAADZs/8V7SBPG82SA/s1300/P1080691-P1080697.jpg"
shift[7]="no-repeat center -50px"
information[7]="Chocolate hills - Bohol - Philippines"
banner[8]="https://lh3.googleusercontent.com/-onSGVCxb8eo/UOraP_7BOyI/AAAAAAAAEyU/1QSvE8OuTEo/s1500/P1140388-P1140391.jpg"
shift[8]="repeat center -50px"
information[8]="Krabi - Thailand"
banner[9]="https://lh4.googleusercontent.com/-9Z80sBpDKZc/UPusSDW46NI/AAAAAAAAFCs/mO6HhbSUtd4/s800/P1150373-P1150391.jpg"
shift[9]="repeat center -30px"
information[9]="Krabi - Thailand"
var random=Math.floor(banner.length*Math.random());
var query = window.location.search.substring(1);
var match = query.match(/.*headerimage=([0-9]+).*/);
if (match) {
document.write("Manual image index:");
document.write(match[1]);
random = match[1];
}
document.write("<style>");
document.write(".body-fauxcolumn-outer .cap-top {");
document.write(' background: #FFFFFF url("' + banner[random] + '") ' + shift[random] + ';');
document.write(" }");
document.write("</style>");
document.getElementById('headerinformation').innerHTML = information[random];
</script>