Skip to content

Commit d948f7a

Browse files
favicon cerca e helpdek
1 parent 52cf002 commit d948f7a

15 files changed

+85
-88
lines changed

cerca/favicon-114-precomposed.png

489 Bytes
Loading

cerca/favicon-120-precomposed.png

111 Bytes
Loading

cerca/favicon-144-precomposed.png

292 Bytes
Loading

cerca/favicon-152-precomposed.png

419 Bytes
Loading

cerca/favicon-180-precomposed.png

207 Bytes
Loading

cerca/favicon-192.png

386 Bytes
Loading

cerca/favicon-32.png

114 Bytes
Loading

cerca/favicon-36.png

20 Bytes
Loading

cerca/favicon-48.png

70 Bytes
Loading

cerca/favicon-72-precomposed.png

464 Bytes
Loading

cerca/favicon-72.png

464 Bytes
Loading

cerca/favicon-76.png

541 Bytes
Loading

cerca/favicon-96.png

498 Bytes
Loading

cerca/favicon.ico

0 Bytes
Binary file not shown.

cerca/index.html

+85-88
Original file line numberDiff line numberDiff line change
@@ -100,98 +100,95 @@
100100

101101
</head>
102102
<body>
103-
103+
104104
<form id="urlForm">
105-
<div class="search-container">
106-
<input type="text" id="codInput" placeholder="Inserisci CODICE...">
107-
<input type="button" value="Vai all'Ordine" onclick="searchCOD()">
108-
<br> <br>
109-
110-
<input type="text" id="url" name="url" placeholder="Inserisci URL del prodotto..." required>
111-
<input type="submit" value="ricerca SKU">
112-
</form>
113-
<div id="results"></div>
114-
115-
<script>
116-
document.getElementById('urlForm').addEventListener('submit', async function(event) {
117-
event.preventDefault(); // Previene il refresh della pagina
118-
const url = document.getElementById('url').value;
119-
const resultsDiv = document.getElementById('results');
120-
resultsDiv.innerHTML = ''; // Pulisce i risultati precedenti
121-
122-
try {
123-
// Esegui la richiesta per ottenere il codice sorgente della pagina
124-
const response = await fetch(`https://api.allorigins.win/raw?url=${encodeURIComponent(url)}`);
125-
const text = await response.text();
126-
127-
// RegExp per trovare "SKU" e i 40 caratteri successivi
128-
const regex = /"sku".{0,40}/g;
129-
let match;
130-
const results = [];
131-
132-
// Esegui la ricerca nel testo HTML
133-
while ((match = regex.exec(text)) !== null) {
134-
results.push(match[0]);
135-
}
136-
137-
// Visualizza i risultati
138-
if (results.length > 0) {
139-
resultsDiv.innerHTML = "<h2>stringhe trovate:</h2>";
140-
results.forEach(result => {
141-
const p = document.createElement('p');
142-
p.textContent = result;
143-
resultsDiv.appendChild(p);
144-
});
145-
} else {
146-
resultsDiv.textContent = 'Nessuna stringa SKU trovata.';
147-
}
148-
} catch (error) {
149-
resultsDiv.textContent = 'Errore durante il recupero del codice HTML: ' + error;
150-
}
151-
});
152-
</script>
153-
105+
<div class="search-container">
106+
<input type="text" id="codInput" placeholder="Inserisci CODICE...">
107+
<input type="button" value="Vai all'Ordine" onclick="searchCOD()">
108+
<br> <br>
109+
110+
<input type="text" id="url" name="url" placeholder="Inserisci URL del prodotto..." required>
111+
<input type="submit" value="ricerca SKU">
112+
</form>
113+
<div id="results"></div>
114+
115+
<script>
116+
document.getElementById('urlForm').addEventListener('submit', async function(event) {
117+
event.preventDefault(); // Previene il refresh della pagina
118+
const url = document.getElementById('url').value;
119+
const resultsDiv = document.getElementById('results');
120+
resultsDiv.innerHTML = ''; // Pulisce i risultati precedenti
121+
122+
try {
123+
// Esegui la richiesta per ottenere il codice sorgente della pagina
124+
const response = await fetch(`https://api.allorigins.win/raw?url=${encodeURIComponent(url)}`);
125+
const text = await response.text();
126+
127+
// RegExp per trovare "SKU" e i 40 caratteri successivi
128+
const regex = /"sku".{0,40}/g;
129+
let match;
130+
const results = [];
131+
132+
// Esegui la ricerca nel testo HTML
133+
while ((match = regex.exec(text)) !== null) {
134+
results.push(match[0]);
135+
}
136+
137+
// Visualizza i risultati
138+
if (results.length > 0) {
139+
resultsDiv.innerHTML = "<h2>stringhe trovate:</h2>";
140+
results.forEach(result => {
141+
const p = document.createElement('p');
142+
p.textContent = result;
143+
resultsDiv.appendChild(p);
144+
});
145+
} else {
146+
resultsDiv.textContent = 'Nessuna stringa SKU trovata.';
147+
}
148+
} catch (error) {
149+
resultsDiv.textContent = 'Errore durante il recupero del codice HTML: ' + error;
150+
}
151+
});
152+
</script>
153+
154154
<br>
155155
<input type="text" id="prodInput" placeholder="Inserisci parole chiave...">
156156
<input type="button" value="Cerca sul sito Olalla.it" onclick="searchPROD()">
157-
</div>
158-
159-
<script>
160-
function searchCOD() {
161-
const codice1 = document.getElementById('codInput').value.trim();
162-
163-
if (codice1) {
164-
let nuovoURL = `https://www.olalla.it/wp-admin/post.php?post=${codice1}&action=edit`;
165-
window.location.href = nuovoURL;
166-
} else {
167-
alert("Per favore, inserisci un codice COD.");
157+
</div>
158+
159+
<script>
160+
function searchCOD() {
161+
const codice1 = document.getElementById('codInput').value.trim();
162+
163+
if (codice1) {
164+
let nuovoURL = `https://www.olalla.it/wp-admin/post.php?post=${codice1}&action=edit`;
165+
window.open(nuovoURL, '_blank'); // Apri in una nuova scheda
166+
} else {
167+
alert("Per favore, inserisci un codice COD.");
168+
}
168169
}
169-
}
170-
function searchSKU() {
171-
const codice2 = document.getElementById('skuInput').value.trim();
172-
173-
if (codice2) {
174-
const nuovoURL = `https://www.olalla.it/wp-admin/edit.php?s=${codice2}&post_status=all&post_type=product&action=-1&seo_filter&product_type&stock_status&wcpv_product_vendors&paged=1&action2=-1`;
175-
window.location.href = nuovoURL;
176-
} else {
177-
alert("Per favore, inserisci un codice SKU.");
170+
171+
function searchSKU() {
172+
const codice2 = document.getElementById('skuInput').value.trim();
173+
174+
if (codice2) {
175+
const nuovoURL = `https://www.olalla.it/wp-admin/edit.php?s=${codice2}&post_status=all&post_type=product&action=-1&seo_filter&product_type&stock_status&wcpv_product_vendors&paged=1&action2=-1`;
176+
window.open(nuovoURL, '_blank'); // Apri in una nuova scheda
177+
} else {
178+
alert("Per favore, inserisci un codice SKU.");
179+
}
178180
}
179-
}
180-
function searchPROD() {
181-
const codice3 = document.getElementById('prodInput').value.trim();
182-
183-
if (codice3) {
184-
let nuovoURL = `https://www.olalla.it/?s=${codice3}&post_type=product`;
185-
window.location.href = nuovoURL;
186-
} else {
187-
alert("Per favore, inserisci una descrizione migliore.");
181+
182+
function searchPROD() {
183+
const codice3 = document.getElementById('prodInput').value.trim();
184+
185+
if (codice3) {
186+
let nuovoURL = `https://www.olalla.it/?s=${codice3}&post_type=product`;
187+
window.open(nuovoURL, '_blank'); // Apri in una nuova scheda
188+
} else {
189+
alert("Per favore, inserisci una descrizione migliore.");
190+
}
188191
}
189-
}
190-
191-
</script>
192-
</body>
193-
</html>
194-
195-
196-
197-
192+
</script>
193+
</body>
194+
</html>

0 commit comments

Comments
 (0)