This repository has been archived by the owner on Sep 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathexample.html
72 lines (63 loc) · 2.87 KB
/
example.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
<html>
<head>
<title>Example | PageGuard.js</title>
<script type="text/javascript" src="pageguard.min.js"></script>
</head>
<body>
<div>
<p>Why are legends handed down by storytellers useful?</p>
<p> We can read of things that happened 5,000 years ago in the Near East,where people first learned to write.But there are
some parts of the word where even now people cannot write.The only way that they can preserve their history is to recount
it as sagas -- legends handed down from one generation of another.These legends are useful because they can tell us something
about migrations of people who lived long ago,but none could write down what they did.Anthropologists wondered where the
remote ancestors of the Polynesian peoples now living in the Pacific Islands came from.The sagas of these people explain
that some of them came from Indonesia about 2,000 years ago.</p>
<p>But the first people who were like ourselves lived so long ago that even their sagas,if they had any,are forgotten.So archaeologists
have neither history nor legends to help them to find out where the first 'modern men' came from.</p>
<p>Fortunately,however,ancient men made tools of stone,especially flint,because this is easier to shape than other kinds.They
may also have used wood and skins,but these have rotted away.Stone does not decay,and so the tools of long ago have remained
when even the bones of the men who made them have disappeared without trace.</p>
</div>
<script>
(function () {
function ready(func) {
if (document.addEventListener) {
document.addEventListener('DOMContentLoaded', function () {
document.removeEventListener('DOMContentLoaded', arguments.callee, false);
func();
}, false);
} else if (document.attachEvent) {
document.attachEvent('onreadystatechange', function () {
if (document.readyState == 'complete') {
document.detachEvent('onreadystatechange', arguments.callee);
func();
}
});
}
}
var detectDevTools_key = 0;
ready(function () {
detect_key = PageGuard.detectDevTools(function () {
window.document.body.innerHTML = 'No copying or analyzing.';
// console.clear(); // Sometimes it may makes this page crash
});
});
var HTML;
var detectSuspect_key = PageGuard.detectSuspectActions(function () {
HTML = document.body.innerHTML;
document.body.innerHTML = 'Move your mouse back and click';
}, function () {
document.body.innerHTML = HTML;
});
PageGuard.disableFunctions();
var anticopy_key = PageGuard.antiCopy();
setTimeout(function () {
PageGuard.allowCopy(anticopy_key);
PageGuard.stopDetecting(detectDevTools_key);
PageGuard.stopDetectingSuspectActions(detectSuspect_key);
alert('You can copy now');
}, 20000);
})();
</script>
</body>
</html>