PageSourceSearch

https://cybermobbing.web.app/js/scenes/p4-homescreen.js?v=1784223914

js cybermobbing.web.app collected 2026-10-03 12:20:45 UTC 2,822 bytes, 79 lines download raw bytes

1/**
2 * @file p4-homescreen.js
3 * @description Scene 4: Phone homescreen notification flood (78-93s).
4 *   Shows Tom's phone from his perspective: notification badges on all apps
5 *   escalate rapidly, and push notifications stack up from every platform.
6 *   The overwhelming volume of notifications visualizes how inescapable
7 *   the harassment is. Transitions to the iMessage scene (p4b).
8 * @requires audio.js   - simTimeout(), sndBuzz()
9 * @requires helpers.js  - sw()
10 * @requires i18n.js     - t() for notification text
11 */
12
13// ===== P4: HOMESCREEN (78-93s) =====
14
15/**
16 * Runs the homescreen notification flood scene. Two intervals run in parallel:
17 * one escalates notification badge counts on app icons, the other pushes
18 * notification banners into a visible stack (max 4 visible at a time).
19 */
20function p4() {
21  // Initial badge counts (already elevated to show harassment was ongoing)
22  var w = 23,
23    ig = 186,
24    tk = 4231,
25    n = 47,
26    s = 12;
27
28  // Badge counter escalation via simTimeout chain (pausable)
29  var badgeActive = true;
30  function badgeTick() {
31    w += Math.floor(Math.random() * 4) + 1;
32    ig += Math.floor(Math.random() * 18) + 6;
33    tk += Math.floor(Math.random() * 260) + 70;
34    n += Math.floor(Math.random() * 5) + 1;
35    s += Math.floor(Math.random() * 3) + 1;
36    document.getElementById('xW').textContent = w;
37    document.getElementById('xI').textContent = ig;
38    document.getElementById('xT').textContent = tk > 1000 ? (tk / 1000).toFixed(1) + 'k' : tk;
39    document.getElementById('xN').textContent = n;
40    document.getElementById('xS').textContent = s;
41    if (badgeActive) simTimeout(badgeTick, 500);
42  }
43  simTimeout(badgeTick, 500);
44
45  // Push notification banners: [emoji, CSS icon class, text]
46  var nts = [
47    ['\uD83D\uDCAC', 'hs-ico-wa', t('hs.n1')],
48    ['\u2764\uFE0F', 'hs-ico-heart', t('hs.n2')],
49    ['\uD83D\uDCF8', 'hs-ico-cam', t('hs.n3')],
50    ['\uD83C\uDFB5', 'hs-ico-heart', t('hs.n4')],
51    ['\uD83D\uDCF1', 'hs-ico-phone', t('hs.n5')],
52    ['\uD83D\uDCAC', 'hs-ico-wa', t('hs.n6')],
53    ['\uD83C\uDFB5', 'hs-ico-heart', t('hs.n7')],
54    ['\uD83D\uDCF8', 'hs-ico-cam', t('hs.n8')],
55  ];
56
57  // Notification banner queue via simTimeout chain (pausable)
58  var nc = document.getElementById('hsN'),
59    ni = 0;
60  function notifTick() {
61    if (ni >= nts.length) return;
62    var x = nts[ni];
63    var d = document.createElement('div');
64    d.className = 'hs-n';
65    d.innerHTML = '<div class="ico ' + x[1] + '">' + x[0] + '</div><div>' + x[2] + '</div>';
66    nc.appendChild(d);
67    if (nc.children.length > 4) nc.removeChild(nc.firstChild);
68    ni++;
69    sndBuzz();
70    if (ni < nts.length) simTimeout(notifTick, 1600);
71  }
72  simTimeout(notifTick, 1600);
73
74  simTimeout(function () {
75    badgeActive = false;
76    sw('aHs', 'aIm');
77    p4b();
78  }, 15000);
79}

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.