lingua-libre / SignIt

🌻 Lingua Libre SignIt web-browser extension translates selected word in French Sign Language via an elegant pop up so you learn sign language while reading online.
https://addons.mozilla.org/en-US/firefox/addon/lingua-libre-signit/
MIT License
15 stars 15 forks source link

Refactor SignItVideosIframe.html js #117

Closed hugolpz closed 3 months ago

hugolpz commented 3 months ago

Use :

function getUrlParameter(name) {
  const urlParams = new URLSearchParams(window.location.search);
  return urlParams.get(name) || '';
}
// Assuming the URL is "http://example.com/?search=test&lang=en"
console.log(getUrlParameter('search')); // Output: "test"
console.log(getUrlParameter('lang'));   // Output: "en"
console.log(getUrlParameter('page'));   // Output: ""
hugolpz commented 3 months ago

✅ Done ! image