- varie sistemazioni: filtri iscritti, profilo, ecc...
This commit is contained in:
@@ -9511,6 +9511,24 @@ export const tools = {
|
||||
return optcatalogo.areadistampa!.scale
|
||||
},
|
||||
|
||||
getMainLink(url: string) {
|
||||
try {
|
||||
// Crea un nuovo oggetto URL a partire dall'input
|
||||
const parsedUrl = new URL(url);
|
||||
|
||||
// Estrae solo il protocollo, l'host e la porta
|
||||
const { protocol, host } = parsedUrl;
|
||||
|
||||
// Ricostruisce il link principale
|
||||
const mainLink = `${host}`;
|
||||
|
||||
return mainLink;
|
||||
} catch (error) {
|
||||
console.error('Errore durante l\'elaborazione dell\'URL:', error);
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
// FINE !
|
||||
|
||||
// getLocale() {
|
||||
|
||||
Reference in New Issue
Block a user