1export default class Spinner { 2 constructor() { 3 document.addEventListener("turbo:before-visit", this.start.bind(this)); 4 document.addEventListener("turbo:submit-start", this.start.bind(this)); 5 document.addEventListener("ajax:send", this.start.bind(this)); 6 document.addEventListener("turbo:before-render", this.stop.bind(this)); 7 document.addEventListener("turbo:submit-end", this.stop.bind(this)); 8 document.addEventListener("ajax:complete", this.stop.bind(this)); 9 } 10 11 start() { 12 clearTimeout(this.timer); 13 this.timer = setTimeout( _ => { 14 console.log('start spinner') 15 $(".spinner-wrapper").removeClass("spinner--stopped"); 16 }, 200); 17 } 18 19 stop() { 20 clearTimeout(this.timer); 21 $(".spinner-wrapper").addClass("spinner--stopped"); 22 } 23} 24;
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.