Reset author
This commit is contained in:
commit
2fcf9bfdda
108 changed files with 3642 additions and 0 deletions
38
docs/overrides/main.html
Normal file
38
docs/overrides/main.html
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block scripts %}
|
||||
<!-- Add scripts that need to run before here -->
|
||||
{{ super() }}
|
||||
<!-- Add scripts that need to run afterwards here -->
|
||||
|
||||
<!-- Script to protect content on the website -->
|
||||
<script>
|
||||
// Prevent right-click context menu
|
||||
document.addEventListener('contextmenu', function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
// Prevent text selection
|
||||
document.addEventListener('selectstart', function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
// Block Ctrl+C and other keyboard shortcuts for copying
|
||||
document.addEventListener('keydown', function (e) {
|
||||
if (e.ctrlKey && e.key === 'c') { // Blocks Ctrl+C
|
||||
e.preventDefault();
|
||||
}
|
||||
if (e.ctrlKey && e.shiftKey && e.key === 'v') { // Blocks Ctrl+Shift+V
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
// Additional measures for image protection
|
||||
document.addEventListener('contextmenu', function (e) {
|
||||
if (e.target.tagName.toLowerCase() === 'img') {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue