PageSourceSearch

https://www.drinko.se/assets/controllers/cart_controller-5de7f250d…fd18a27c7df7d4a88b1c9bb2bd5b0140af77dbeb.js

js drinko.se collected 2026-09-25 12:32:02 UTC 1,830 bytes, 52 lines download raw bytes

1import { Controller } from "@hotwired/stimulus"
2
3export default class extends Controller {
4  non_subscription_toggle(cart_id) {
5    fetch('/cart_action/change_cart_to_non_member', { method: 'PATCH' })
6  }
7
8  non_subscription_toggle_product(event) {
9    let product_id = event.target.dataset.productid
10    let amount = getAmount(`${product_id}`)
11    fetch(`/cart_action/change_cart_to_non_member?product_id=${product_id}&amount=${amount}`, { method: 'PATCH' })
12  }
13
14  non_subscription_toggle_guest(cart_id) {
15    fetch('/cart_action/change_cart_to_non_member_guest', { method: 'PATCH' })
16  }
17
18  non_subscription_toggle_guest_product(event) {
19    let product_id = event.target.dataset.productid
20    let amount = getAmount(`${product_id}`)
21    fetch(`/cart_action/change_cart_to_non_member_guest?product_id=${product_id}&amount=${amount}`, { method: 'PATCH' })
22  }
23
24  subscription_toggle_product(event) {
25    let product_id = event.target.dataset.productid
26    let amount = getAmount(`${product_id}`)
27    fetch(`/cart_action/change_cart_to_member?product_id=${product_id}&amount=${amount}`, { method: 'PATCH' })
28  }
29
30  subscription_add_product(event) {
31    let product_id = event.target.dataset.productid
32    fetch(`/cart_action/cart_to_member_with_product?product_id=${product_id}`, { method: 'PATCH' })
33
34  }
35
36  subscription_toggle(cart_id) {
37    fetch('/cart_action/change_cart_to_member', { method: 'PATCH' })
38  }
39
40  non_subscription_toggle_de(cart_id) {
41    fetch('/cart_action/change_cart_to_non_member_de', { method: 'PATCH' })
42  }
43
44  subscription_toggle_de(cart_id) {
45    fetch('/cart_action/change_cart_to_member_de', { method: 'PATCH' })
46  }
47   getCookie(name) {
48    const value = `; ${document.cookie}`;
49    const parts = value.split(`; ${name}=`);
50    if (parts.length === 2) return parts.pop().split(';').shift();
51  }
52};

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.