PageSourceSearch

https://spacefarmers.io/assets/controllers/farmers_show_controller…112b4e29df3744c2b13eabed89f3cae1dc7b8269.js

js spacefarmers.io collected 2026-10-07 22:08:02 UTC 1,052 bytes, 38 lines download raw bytes

1import { Controller } from "@hotwired/stimulus"
2import consumer from 'channels/consumer';
3
4export default class extends Controller {
5  static targets = ["feeUpdate"]
6
7  connect() {
8    activeMenu('farmers');
9    closeMenu();
10    topFunction();
11    this.launcherId = document.getElementById('launcher-id').dataset.launcherId;
12    this.connectToChannel();
13  }
14
15  disconnect() {
16    this.channel.unsubscribe();
17  }
18
19  connectToChannel() {
20    this.channel = consumer.subscriptions.create({ channel: "PartialsChannel", launcher_id: this.launcherId }, {
21      connected: this._cableConnected.bind(this),
22      disconnected: this._cableDisconnected.bind(this),
23      received: this._cableReceived.bind(this),
24    });
25  }
26  _cableConnected() {}
27  _cableDisconnected() {}
28  _cableReceived(data) {
29    var event = new CustomEvent('farmer:partial', { detail: data });
30    window.dispatchEvent(event);
31  }
32
33  feeUpdateTargetConnected(element) {
34    setTimeout(function() {
35      document.getElementById('fee-update').classList.add('d-none');
36    }, 2500);
37  }
38};

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.