PageSourceSearch

https://www.nedgia.es/wp-content/themes/restyling-nedgia-main/resources/scripts/basetis/inbound.js

js nedgia.es collected 2026-10-02 11:51:57 UTC 950 bytes, 24 lines download raw bytes

1document.addEventListener('DOMContentLoaded', () => {
2  // Solo en estas dos rutas (admite con/sin barra final)
3  const path = window.location.pathname.replace(/\/$/, '');
4  if (path !== '/quiero-gas' && path !== '/hogar/instalar-gas') return;
5
6  // Si no hay query params en la URL actual, no tocamos nada
7  const currentParams = new URLSearchParams(window.location.search);
8  if (!currentParams.toString()) return;
9
10  // Solo enlaces a producción (https, sin www)
11  document
12    .querySelectorAll('a[href^="https://solicitargasnatural.nedgia.es/"]')
13    .forEach((a) => {
14      try {
15        const url = new URL(a.href); // ya es absoluta
16        // Añadimos/actualizamos TODOS los parámetros actuales
17        currentParams.forEach((value, key) => url.searchParams.set(key, value));
18        a.href = url.toString();
19        if (a.target === '_blank') a.rel = 'noopener';
20      } catch {
21        /* href inválido: ignorar */
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.