Spaces:
Sleeping
Sleeping
File size: 1,157 Bytes
b4d2108 a1da561 b4d2108 a1da561 b4d2108 a1da561 b4d2108 |
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 |
no_copy_paste_js = """
function disableCopyPaste() {
// Disable copy-paste globally
document.addEventListener("copy", function (e) {
const target = e.target.closest("#group-b");
console.log("Copy event target:", e.target, "Closest group-b:", target);
if (!target) {
e.preventDefault();
alert("Copy is disabled");
}
});
document.addEventListener("cut", function (e) {
const target = e.target.closest("#group-b");
if (!target) {
e.preventDefault();
alert("Cut is disabled");
}
});
document.addEventListener("paste", function (e) {
const target = e.target.closest("#group-b");
if (!target) {
e.preventDefault();
alert("Paste is disabled");
}
});
}
"""
background_css = """
.gradio-container {
background: url('https://platform.vox.com/wp-content/uploads/sites/2/chorus/uploads/chorus_asset/file/9376591/blade3.jpg');
background-size: cover;
background-attachment: fixed;
background-position: center;
}
""" |