JavaScript Uzyskaj bieżący adres URL
var currentUrl = window.location.href;
Grepper
var currentUrl = window.location.href;
window.location.hostname
var url = new URL('http://megaimkon.loc/storage/photos/all_users/slider-1.jpg');
console.log(url.pathname)
window.location.protocol = “http:”
window.location.host = “css-tricks.com”
window.location.pathname = “/example/index.html”
window.location.search = “?s=flexbox”const
postID = (new URLSearchParams(window.location.search)).get('post');
const response = await fetch(new URL('http://www.example.com/démonstration.html'));
const url = new URL(url [, base])