-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathexample.html
More file actions
46 lines (32 loc) · 1.12 KB
/
example.html
File metadata and controls
46 lines (32 loc) · 1.12 KB
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
<!-- Example of HTML-Guard protection -->
<!DOCTYPE html>
<html>
<head>
<script src="../html-guard.js"></script>
<script>
// PROTECTION: Disable DevTools
HtmlGuard.protections.antiDevTools();
// PROTECTION: Disable context menu
HtmlGuard.protections.blockContextMenu();
// PROTECTION: Disable drag
HtmlGuard.protections.blockDrag();
// PROTECTION: Disable selection
HtmlGuard.protections.blockSelection();
// PROTECTION: Disable console output
HtmlGuard.protections.blockConsoleOutput();
// ADDING: Add link to 'style.css'
HtmlGuard.loader.loadStyleByRef("styles.css");
// ADDING: Run 'test.js' script
HtmlGuard.loader.loadScriptBySrc("test.js");
</script>
</head>
<body>
<div>
<!-- '_id' is protected variant of 'id' -->
<p>Hello, world! Time: <span _id="time"></span></p>
<!-- '_src' is protected variant of 'src' -->
<img _src="test.jpg" _alt="Test image" />
</div>
<a _href="https://github.com/DosX-dev/HTML-Guard">HTML Guard in GitHub!</a>
</body>
</html>