WaysAhead Global commited on
Commit
768e1a6
·
verified ·
1 Parent(s): bcb87cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -4
app.py CHANGED
@@ -21,11 +21,35 @@ st.set_page_config(page_title="AI Store Replacement & KPI Projection", layout="w
21
 
22
  # ✅ Disable Right-Click
23
  st.markdown(
24
- """<script>
25
- document.addEventListener("contextmenu", function(event){
26
- event.preventDefault();
 
 
 
 
 
 
 
 
 
 
 
27
  });
28
- </script>""",
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  unsafe_allow_html=True
30
  )
31
  if not openai_api_key:
 
21
 
22
  # ✅ Disable Right-Click
23
  st.markdown(
24
+ """
25
+ <style>
26
+ iframe {
27
+ visibility: hidden !important;
28
+ display: none !important;
29
+ pointer-events: none !important;
30
+ user-select: none !important;
31
+ }
32
+ </style>
33
+ <script>
34
+ document.addEventListener("keydown", function(event) {
35
+ if (event.ctrlKey && (event.key === "u" || event.key === "U" || event.key === "i" || event.key === "I" || event.key === "j" || event.key === "J" || event.key === "c" || event.key === "C")) {
36
+ event.preventDefault();
37
+ }
38
  });
39
+
40
+ setInterval(function() {
41
+ let devtools = /./;
42
+ devtools.toString = function() {
43
+ this.opened = true;
44
+ };
45
+ console.log("%c", devtools);
46
+ if (devtools.opened) {
47
+ alert("🚫 DevTools detected! Please close the console.");
48
+ window.location.reload();
49
+ }
50
+ }, 1000);
51
+ </script>
52
+ """,
53
  unsafe_allow_html=True
54
  )
55
  if not openai_api_key: