Sha256: 3ad870731a81a6875ac8b1200f5c737e4eaed76520ecbc6ee69f40c32d57e495
Contents?: true
Size: 836 Bytes
Versions: 3
Compression:
Stored size: 836 Bytes
Contents
// This file can be overridden in your engine let currentURL = new URL(window.location.href); $(document).on('turbo:load', function (event) { currentURL = new URL(event.originalEvent.detail.url); console.log("Page loaded listening to turbo:load event", currentURL.href); console.log(" - Protocol:", currentURL.protocol); console.log(" - Username:", currentURL.username); console.log(" - Password:", currentURL.password); console.log(" - Host:", currentURL.host); console.log(" - Hostname:", currentURL.hostname); console.log(" - Port:", currentURL.port); console.log(" - Pathname:", currentURL.pathname); console.log(" - Search:", currentURL.search); currentURL.searchParams.forEach((v, k) => { console.log(` - ${k}: ${v}`); }) console.log(" - Hash:", currentURL.hash); });
Version data entries
3 entries across 3 versions & 1 rubygems