-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpdfgenerated.html
88 lines (83 loc) · 2.72 KB
/
pdfgenerated.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Agreement PDF generated.</title>
<script type="text/javascript">
HTMLElement.prototype.html = function (str) {
if (!str) {
str = '';
}
if (str.indexOf('<') >= 0 && (str.indexOf('/>') >= 0 || str.indexOf('</') >= 0)) {
this.innerHTML = str;
} else {
this.innerText = str;
}
return this;
};
document.addEventListener('DOMContentLoaded', function () {
var messageDom = document.getElementById('message');
var queryParams = {};
var getParams = query => {
if (!query) {
return {};
}
return (/^[?#]/.test(query) ? query.slice(1) : query)
.split('&')
.reduce((params, param) => {
let [key, value] = param.split('=');
if (key === 'token') {
params[key] = value;
} else {
params[key] = value ? decodeURIComponent(value.replace(/\+/g, ' ')) : '';
}
return params;
}, {});
};
queryParams = getParams(location.search);
console.log(queryParams);
if (!queryParams.msg) {
messageDom.innerText = "Invalid request.";
throw "Invalid request.";
return false;
} else {
if (queryParams.pages) {
messageDom.innerText = 'Generated ' + queryParams.msg + ' file of ' + queryParams.pages + ' pages.';
} else {
messageDom.innerText = queryParams.msg;
}
}
}, false);
</script>
<style>
body {
margin: 0 80px;
padding: 0 20px;
background: #ffffff;
font-size: 1.5em;
/*transition: background 500ms ease;*/
font-family: Helvetica, sans-serif;
color: #424545;
}
p {
margin: 0 !important;
}
/* h1 {
font-size: 4em;
}
h2 {
font-size: 3em;
}
h3 {
font-size: 2em;
} */
</style>
</head>
<body>
<a data-label="Logo" href="/#/">
<img class="logoMain" data-test="app-header-logo" height="100px" alt="MySite" src="../views/home/logo9.png">
</a>
<h4 id="message" style="text-align: center;">PDF generated for clientId1.</h4>
<a data-label="client1" href="/">Back to home.</a>
</body>
</html>