-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
54 lines (48 loc) · 1.3 KB
/
index.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
51
52
53
54
<html>
<head>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<meta name="robots" content="noindex">
<meta name="googlebot" content="noindex">
<style>
html, body {
padding: 0;
margin: 0;
height: 100%;
overflow: hidden
}
</style>
</head>
<body>
<iframe id="myIframe"
width="100%"
height="100%"
src="https://resume.sajadabasi.ir/"
style="padding: 0;margin: 0;"
onLoad="changeAddress()">
</iframe>
</body>
<script>
function changeAddress() {
let location = document.getElementById('myIframe').contentWindow.location.href;
location = "https://resume.sajadabasi.ir/?l=" + location.replace("https://resume.sajadabasi.ir/", "");
console.log(location);
history.pushState({}, null, location);
}
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split('&');
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split('=');
if (decodeURIComponent(pair[0]) == variable) {
return decodeURIComponent(pair[1]);
}
}
console.log('Query variable %s not found', variable);
return '';
}
iframe = document.getElementById('myIframe');
console.log(getQueryVariable('l'));
console.log(iframe.src + getQueryVariable('l'));
iframe.src = iframe.src + getQueryVariable('l');
</script>
</html>