PageSourceSearch

https://booko.co.nz/assets/application-13410222.js

js booko.co.nz collected 2026-10-04 15:08:47 UTC 1,230 bytes, 41 lines download raw bytes

1// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
2import "@hotwired/turbo-rails"
3import "controllers"
4import "ahoy"
5import "chartkick"
6import "Chart.bundle"
7
8
9document.addEventListener("turbo:load", function() {
10  document.querySelectorAll('.product_link').forEach(el => {
11    el.addEventListener('click', event => {
12      ahoy.track('Clicked Product', event.target.closest('a').dataset); 
13    })
14  })
15});
16
17
18
19/**
20* Safari 13 and earlier do not support relaceChildren - this PolyFill provides that function
21* 
22* replaceChildren.js
23* @mdn https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/replaceChildren
24* @email [email protected]
25**/
26(function (item) {
27  if (!item.replaceChildren) {
28      item.replaceChildren = function () {
29          var parentNode = this;
30          var oldNodes = [].slice.call(parentNode.childNodes);
31          var newNodes = [].slice.call(arguments);
32          oldNodes.forEach(function (nodes) {
33              if (!newNodes.find(function(el){ return el === nodes})) {
34                  parentNode.removeChild(nodes)
35              }
36          });
37          parentNode.append.apply(this,newNodes);
38      }
39  }
40})(HTMLElement.prototype);
41

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.