-
Notifications
You must be signed in to change notification settings - Fork 1
/
iframe.html
50 lines (48 loc) · 1.48 KB
/
iframe.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Support #blacklivesmatter</title>
<meta name="description" content="Support #blacklivesmatter by making your website colorless on June 10, 11 and 12 and do these little things that make you an actor.">
<meta name="author" content="Citizen of the world">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/normalize.css">
<style>
body {padding-left: 3px; background-color:#fff}
body:hover{background-color: #b0e0e6}
a:hover {background-color: #b0e0e6}
</style>
<base target="_parent">
</head>
<body>
<a href="https://blacklivesmatter.support/" target="_parent" id="blms_link">
<img src="images/blms.svg" style="width:80px; height:80px" alt="Support #BlackLivesMatter" />
</a>
<script>
function blms_get_language() {
var query = window.location.search.substring(1);
var vars = query.split("&");
var lang = '';
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
if (pair[0] == 'lang') {
console.log(pair[1]);
if (pair[1] == 'en'){
lang = '';
}
else if (pair[1] == 'fr') {
lang = pair[1];
}
}
}
return lang;
}
var link = document.getElementById('blms_link');
if (link) {
var lang = blms_get_language();
var href = 'https://blacklivesmatter.support/' + lang;
link.setAttribute('href', href);
}
</script>
</body>
</html>