PageSourceSearch

https://mactheknife.com/assets/signum/notification_body/component_…c761b9437f47241afe7a09fe3a3e8601e7084d3c.js

js mactheknife.com collected 2026-10-04 12:58:29 UTC 1,190 bytes, 42 lines download raw bytes

1import ApplicationController from "signum/controllers/application_controller"
2import { post } from '@rails/request.js';
3
4export default class extends ApplicationController {
5  static values = { type: String, timeout: Number, sticky: Boolean, signalId: String, signalState: String }
6  connect() {
7    if (this.typeValue == "balloon" && !this.stickyValue) {
8      this.timeoutId = setTimeout(() => {
9        this.close()
10      }, this.timeoutValue * 1000 + 500)
11    }
12  }
13
14  close(event) {
15    setTimeout(() => {
16      this.element?.parentElement?.remove()
17      if (event && this.typeValue != "balloon") {
18        this.markClose()
19      }
20    }, 300)
21  }
22
23  async markClose() {
24    try {
25      const response = await post('/signal/close', {
26        body: JSON.stringify({ id: this.signalIdValue }),
27        contentType: 'application/json'
28      });
29      if (response.ok) {
30        const niE = new CustomEvent("nd-item-activity", {
31          bubbles: true,
32          detail: "closed",
33        });
34        window.dispatchEvent(niE);
35      } else {
36        console.error('Error: ', response.statusText);
37      }
38    } catch (error) {
39      console.error('Request failed', error);
40    }
41  }
42};

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.