PageSourceSearch

https://careers.stanwell.com/assets/sites/controllers/blocks/candidate_favourite_controller-4d3a1507.js

js stanwell.com collected 2026-10-02 06:56:14 UTC 720 bytes, 21 lines download raw bytes

1import BaseController from 'common/controllers/base_controller'
2import {FetchUtils} from "common/fetch_utils"
3
4export default class extends BaseController {
5  connect() {
6    this.markConnected()
7  }
8
9  toggle(e) {
10    e.preventDefault()
11    //this should be replaced with turbo code
12    const button = this.element.querySelector('.favourites-button-text')
13    button.classList.toggle('favourited')
14    const favourited = button.classList.contains('favourited')
15    if (favourited) {
16      fetch(this.element.dataset.linkFavouriteUrl, {method: 'post', headers: FetchUtils.csrfHeaders()})
17    } else {
18      fetch(this.element.dataset.linkUnfavouriteUrl, {method: 'delete', headers: FetchUtils.csrfHeaders()})
19    }
20  }
21}

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.