PageSourceSearch

https://epicappsolutions.com/eas-assets/nope.js

js epicappsolutions.com collected 2026-09-24 13:57:35 UTC 2,892 bytes, 69 lines download raw bytes

1/* EAS page guard — "nope."
2 * Blocks right-click / view-source / devtools shortcuts on public pages and
3 * answers with a small branded toast instead of the browser menu.
4 * Keep it light: no devtools-detector loops, no debugger traps — just polite
5 * refusal. Include with: <script src="/eas-assets/nope.js" defer></script>
6 */
7(function () {
8  'use strict';
9  if (window.__easNope) return;
10  window.__easNope = true;
11
12  var toastTimer = null;
13  function toast(msg) {
14    var el = document.getElementById('eas-nope-toast');
15    if (!el) {
16      el = document.createElement('div');
17      el.id = 'eas-nope-toast';
18      el.setAttribute('role', 'status');
19      el.style.cssText =
20        'position:fixed;left:50%;bottom:42px;transform:translateX(-50%) translateY(20px);' +
21        'background:#141414;color:#f5f0e6;border:1px solid #e8a33d;border-radius:10px;' +
22        'padding:12px 22px;font:600 15px/1.3 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;' +
23        'letter-spacing:.02em;box-shadow:0 8px 30px rgba(0,0,0,.45);' +
24        'opacity:0;transition:opacity .18s ease,transform .18s ease;z-index:2147483647;' +
25        'pointer-events:none;text-align:center;max-width:86vw;';
26      el.innerHTML = '<span style="color:#e8a33d">nope.</span>' +
27        '<span style="display:block;font-weight:400;font-size:12px;opacity:.75;margin-top:3px">' +
28        'Epic App Solutions &mdash; this page is protected</span>';
29      (document.body || document.documentElement).appendChild(el);
30    }
31    el.style.opacity = '1';
32    el.style.transform = 'translateX(-50%) translateY(0)';
33    clearTimeout(toastTimer);
34    toastTimer = setTimeout(function () {
35      el.style.opacity = '0';
36      el.style.transform = 'translateX(-50%) translateY(20px)';
37    }, 1600);
38  }
39
40  // Right-click / long-press menu — everywhere on the page. Form fields keep
41  // their menu: paste and spellcheck are legitimate use, not inspection.
42  document.addEventListener('contextmenu', function (e) {
43    var t = e.target;
44    if (t && t.closest &&
45        t.closest('input,textarea,select,[contenteditable="true"]')) return;
46    e.preventDefault();
47    toast('nope.');
48  }, true);
49
50  // Keyboard lanes into devtools / view-source / save / print-scrape.
51  document.addEventListener('keydown', function (e) {
52    var k = e.key || '';
53    var combo = (e.ctrlKey || e.metaKey);
54    var blocked =
55      k === 'F12' ||
56      (combo && e.shiftKey && /^[ijckIJCK]$/.test(k)) ||   // devtools / console
57      (combo && /^[usUS]$/.test(k));                        // view-source / save-as
58    if (blocked) {
59      e.preventDefault();
60      e.stopPropagation();
61      toast('nope.');
62    }
63  }, true);
64
65  // Dragging images off the page is just right-click with extra steps.
66  document.addEventListener('dragstart', function (e) {
67    if (e.target && e.target.tagName === 'IMG') e.preventDefault();
68  }, true);
69})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.