-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
85 lines (68 loc) · 1.51 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
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
<html>
<head>
<title>Infinite Scroll Example</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.0/react.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.0/react-dom.js"></script>
<script>
// fake module manager
function require(name) {
switch (name) {
case 'react': return window.React;
case './service': return window.dfp;
}
}
var module = { exports: {} };
</script>
<script src="lib/service.js"></script>
<script src="lib/component.js"></script>
<script>
var AD_UNIT_PATH = '/6355419/Travel';
var AD_SIZE = [728, 90];
var fakeContent = (function () {
var _id = 0;
return function _fakeContent() {
var content = 'Dynamic Fake Content ' + (++_id);
el('H2').appendChild(document.createTextNode(content));
};
})();
function el(tag) {
var e = document.createElement(tag)
document.body.appendChild(e);
return e;
}
function more() {
ReactDOM.render(React.createElement(Dfp, {
adUnitPath: AD_UNIT_PATH,
adSize: AD_SIZE,
adTargeting: {
test: 'infinitescroll'
}
}), el('div'));
fakeContent();
fakeContent();
}
</script>
<style>
body > div {
margin-bottom: 1em;
border: solid 1px black;
width: 728px
}
body > img {
margin-bottom: 1em;
display: block
}
body > button {
position: fixed;
bottom: 10px;
}
</style>
</head>
<body>
<h1>GPT Test Page - Infinite Scroll</h1>
<text>
<h2> Initial Fake Content </h2>
</text>
<button onclick="more()">More Content</button>
</body>
</html>