Skip to content

Commit f81cfa0

Browse files
update
1 parent 1ac5600 commit f81cfa0

34 files changed

+45192
-24
lines changed

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"editor.linkedEditing": true
3+
}

compendium.css BKstyle.css

+10-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ body {
22
background-image: linear-gradient(to right, #313131, #171717);
33
font-family: Helvetica, sans-serif;
44
color: white;
5-
padding: 10px;
5+
display: flex;
6+
justify-content: center;
7+
align-items: center;
68
}
79

810

@@ -11,7 +13,8 @@ body {
1113
display: flex;
1214
flex-direction: column;
1315
align-items: center;
14-
gap: 10px;
16+
padding: 10px;
17+
border-radius: 15px;
1518
}
1619
input[type="text"] {
1720
padding: 10px;
@@ -20,26 +23,28 @@ body {
2023
}
2124
input[type="button"] {
2225
padding: 10px;
26+
margin: 10px;
2327
font-size: 16px;
2428
cursor: pointer;
2529
background-color: #FFC018;
2630
color: black;
2731
border: none;
28-
border-radius: 5px;
32+
border-radius: 15px;
2933
transition: background-color 0.3s;
3034
}
3135
input[type="button"]:hover {
3236
background-color: #FFC018;
3337
}
3438
input[type="submit"] {
3539
padding: 10px;
40+
margin: 10px;
3641
font-size: 16px;
3742
cursor: pointer;
3843
background-color: #FFC018;
3944
color: black;
4045
border: none;
41-
border-radius: 5px;
42-
transition: background-color 0.3s;
46+
47+
border-radius: 15px;
4348
}
4449
input[type="submit"]:hover {
4550
background-color: #FFC018;

bulma.css

+22,445
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core.js

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
2+
document.getElementById('urlForm').addEventListener('submit', async function(event) {
3+
event.preventDefault(); // Previene il refresh della pagina
4+
const url = document.getElementById('url').value;
5+
const resultsDiv = document.getElementById('results');
6+
resultsDiv.innerHTML = ''; // Pulisce i risultati precedenti
7+
8+
try {
9+
// Esegui la richiesta per ottenere il codice sorgente della pagina
10+
const response = await fetch(`https://api.allorigins.win/raw?url=${encodeURIComponent(url)}`);
11+
const text = await response.text();
12+
13+
// RegExp per trovare "SKU" e i 40 caratteri successivi
14+
const regex = /"sku".{0,40}/g;
15+
let match;
16+
const results = [];
17+
18+
// Esegui la ricerca nel testo HTML
19+
while ((match = regex.exec(text)) !== null) {
20+
results.push(match[0]);
21+
}
22+
23+
// Visualizza i risultati
24+
if (results.length > 0) {
25+
resultsDiv.innerHTML = "<h2>stringhe trovate:</h2>";
26+
results.forEach(result => {
27+
const p = document.createElement('p');
28+
p.textContent = result;
29+
resultsDiv.appendChild(p);
30+
});
31+
} else {
32+
resultsDiv.textContent = 'Nessuna stringa SKU trovata.';
33+
}
34+
} catch (error) {
35+
resultsDiv.textContent = 'Errore durante il recupero del codice HTML: ' + error;
36+
}
37+
});
38+
39+
function searchCOD() {
40+
const codice1 = document.getElementById('codInput').value.trim();
41+
42+
if (codice1) {
43+
let nuovoURL = `https://www.olalla.it/wp-admin/post.php?post=${codice1}&action=edit`;
44+
window.open(nuovoURL, '_blank'); // Apri in una nuova scheda
45+
} else {
46+
alert("Per favore, inserisci un codice COD.");
47+
}
48+
}
49+
50+
function searchSKU() {
51+
const codice2 = document.getElementById('skuInput').value.trim();
52+
53+
if (codice2) {
54+
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`;
55+
window.open(nuovoURL, '_blank'); // Apri in una nuova scheda
56+
} else {
57+
alert("Per favore, inserisci un codice SKU.");
58+
}
59+
}
60+
61+
function searchPROD() {
62+
const codice3 = document.getElementById('prodInput').value.trim();
63+
64+
if (codice3) {
65+
let nuovoURL = `https://www.olalla.it/?s=${codice3}&post_type=product`;
66+
window.open(nuovoURL, '_blank'); // Apri in una nuova scheda
67+
} else {
68+
alert("Per favore, inserisci una descrizione migliore.");
69+
}
70+
}
71+
72+
function resetForms() {
73+
document.getElementById('codInput').value = '';
74+
document.getElementById('url').value = '';
75+
document.getElementById('prodInput').value = '';
76+
document.getElementById('results').innerHTML = ''; // Pulisce i risultati
77+
}

0 commit comments

Comments
 (0)