{"id":3231,"date":"2026-01-30T00:07:39","date_gmt":"2026-01-29T23:07:39","guid":{"rendered":"https:\/\/www.manuelmontanari.com\/blog\/?page_id=3231"},"modified":"2026-11-25T22:35:55","modified_gmt":"2026-11-25T21:35:55","slug":"media-explorer","status":"publish","type":"page","link":"https:\/\/www.manuelmontanari.com\/blog\/media-explorer\/","title":{"rendered":"Media Explorer"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"it\">\n<head>\n<meta charset=\"UTF-8\">\n<title>ARCHIVIO MEDIA E ROM<\/title>\n<style>\n\n\/* overlay semi-trasparente full screen *\/\n#infoOverlay {\n  display: none; \/* nascosto di default *\/\n  position: fixed;\n  top: 0; left: 0;\n  width: 100vw;\n  height: 100vh;\n  background: rgba(0,0,0,0.6);\n  z-index: 99999;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n\n\/* box istruzioni *\/\n#infoBox {\n  background: #222;\n  color: #ddd;\n  padding: 20px;\n  width: 80%;   \/* prende 80% della larghezza dello schermo *\/\n  max-width: 1200px;  \/* ma non pi\u00f9 grande di 800px *\/\n  border-radius: 8px;\n  position: relative;\n  box-shadow: 0 0 15px rgba(0,0,0,0.5);\n}\n\n\/* tasto chiudi *\/\n#closeInfo {\n  position: absolute;\n  top: 8px;\n  right: 8px;\n  background: none;\n  border: none;\n  color: red;\n  font-weight: bold;\n  font-size: 24px;\n  cursor: pointer;\n}\n\n\/* Pulsante download *\/\n#downloadFavs {\n  margin-left: 8px;\n  background: #444;\n  color: #green;\n  border: none;\n  padding: 4px 8px;\n  cursor: pointer;\n  font-weight: bold;\n  border-radius: 4px;\n  transition: background 0.1s, color 0.3s;\n}\n\n\/* Pulsante email *\/\n#emailFavs {\n  margin-left: 8px;\n  background: #444;\n  color: #ddd;\n  border: none;\n  padding: 4px 8px;\n  cursor: pointer;\n  font-weight: bold;\n  border-radius: 4px;\n  transition: background 0.1s, color 0.3s;\n}\n\n\/* Warning limite massimo superato *\/\n#favWarning {\n  display: none;\n  margin-top: 8px;\n  padding: 6px 8px;\n  background: #ff4d4d;\n  color: #fff;\n  font-size: 12px;\n  border-radius: 4px;\n}\n\n#downloadFavs:hover {\n  background: #27ae60;   \/* verde *\/\n  color: #fff;\n}\n\n\n\n#emailFavs:hover {\n  background: #2980b9;   \/* azzurro *\/\n  color: #fff;\n}\n\n#favorites {\n  position: fixed;\n  top: 30px;       \/* margine dall\u2019alto *\/\n  right: 30px;     \/* margine da destra *\/\n  width: var(--fav-width, 300px); \/* regolabile trascinando il bordo sinistro *\/\n  height: calc(100% - 30px);  \/* altezza meno margine superiore *\/\n  background: #1a1a1a;\n  border-left: 2px solid #4da3ff;\n  padding: 12px;\n  box-sizing: border-box;\n  z-index: 9999;\n  overflow-y: auto;\n  border-radius: 6px;  \/* leggero arrotondamento *\/\n}\n\n#clearFavs {\n  margin-left: 8px;\n  background: #444;\n  color: #ddd;\n  border: none;\n  padding: 4px 8px;\n  cursor: pointer;\n  font-weight: bold;\n  border-radius: 4px;\n  transition: background 0.2s, color 0.2s;\n}\n\n#clearFavs:hover {\n  background: #e74c3c;   \/* rosso pericoloso *\/\n  color: #fff;\n}\n\n.fav-header {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  font-weight: bold;\n  color: #4da3ff;\n  margin-bottom: 10px;\n}\n\n#downloadFavs {\n  background: none;\n  border: none;\n  color: #ddd;\n  font-size: 18px;\n  cursor: pointer;\n}\n\n#downloadFavs:hover {\n  color: #fff;\n}\n\n#favList {\n  list-style: none;\n  padding: 0;\n  margin: 0;\n  font-size: 0.9em;\n}\n\n#favList {\n  overflow-y: auto;\n  max-height: calc(100% - 40px); \/* altezza regolabile *\/\n  scroll-behavior: smooth;       \/* scroll fluido *\/\n  padding: 0;\n  margin: 0;\n  list-style: none;\n}\n\n#favList li:hover {\n  color: #fff;\n}\nbody {\n  margin-right: calc(var(--fav-width, 300px) + 60px); \/* larghezza pannello preferiti + margini *\/\n  font-family: monospace;\n  font-size: 18px;   \/* prova 16\u201318 *\/\n  background: #222;\n  color: #ddd;\n  padding: 20px;\n}\ndetails {\n  margin-left: 20px;\n}\nsummary {\n  cursor: pointer;\n  list-style: none;\n  font-size: 1.1em;\n}\nsummary::before {\n  width: 20px;\n  display: inline-block;\n  content: \"+ \";\n  color: #4da3ff;\n}\n.file {\n  cursor: pointer;\n  user-select: none;\n  display: block;\n  margin-left: 40px;\n  color: #888;\n}\n\n\n\n.instructions {\n  margin: 16px;\n  padding: 12px;\n  border: 2px solid #4da3ff;\n  border-radius: 6px;\n  background: #222;\n  color: #ddd;\n}\n\n.counter-normal {\n  color: #ffffff; \/* bianco *\/\n}\n\n.counter-warning {\n  color: #ffd700; \/* giallo *\/\n}\n\n.counter-danger {\n  color: #ff4d4d; \/* rosso *\/\n}\n\n\n\/* \u2500\u2500 aggiunte 2026-11 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\n\/* + quando il ramo \u00e8 chiuso, - quando \u00e8 aperto *\/\ndetails[open] > summary::before { content: \"- \"; }\nsummary { display: flex; align-items: center; gap: 10px; }\nsummary::-webkit-details-marker { display: none; }\n.branch-name { overflow-wrap: anywhere; }\n#explorer :is(.branch-heart, .item-heart) {\n  flex: none;\n  min-width: 0; min-height: 0; width: auto; height: auto;\n  box-shadow: none; text-transform: none; letter-spacing: 0;\n  margin-left: auto;\n  background: none;\n  border: none;\n  padding: 0 6px;\n  font-size: 1.1em;\n  line-height: 1;\n  color: #777 !important;\n  cursor: pointer;\n  opacity: .55;\n  transition: color .15s, opacity .15s, transform .15s;\n}\n#explorer summary:hover .branch-heart, #explorer :is(.branch-heart, .item-heart):focus-visible { opacity: 1; }\n#explorer :is(.branch-heart, .item-heart):hover { color: #ff4d6d !important; background: none; transform: scale(1.15); }\n#explorer :is(.branch-heart, .item-heart).is-on { color: #ff4d6d !important; opacity: 1; }\n.file { display: block; }\n#favorites #favList { margin: 0; padding: 0; list-style: none; }\n#favorites #favList li { cursor: pointer; margin: 0 0 2px; padding: 4px 6px; list-style: none; }\n#favList .fav-name { color: #ddd; font-weight: bold; }\n#favList .fav-path { color: #4da3ff; font-size: .85em; }\n\n\/* divisore trascinabile (bordo sinistro del pannello preferiti) *\/\n#favorites { border-left: none; }\n#favResize {\n  position: absolute; top: 0; bottom: 0; left: 0;\n  width: 10px; margin-left: -4px;\n  cursor: col-resize; z-index: 2;\n  touch-action: none;\n}\n#favResize::after {\n  content: \"\"; position: absolute; top: 0; bottom: 0; left: 4px;\n  width: 2px; background: #4da3ff; transition: background .15s, box-shadow .15s;\n}\n#favResize:hover::after, #favResize:focus-visible::after, body.fav-resizing #favResize::after {\n  background: #7bbcff; box-shadow: 0 0 0 2px rgba(77,163,255,.35);\n}\nbody.fav-resizing { cursor: col-resize; user-select: none; }\n\n\/* titolo e pulsante istruzioni: cerchio centrato sulla riga del titolo *\/\n#header { display: flex; align-items: center; gap: 12px; }\n#header #meTitle { margin: 20px 0; line-height: 1; }\n#header #infoBtn {\n  flex: none;\n  width: 30px; height: 30px;\n  min-width: 0; min-height: 0;\n  padding: 0; margin: 0;\n  border-radius: 50%;\n  border: 2px solid #4da3ff;\n  background: none;\n  color: #4da3ff !important;\n  display: inline-flex; align-items: center; justify-content: center;\n  font: bold 16px\/1 Georgia, serif;\n  cursor: pointer;\n  box-shadow: none;\n  text-transform: none;\n  letter-spacing: 0;\n}\n#header #infoBtn:hover { background: #4da3ff; color: #111 !important; }\n\n\/* niente cornice grigia attorno al sito: la pagina usa lo sfondo del tema *\/\nbody { background: var(--sr-bg) !important; padding: 0 !important; }\n\n\/* popup istruzioni: X sempre visibile, sotto-punti rientrati *\/\n#infoBox #closeInfo {\n  background: none !important; color: #e74c3c !important; padding: 4px 10px; min-width: 0; min-height: 0;\n  border: none; border-radius: 6px; font: bold 22px\/1 sans-serif; box-shadow: none;\n}\n#infoBox #closeInfo:hover { background: #e74c3c !important; color: #fff !important; }\n#infoBox .info-sub { display: block; padding-left: 2.2em; }\n\n\/* titolo dell'elenco: le due scritte occupano lo stesso spazio, cos\u00ec \"i\" e ricerca non si spostano *\/\n#header #meTitle { display: inline-grid; white-space: nowrap; }\n#header #meTitle > span { grid-area: 1 \/ 1; }\n#header #meTitle .t-search { visibility: hidden; }\n#header #meTitle.is-search .t-full { visibility: hidden; }\n#header #meTitle.is-search .t-search { visibility: visible; }\n\n\/* ricerca *\/\n#meSearch { display: flex; align-items: center; gap: 6px; margin-left: 12px; flex: 0 1 380px; min-width: 180px; }\n#meSearch #meQuery {\n  flex: 1; min-width: 0; height: 34px; padding: 4px 10px; margin: 0;\n  background: #1a1a1a; color: #ddd; border: 2px solid #4da3ff; border-radius: 8px;\n  font: inherit; font-size: 15px; box-shadow: none;\n}\n#meSearch #meQuery::-webkit-search-cancel-button { display: none; }\n#meSearch button {\n  flex: none; width: 34px; height: 34px; min-width: 0; min-height: 0; padding: 0; margin: 0;\n  display: inline-flex; align-items: center; justify-content: center;\n  border-radius: 8px; border: 2px solid #4da3ff; background: none;\n  color: #4da3ff !important; font: bold 15px\/1 sans-serif; cursor: pointer; box-shadow: none;\n}\n#meSearch button:hover { background: #4da3ff; color: #111 !important; }\n#meSearch #meClear { border-color: #e74c3c; color: #e74c3c !important; }\n#meSearch #meClear:hover { background: #e74c3c; color: #fff !important; }\n#meSearch #meClear[hidden] { display: inline-flex; visibility: hidden; }  \/* lo spazio resta: lente e campo non si spostano *\/\n#explorer mark { background: rgba(255, 210, 0, .35); color: inherit; padding: 0 1px; border-radius: 2px; }\n\n\/* lista preferiti: filtro e numero di elementi delle cartelle *\/\n#favList .fav-filter { color: #e0a800; font-size: .85em; font-weight: bold; }\n#favList .fav-count { color: #808080; font-size: .85em; }\nhtml[data-theme=\"light\"] #favList .fav-filter { color: #a86d00; }\nhtml[data-theme=\"light\"] #favList .fav-count { color: #9a8d80; }\n\n\/* numero di file contenuti nel ramo, accanto al nome *\/\n#explorer .branch-count { color: #808080; font-size: .8em; margin-left: -2px; white-space: nowrap; }\nhtml[data-theme=\"light\"] #explorer .branch-count { color: #9a8d80; }\n\n\/* file: nome a sinistra, cuore a destra, senza sfondo *\/\n#explorer .file { display: flex; align-items: center; gap: 10px; padding: 1px 0; border-radius: 4px; }\n#explorer .file .file-name { overflow-wrap: anywhere; }\n#explorer .file:hover { background: rgba(255, 255, 255, .04); }\n#explorer details[open] > .file { color: #c8c8c8; }\n#explorer .item-heart { font-size: 1em; }\nhtml[data-theme=\"light\"] #explorer .file { color: var(--sr-muted); }\nhtml[data-theme=\"light\"] #explorer details[open] > .file { color: var(--sr-text); }\nhtml[data-theme=\"light\"] #explorer .file:hover { background: rgba(60, 40, 20, .05); }\nhtml[data-theme=\"light\"] #explorer mark { background: rgba(255, 196, 0, .45); }\nhtml[data-theme=\"light\"] #meSearch #meQuery { background: #fff; color: var(--sr-text); border-color: #1d63c4; }\nhtml[data-theme=\"light\"] #meSearch button { border-color: #1d63c4; color: #1d63c4 !important; }\nhtml[data-theme=\"light\"] #meSearch button:hover { background: #1d63c4; color: #fff !important; }\nhtml[data-theme=\"light\"] #meSearch #meClear { border-color: #c0392b; color: #c0392b !important; }\nhtml[data-theme=\"light\"] #meSearch #meClear:hover { background: #c0392b; color: #fff !important; }\n\n#explorer .me-loading { color: #888; font-style: italic; margin: 12px 20px; }\n\n\/* intestazione preferiti: titolo a sinistra, icone sempre a destra *\/\n#favorites .fav-header { justify-content: flex-start; gap: 6px; }\n#favorites .fav-header > span:first-child { margin-right: auto; white-space: nowrap; }\n#favorites .fav-header button { flex: none; margin-left: 0; }\n#favorites #favWarning { margin: 0 0 8px; }\n#favorites #favWarning.is-info { background: #2f6fb8; }\n\n\/* righe alternate della lista *\/\n#favList li.fav-even { background: #222; }\n#favList li.fav-odd { background: #333; }\n\n\/* \u2500\u2500 Modalit\u00e0 chiara del sito (stesso layout, colori del tema) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\nhtml[data-theme=\"light\"] body { background: var(--sr-bg); color: var(--sr-text); }\nhtml[data-theme=\"light\"] #header #meTitle { color: var(--sr-text); }\nhtml[data-theme=\"light\"] summary { color: var(--sr-text); }\nhtml[data-theme=\"light\"] summary::before { color: #1d63c4; }\nhtml[data-theme=\"light\"] .file { color: var(--sr-dim); }\nhtml[data-theme=\"light\"] #explorer .branch-heart { color: #8a7d70 !important; }\nhtml[data-theme=\"light\"] #explorer .branch-heart:hover,\nhtml[data-theme=\"light\"] #explorer .branch-heart.is-on { color: #d81b45 !important; }\nhtml[data-theme=\"light\"] #explorer .me-loading { color: var(--sr-dim); }\nhtml[data-theme=\"light\"] #header #infoBtn { border-color: #1d63c4; color: #1d63c4 !important; }\nhtml[data-theme=\"light\"] #header #infoBtn:hover { background: #1d63c4; color: #fff !important; }\n\nhtml[data-theme=\"light\"] #favorites { background: var(--sr-bg-2); box-shadow: 0 2px 16px rgba(60, 40, 20, .12); }\nhtml[data-theme=\"light\"] #favorites .fav-header { color: #1d63c4; }\nhtml[data-theme=\"light\"] #favorites #favOwner { background: #fff !important; color: var(--sr-text) !important; border-color: #1d63c4 !important; }\nhtml[data-theme=\"light\"] #favorites #emailFavs,\nhtml[data-theme=\"light\"] #favorites #clearFavs { background: var(--sr-bg-3); color: var(--sr-text) !important; }\nhtml[data-theme=\"light\"] #favorites #downloadFavs { color: var(--sr-text) !important; }\nhtml[data-theme=\"light\"] #favorites #emailFavs:hover { background: #2980b9; color: #fff !important; }\nhtml[data-theme=\"light\"] #favorites #clearFavs:hover { background: #e74c3c; color: #fff !important; }\nhtml[data-theme=\"light\"] #favorites #downloadFavs:hover { color: #27ae60 !important; }\nhtml[data-theme=\"light\"] #favList li.fav-even { background: #fffaf2; }\nhtml[data-theme=\"light\"] #favList li.fav-odd { background: var(--sr-bg-3); }\nhtml[data-theme=\"light\"] #favList .fav-name { color: var(--sr-text); }\nhtml[data-theme=\"light\"] #favList .fav-path { color: #1d63c4; }\nhtml[data-theme=\"light\"] .counter-normal { color: var(--sr-text); }\nhtml[data-theme=\"light\"] .counter-warning { color: #b07800; }\nhtml[data-theme=\"light\"] #favResize::after { background: #1d63c4; }\n\nhtml[data-theme=\"light\"] #infoOverlay { background: rgba(40, 30, 20, .45); }\nhtml[data-theme=\"light\"] #infoBox { background: var(--sr-bg-2); color: var(--sr-text); }\nhtml[data-theme=\"light\"] #infoBox h2 { color: var(--sr-text); }\n<\/style>\n<\/head>\n<body>\n\n<div id=\"header\" style=\"display: flex; align-items: center; gap: 8px;\">\n  <h1 id=\"meTitle\"><span class=\"t-full\">LISTA COMPLETA<\/span><span class=\"t-search\" aria-hidden=\"true\">RISULTATO RICERCA<\/span><\/h1>\n  <button id=\"infoBtn\" type=\"button\" title=\"Mostra istruzioni\" aria-label=\"Mostra istruzioni\">i<\/button>\n  <form id=\"meSearch\" role=\"search\" autocomplete=\"off\"><input type=\"search\" id=\"meQuery\" placeholder=\"Cerca nella lista\u2026\" aria-label=\"Cerca nella lista\"><button type=\"submit\" id=\"meSearchBtn\" title=\"Cerca\" aria-label=\"Cerca\"><svg aria-hidden=\"true\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\"><circle cx=\"10.5\" cy=\"10.5\" r=\"6.5\"\/><path d=\"M15.5 15.5 21 21\"\/><\/svg><\/button><button type=\"button\" id=\"meClear\" title=\"Cancella il filtro\" aria-label=\"Cancella il filtro\" hidden>X<\/button><\/form>\n<\/div>\n\n<!-- overlay istruzioni (inizialmente nascosto) -->\n<div id=\"infoOverlay\">\n  <div id=\"infoBox\">\n    <button id=\"closeInfo\" title=\"Chiudi\">X<\/button>\n    <h2>Come funziona<\/h2>\n    <p>\n      &#8211; Clicca sui nomi dei file per aggiungerli ai preferiti.<br>\n      &#8211; Clicca sul + accanto alle cartelle per espanderne il contenuto e &#8211; per chiuderlo.<br>\n      &#8211; Clicca sul &#x2661; a destra di una cartella per aggiungerla ai preferiti (con il numero di elementi tra parentesi); con una ricerca attiva vengono aggiunti invece i singoli file trovati. Di nuovo per toglierli.<br>\n      &#8211; Clicca sul &#x2661; accanto a un file (o sul suo nome) per aggiungerlo o toglierlo dai preferiti.<br>\n      &#8211; Scrivi nel campo di ricerca e premi la lente (o Invio) per filtrare la lista; la X toglie il filtro.<br>\n      &#8211; Trascina la linea blu a sinistra della lista preferiti per allargarla o stringerla.<br>\n      &#8211; La lista preferiti \u00e8 visibile a destra e pu\u00f2 essere:<br>\n      <span class=\"info-sub\">\u2192 scaricata cliccando sull&#8217;icona &#x2b07;<\/span>\n      <span class=\"info-sub\">\u2192 inviata via email cliccando sull&#8217;icona &#x2709;&#xfe0f;.<\/span>\n      &#8211; Puoi rimuovere elementi cliccando su di essi nella lista.<br>\n      &#8211; Opzionalmente puoi indicare il tuo nome che verr\u00e0 usato nel nome del file e nell&#8217;oggetto della mail.<br>\n    <\/p>\n  <\/div>\n<\/div>\n\n\n<div id=\"explorer\"><\/div>\n\n<div id=\"favorites\">\n  <div id=\"favResize\" role=\"separator\" aria-orientation=\"vertical\" tabindex=\"0\" title=\"Trascina per allargare o stringere\"><\/div>\n  <div id=\"favWarning\">\n  Limite massimo di 999 elementi nei preferiti raggiunto\n  <\/div>\n  <div class=\"fav-header\">\n    <span>lista preferiti (<span id=\"favCounter\">0<\/span>)<\/span>\n    <button id=\"downloadFavs\" title=\"download\">&#x2b07;<\/button>\n    <button id=\"emailFavs\" title=\"invia via email\">&#x2709;&#xfe0f;<\/button>\n    <button id=\"clearFavs\" title=\"Svuota lista preferiti\">X<\/button>\n  <\/div>\n\n  <!-- campo per il nome dell'utente -->\n  <div style=\"margin: 8px 0; display: flex; align-items: center; gap: 6px;\">\n    <input type=\"text\" id=\"favOwner\" placeholder=\"Il tuo nome\" style=\"flex: 1; padding: 4px 6px; border-radius: 4px; border: 1px solid #4da3ff; background: #222; color: #ddd;\">\n  <\/div>\n\n  <ul id=\"favList\"><\/ul>\n<\/div>\n\n\n<script>\n\/*\n * Media Explorer. ATTENZIONE: niente doppia e-commerciale in questo file (WordPress la trasforma\n * in entit\u00e0 HTML e lo script si rompe) e niente emoji a 4 byte (il database \u00e8 utf8mb3).\n *\/\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n\n  const DATA_URL = \"\/blog\/wp-content\/uploads\/media-explorer\/media-explorer.json?v=3e8eae8666\";\n  const MAX_FAVS = 999;          \/\/ righe massime nella lista preferiti\n  const LARGE = 1500;            \/\/ cartelle con pi\u00f9 elementi vengono disegnate a blocchi\n  const MAX_RESULTS = 2000;      \/\/ file mostrati al massimo in una ricerca\n  const MIN_QUERY = 2;\n\n  const favorites = new Set();\n  const favList = document.getElementById(\"favList\");\n  const favCounter = document.getElementById(\"favCounter\");\n  const favWarning = document.getElementById(\"favWarning\");\n  const favPanel = document.getElementById(\"favorites\");\n  const ownerInput = document.getElementById(\"favOwner\");\n  const explorer = document.getElementById(\"explorer\");\n  const titleWrap = document.getElementById(\"meTitle\");\n  const searchForm = document.getElementById(\"meSearch\");\n  const queryInput = document.getElementById(\"meQuery\");\n  const clearBtn = document.getElementById(\"meClear\");\n\n  \/* \u2500\u2500 Dati: [nome, [contenuto]] per i rami, stringa per i file \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\n  const isBranch = item => typeof item !== \"string\";\n  let ROOT = [\"\", []];\n  const nodeByPath = new Map();     \/\/ \"SERIE TV\/CONCLUSE\" -> ramo\n  const fileCount = new Map();      \/\/ ramo -> numero di file contenuti (anche nei sottorami)\n\n  function indexTree(node, path) {\n    let n = 0;\n    for (const it of node[1]) {\n      if (isBranch(it)) {\n        const p = path ? path + \"\/\" + it[0] : it[0];\n        nodeByPath.set(p, it);\n        n += indexTree(it, p);\n      } else {\n        n++;\n      }\n    }\n    fileCount.set(node, n);\n    return n;\n  }\n\n  \/*\n   * Voci della lista preferiti (stringhe, cos\u00ec come finiscono nel file scaricato e nella mail):\n   *   \"A\/B\/file.ext\"   un file\n   *   \"A\/B\/\"           una cartella intera (nella lista con il numero di elementi tra parentesi)\n   *\/\n\n  \/\/ Elementi rappresentati da una voce: 1 per un file, tutti i file contenuti per una cartella\n  function itemsOf(entry) {\n    if (!entry.endsWith(\"\/\")) return 1;\n    const node = nodeByPath.get(entry.slice(0, -1));\n    return node ? fileCount.get(node) : 0;\n  }\n\n  \/\/ Cartella della lista che contiene gi\u00e0 questa voce (o null)\n  function coveringFolder(entry) {\n    const parts = entry.replace(\/\\\/$\/, \"\").split(\"\/\");\n    for (let k = 1; k < parts.length; k++) {\n      const folder = parts.slice(0, k).join(\"\/\") + \"\/\";\n      if (favorites.has(folder)) return folder;\n    }\n    return null;\n  }\n  const inList = e => favorites.has(e) || coveringFolder(e) !== null;\n\n  \/\/ Aggiungendo una cartella, le voci che contiene diventano superflue\n  function addEntry(entry) {\n    if (entry.endsWith(\"\/\")) {\n      Array.from(favorites).forEach(f => { if (f !== entry ? f.startsWith(entry) : false) favorites.delete(f); });\n    }\n    favorites.add(entry);\n  }\n\n  \/\/ Tutti i file di una lista di elementi (anche nei sottorami), con il percorso completo\n  function collectFiles(items, base, out) {\n    for (const it of items) {\n      if (!isBranch(it)) out.push(base + it);\n      else collectFiles(it._view ? it._view : it[1], base + it[0] + \"\/\", out);\n    }\n    return out;\n  }\n\n  \/\/ Voci aggiunte dal cuore di un ramo:\n  \/\/ - senza ricerca: il ramo stesso, una sola riga;\n  \/\/ - con una ricerca attiva: i singoli file del risultato contenuti nel ramo.\n  function entriesFor(d) {\n    const base = d._path.join(\"\/\") + \"\/\";\n    if (!query) return [base];\n    return collectFiles(d._items, base, []);\n  }\n\n  \/* \u2500\u2500 Avvisi nel pannello preferiti \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\n  let noticeTimer = 0;\n  const LIMIT_MSG = \"Limite massimo di \" + MAX_FAVS + \" righe nei preferiti raggiunto\";\n  function warn(show) {\n    clearTimeout(noticeTimer);\n    favWarning.classList.remove(\"is-info\");\n    if (show) favWarning.textContent = LIMIT_MSG;\n    favWarning.style.display = show ? \"block\" : \"none\";\n  }\n  function notice(msg) {\n    favWarning.textContent = msg;\n    favWarning.classList.add(\"is-info\");\n    favWarning.style.display = \"block\";\n    clearTimeout(noticeTimer);\n    noticeTimer = setTimeout(() => warn(false), 4000);\n  }\n\n  \/\/ Rami aperti dall'utente (percorso): lista completa e risultati di ricerca li mostrano aperti allo stesso modo\n  const openPaths = new Set();\n\n  \/* \u2500\u2500 Testo con la parte cercata evidenziata \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\n  let query = \"\";\n  function labelInto(el, text) {\n    if (!query) { el.textContent = text; return; }\n    const i = text.toLowerCase().indexOf(query);\n    if (i < 0) { el.textContent = text; return; }\n    const mark = document.createElement(\"mark\");\n    mark.textContent = text.slice(i, i + query.length);\n    el.append(text.slice(0, i), mark, text.slice(i + query.length));\n  }\n\n  function makeHeart(cls, title, label, on) {\n    const h = document.createElement(\"button\");\n    h.type = \"button\";\n    h.className = cls;\n    h.title = title;\n    h.setAttribute(\"aria-label\", label);\n    setHeart(h, on);\n    return h;\n  }\n\n  function setHeart(h, on) {\n    h.textContent = on ? \"\u2665\" : \"\u2661\";\n    h.classList.toggle(\"is-on\", on);\n  }\n\n  \/* \u2500\u2500 Disegno dei rami (solo quando vengono aperti) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\n  \/\/ node = ramo vero (serve al cuore); items = cosa mostrare (tutto, o solo i risultati di ricerca)\n  \/\/ count = file contenuti (tutti, o solo quelli che corrispondono alla ricerca)\n  function makeBranch(node, path, items, count) {\n    const d = document.createElement(\"details\");\n    d._node = node;\n    d._path = path;\n    d._items = items || node[1];\n    const s = document.createElement(\"summary\");\n    const label = document.createElement(\"span\");\n    label.className = \"branch-name\";\n    labelInto(label, node[0]);\n    const num = document.createElement(\"span\");\n    num.className = \"branch-count\";\n    num.textContent = \"(\" + (count === undefined ? fileCount.get(node) : count).toString().replace(\/\\B(?=(\\d{3})+(?!\\d))\/g, \".\") + \")\";\n    s.append(label, num, makeHeart(\"branch-heart\", \"Aggiungi il ramo ai preferiti (con una ricerca attiva: i file trovati)\",\n      \"Aggiungi \" + node[0] + \" ai preferiti\", entriesFor(d).every(inList)));\n    d.appendChild(s);\n    if (openPaths.has(path.join(\"\/\"))) {\n      renderChildren(d);\n      d.open = true;\n    }\n    return d;\n  }\n\n  function makeFile(name, parentPath) {\n    const f = document.createElement(\"div\");\n    f.className = \"file\";\n    f._name = name;\n    const label = document.createElement(\"span\");\n    label.className = \"file-name\";\n    labelInto(label, name);\n    f.append(label, makeHeart(\"item-heart\", \"Aggiungi ai preferiti\", \"Aggiungi \" + name + \" ai preferiti\",\n      inList(parentPath.concat(name).join(\"\/\"))));\n    return f;\n  }\n\n  function renderChildren(d) {\n    d._rendered = true;\n    const items = d._items;\n    const appendRange = (from, to) => {\n      const frag = document.createDocumentFragment();\n      for (let i = from; i < to; i++) {\n        const it = items[i];\n        if (isBranch(it)) {\n          const p = d._path.concat(it[0]);\n          frag.appendChild(it._view ? makeBranch(it._real, p, it._view, it._count) : makeBranch(it, p));\n        } else {\n          frag.appendChild(makeFile(it, d._path));\n        }\n      }\n      d.appendChild(frag);\n    };\n    if (items.length <= LARGE) { appendRange(0, items.length); return; }\n    \/\/ cartelle enormi: primo blocco subito, il resto nei fotogrammi successivi (la pagina non si blocca)\n    let i = 0;\n    const step = () => {\n      const end = Math.min(items.length, i + LARGE);\n      appendRange(i, end);\n      i = end;\n      if (i < items.length) {\n        if (d.open) requestAnimationFrame(step);\n        else d._partial = i;            \/\/ chiusa a met\u00e0: si riprende alla riapertura\n      }\n    };\n    d._resume = () => { if (d._partial) { i = d._partial; d._partial = 0; requestAnimationFrame(step); } };\n    step();\n  }\n\n  \/\/ \"toggle\" non risale il DOM: lo ascoltiamo in fase di cattura\n  explorer.addEventListener(\"toggle\", e => {\n    const d = e.target;\n    if (d.tagName !== \"DETAILS\") return;\n    const key = d._path.join(\"\/\");\n    if (!d.open) { openPaths.delete(key); return; }\n    openPaths.add(key);\n    if (!d._rendered) renderChildren(d);\n    else if (d._resume) d._resume();\n  }, true);\n\n  function updateHearts() {\n    explorer.querySelectorAll(\".branch-heart\").forEach(h => {\n      const d = h.closest(\"details\");\n      setHeart(h, entriesFor(d).every(inList));\n    });\n    explorer.querySelectorAll(\".item-heart\").forEach(h => {\n      const f = h.parentElement;\n      setHeart(h, inList(f.parentElement._path.concat(f._name).join(\"\/\")));\n    });\n  }\n\n  \/* \u2500\u2500 Albero: completo o filtrato \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\n  \/\/ Risultato della ricerca: i rami il cui nome corrisponde (con tutto il contenuto, chiusi)\n  \/\/ e i file che corrispondono, con i rami che li contengono (aperti).\n  let found = 0;\n  function filterItems(items) {\n    const out = [];\n    const branches = [];\n    for (const it of items) {\n      if (found >= MAX_RESULTS) break;\n      if (isBranch(it)) {\n        if (it[0].toLowerCase().includes(query)) {\n          branches.push(it);\n          found++;\n        } else {\n          const sub = filterItems(it[1]);\n          if (sub.length) {\n            const view = [it[0], []];\n            view._real = it;\n            view._view = sub;\n            view._count = sub.reduce((n, x) => n + (!isBranch(x) ? 1 : x._view ? x._count : fileCount.get(x)), 0);\n            branches.push(view);\n          }\n        }\n      } else if (it.toLowerCase().includes(query)) {\n        out.push(it);\n        found++;\n      }\n    }\n    return branches.concat(out);\n  }\n\n  function renderTree() {\n    explorer.innerHTML = \"\";\n    explorer._path = [];\n    const frag = document.createDocumentFragment();\n    let items = ROOT[1];\n    if (query) {\n      found = 0;\n      items = filterItems(ROOT[1]);\n      const info = document.createElement(\"p\");\n      info.className = \"me-loading\";\n      info.textContent = !items.length ? \"Nessun risultato per \u201c\" + query + \"\u201d.\"\n        : found >= MAX_RESULTS ? \"Mostrati i primi \" + MAX_RESULTS + \" risultati: affina la ricerca per vederli tutti.\"\n        : found + (found === 1 ? \" risultato.\" : \" risultati.\");\n      frag.appendChild(info);\n    }\n    for (const it of items) {\n      if (!isBranch(it)) { frag.appendChild(makeFile(it, [])); continue; }\n      const d = it._view ? makeBranch(it._real, [it[0]], it._view, it._count) : makeBranch(it, [it[0]]);\n      frag.appendChild(d);\n    }\n    explorer.appendChild(frag);\n  }\n\n  \/* \u2500\u2500 Ricerca \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\n  function setSearching(on) {\n    titleWrap.classList.toggle(\"is-search\", on);\n    clearBtn.hidden = !on;\n  }\n\n  searchForm.addEventListener(\"submit\", e => {\n    e.preventDefault();\n    const q = queryInput.value.trim().toLowerCase();\n    if (q.length < MIN_QUERY) {\n      if (!q) { clearSearch(); return; }\n      notice(\"Scrivi almeno \" + MIN_QUERY + \" caratteri per cercare\");\n      return;\n    }\n    query = q;\n    setSearching(true);\n    renderTree();\n  });\n\n  function clearSearch() {\n    queryInput.value = \"\";\n    if (!query) { setSearching(false); return; }\n    query = \"\";\n    setSearching(false);\n    renderTree();\n  }\n  clearBtn.addEventListener(\"click\", clearSearch);\n  queryInput.addEventListener(\"keydown\", e => { if (e.key === \"Escape\") clearSearch(); });\n\n  \/* \u2500\u2500 Lista preferiti \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\n  \/\/ Il numero accanto a \"lista preferiti\" conta gli elementi (i file dentro le cartelle), non le righe\n  function updateCounter() {\n    let items = 0;\n    favorites.forEach(e => { items += itemsOf(e); });\n    const rows = favorites.size;\n    favCounter.textContent = items.toString().replace(\/\\B(?=(\\d{3})+(?!\\d))\/g, \".\");\n    favCounter.parentElement.title = items + \" elementi in \" + rows + \" righe (massimo \" + MAX_FAVS + \" righe)\";\n  }\n\n  function renderFavorites() {\n    favList.innerHTML = \"\";\n    let i = 0;\n    const frag = document.createDocumentFragment();\n    favorites.forEach(fullPath => {\n      const isFolder = fullPath.endsWith(\"\/\");\n      const parts = fullPath.replace(\/\\\/$\/, \"\").split(\"\/\");\n      const name = parts.pop();\n      const folderPath = parts.join(\"\/\");\n      const li = document.createElement(\"li\");\n      li.className = i++ % 2 === 0 ? \"fav-even\" : \"fav-odd\";\n      li.dataset.path = fullPath;\n      const nameSpan = document.createElement(\"span\");\n      nameSpan.className = \"fav-name\";\n      nameSpan.textContent = (isFolder ? String.fromCodePoint(0x1F4C1) + \" \" : \"\") + name;\n      li.appendChild(nameSpan);\n      if (isFolder) {\n        const cs = document.createElement(\"span\");\n        cs.className = \"fav-count\";\n        cs.textContent = \" (\" + itemsOf(fullPath).toString().replace(\/\\B(?=(\\d{3})+(?!\\d))\/g, \".\") + \")\";\n        li.appendChild(cs);\n      }\n      if (folderPath) {\n        const pathSpan = document.createElement(\"span\");\n        pathSpan.className = \"fav-path\";\n        pathSpan.textContent = \"  (\" + folderPath + \")\";\n        li.appendChild(pathSpan);\n      }\n      frag.appendChild(li);\n    });\n    favList.appendChild(frag);\n    favList.scrollTop = favList.scrollHeight;\n    updateCounter();\n    updateHearts();\n  }\n\n  favList.addEventListener(\"click\", e => {\n    const li = e.target.closest(\"li\");\n    if (!li) return;\n    favorites.delete(li.dataset.path);\n    warn(false);\n    renderFavorites();\n  });\n\n  \/* \u2500\u2500 Clic su cuori e file (un solo ascoltatore) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\n  function toggleFile(f) {\n    const fullPath = f.parentElement._path.concat(f._name).join(\"\/\");\n    if (favorites.has(fullPath)) {\n      favorites.delete(fullPath);\n      warn(false);\n    } else {\n      const folder = coveringFolder(fullPath);\n      if (folder) { notice(\"Gi\u00e0 incluso in: \" + folder); return; }\n      if (favorites.size >= MAX_FAVS) { warn(true); return; }\n      favorites.add(fullPath);\n    }\n    renderFavorites();\n  }\n\n  explorer.addEventListener(\"click\", e => {\n    const heart = e.target.closest(\".branch-heart\");\n    if (heart) {\n      e.preventDefault();               \/\/ il cuore non apre\/chiude il ramo\n      e.stopPropagation();\n      const d = heart.closest(\"details\");\n      const entries = entriesFor(d);\n      if (entries.every(x => favorites.has(x))) {\n        entries.forEach(x => favorites.delete(x));\n        warn(false);\n      } else {\n        const missing = entries.filter(x => !inList(x));\n        if (!missing.length) {          \/\/ tutto gi\u00e0 dentro una cartella della lista\n          notice(\"Gi\u00e0 incluso in: \" + coveringFolder(entries[0]));\n          return;\n        }\n        if (favorites.size + missing.length > MAX_FAVS) { warn(true); return; }\n        missing.forEach(addEntry);\n      }\n      renderFavorites();\n      return;\n    }\n    const file = e.target.closest(\".file\");\n    if (file) toggleFile(file);\n  });\n\n  \/* \u2500\u2500 Caricamento dati \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\n  explorer.innerHTML = '<p class=\"me-loading\">Caricamento archivio\u2026<\/p>';\n  fetch(DATA_URL, { credentials: \"same-origin\" })\n    .then(r => { if (!r.ok) throw new Error(\"HTTP \" + r.status); return r.json(); })\n    .then(root => {\n      ROOT = root;\n      indexTree(root, \"\");\n      renderTree();\n      updateCounter();\n    })\n    .catch(err => {\n      explorer.innerHTML = '<p class=\"me-loading\">Impossibile caricare l\\'archivio (' + err.message + '). Ricarica la pagina.<\/p>';\n    });\n\n  \/* \u2500\u2500 Istruzioni \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\n  const infoOverlay = document.getElementById(\"infoOverlay\");\n  document.getElementById(\"infoBtn\").addEventListener(\"click\", () => { infoOverlay.style.display = \"flex\"; });\n  document.getElementById(\"closeInfo\").addEventListener(\"click\", () => { infoOverlay.style.display = \"none\"; });\n  infoOverlay.addEventListener(\"click\", e => { if (e.target === infoOverlay) infoOverlay.style.display = \"none\"; });\n\n  \/* \u2500\u2500 Scarica \/ email \/ svuota \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\n  const owner = () => ownerInput.value.trim();\n\n  document.getElementById(\"emailFavs\").addEventListener(\"click\", () => {\n    if (favorites.size === 0) { alert(\"La lista preferiti \u00e8 vuota!\"); return; }\n    const subject = encodeURIComponent(\"Lista Preferiti di \" + owner());\n    const body = encodeURIComponent(Array.from(favorites).join(\"\\n\"));\n    window.location.href = `mailto:?bcc=manuel.montanari@gmail.com&subject=${subject}&body=${body}`;\n  });\n\n  document.getElementById(\"downloadFavs\").addEventListener(\"click\", () => {\n    const blob = new Blob([Array.from(favorites).join(\"\\n\")], { type: \"text\/plain\" });\n    const url = URL.createObjectURL(blob);\n    const a = document.createElement(\"a\");\n    const who = owner().replace(\/[^\\w\\-]+\/g, \"_\");\n    a.href = url;\n    a.download = \"lista_preferiti\" + (who ? \"_\" + who : \"\") + \".txt\";\n    a.click();\n    URL.revokeObjectURL(url);\n  });\n\n  document.getElementById(\"clearFavs\").addEventListener(\"click\", () => {\n    favorites.clear();\n    warn(false);\n    renderFavorites();\n  });\n\n  \/* \u2500\u2500 Divisore trascinabile tra elenco e preferiti \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\n  const KEY = \"mediaExplorerFavWidth\";\n  const MIN = 220;\n  const siteNav = document.querySelector(\"nav.main-navigation\");\n  const navItems = siteNav ? siteNav.querySelectorAll(\"#menu-main-navigation > li\") : [];\n  let navHeight = 0;\n  let lastGood = 0;\n\n  \/\/ Il menu del sito \u00e8 ancora su una riga? (nessuna voce va a capo e la barra non si \u00e8 alzata)\n  function navFits() {\n    if (!siteNav) return true;\n    if (siteNav.offsetHeight > navHeight + 2) return false;\n    let top = null;\n    for (const li of navItems) {\n      if (!li.offsetParent) continue;                 \/\/ menu compresso (schermi piccoli)\n      const t = li.getBoundingClientRect().top;\n      if (top === null) top = t;\n      else if (Math.abs(t - top) > 2) return false;\n    }\n    return true;\n  }\n\n  function setVar(w) { document.documentElement.style.setProperty(\"--fav-width\", w + \"px\"); }\n\n  function applyWidth(w) {\n    \/\/ a sinistra restano sempre almeno 520px per l'elenco\n    const max = Math.max(MIN, Math.min(Math.round(window.innerWidth * 0.7), window.innerWidth - 520));\n    w = Math.min(max, Math.max(MIN, Math.round(w)));\n    setVar(w);\n    \/\/ pannello troppo largo: il menu del sito andrebbe a capo; si torna all'ultima larghezza buona\n    if (!navFits()) {\n      \/\/ trascinando: si torna all'ultima larghezza buona; al caricamento si scende a passi di 20px\n      if (lastGood > MIN) { w = Math.min(w, lastGood); setVar(w); }\n      while (w > MIN) {\n        if (navFits()) break;\n        w = Math.max(MIN, w - 20);\n        setVar(w);\n      }\n    }\n    lastGood = w;\n    return w;\n  }\n\n  \/\/ altezza \"normale\" del menu: misurata con il pannello alla larghezza minima\n  setVar(MIN);\n  navHeight = siteNav ? siteNav.offsetHeight : 0;\n  lastGood = MIN;\n  let saved = parseInt(localStorage.getItem(KEY), 10);\n  saved = applyWidth(saved > 0 ? saved : 300);\n\n  const handle = document.getElementById(\"favResize\");\n  handle.addEventListener(\"pointerdown\", e => {\n    e.preventDefault();\n    handle.setPointerCapture(e.pointerId);\n    document.body.classList.add(\"fav-resizing\");\n    const rightEdge = favPanel.getBoundingClientRect().right;\n    const move = ev => { saved = applyWidth(rightEdge - ev.clientX); };\n    const up = () => {\n      handle.removeEventListener(\"pointermove\", move);\n      handle.removeEventListener(\"pointerup\", up);\n      handle.removeEventListener(\"pointercancel\", up);\n      document.body.classList.remove(\"fav-resizing\");\n      try { localStorage.setItem(KEY, saved); } catch (err) {}\n    };\n    handle.addEventListener(\"pointermove\", move);\n    handle.addEventListener(\"pointerup\", up);\n    handle.addEventListener(\"pointercancel\", up);\n  });\n  handle.addEventListener(\"keydown\", e => {\n    const cur = favPanel.getBoundingClientRect().width;\n    if (e.key === \"ArrowLeft\") saved = applyWidth(cur + 30);\n    else if (e.key === \"ArrowRight\") saved = applyWidth(cur - 30);\n    else return;\n    e.preventDefault();\n    try { localStorage.setItem(KEY, saved); } catch (err) {}\n  });\n  function remeasure() {\n    const want = saved > 0 ? saved : 300;\n    setVar(MIN);\n    navHeight = siteNav ? siteNav.offsetHeight : 0;\n    lastGood = MIN;\n    saved = applyWidth(want);\n  }\n  window.addEventListener(\"resize\", remeasure);\n  \/\/ i caratteri del sito arrivano dopo: il menu pu\u00f2 allargarsi, si rimisura\n  if (document.fonts) document.fonts.ready.then(remeasure);\n\n  renderFavorites();\n});\n<\/script>\n\n\n\n<\/body>\n<\/html>\n\n","protected":false},"excerpt":{"rendered":"<p>ARCHIVIO MEDIA E ROM LISTA COMPLETARISULTATO RICERCA i X X Come funziona &#8211; Clicca sui nomi dei file per aggiungerli ai preferiti. &#8211; Clicca sul + accanto alle cartelle per espanderne il contenuto e &#8211; per chiuderlo. &#8211; Clicca sul &#x2661; a destra di una cartella per aggiungerla ai preferiti [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"footnotes":""},"class_list":["post-3231","page","type-page","status-publish","hentry","post"],"jetpack-related-posts":[{"id":3242,"url":"https:\/\/www.manuelmontanari.com\/blog\/media-explorer_new\/","url_meta":{"origin":3231,"position":0},"title":"Media Explorer (embedded)","author":"Manuel","date":"30 January 2026","format":false,"excerpt":"","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3141,"url":"https:\/\/www.manuelmontanari.com\/blog\/retrogaming-db-explorer\/","url_meta":{"origin":3231,"position":1},"title":"Retrogaming DB Explorer","author":"Manuel","date":"20 November 2025","format":false,"excerpt":"Another visualization project: explore a Retrogaming Database filtering by title, genre, publisher, year. interacting with the list of titles selecting one updates the whole sheet, and loads the game description from the DB.","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3168,"url":"https:\/\/www.manuelmontanari.com\/blog\/lego-set-explorer\/","url_meta":{"origin":3231,"position":2},"title":"Lego Set Explorer","author":"Manuel","date":"5 January 2026","format":false,"excerpt":"This is a small project to create a single screen dashboard to filter my Lego set DB. You can filter by Theme, Year, Set Status., Set Location, Set Archive location and Set Designer, as well as Set Name. All the main KPIs are updated accordingly. Price per brick and price\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2026\/01\/lego_Sets.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2026\/01\/lego_Sets.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2026\/01\/lego_Sets.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2026\/01\/lego_Sets.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2026\/01\/lego_Sets.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2026\/01\/lego_Sets.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":3136,"url":"https:\/\/www.manuelmontanari.com\/blog\/movie-list-db-explorer\/","url_meta":{"origin":3231,"position":3},"title":"Movie Explorer","author":"Manuel","date":"20 November 2025","format":false,"excerpt":"This is a small project to create a single screen dashboard to filter a Movie DB by actors \/ character name \/ genre. If you search for a name or character name the list shows all results and the list of movies matching the filer. Selecting a single actor from\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2025\/11\/ActorDB.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2025\/11\/ActorDB.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2025\/11\/ActorDB.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2025\/11\/ActorDB.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2025\/11\/ActorDB.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":3120,"url":"https:\/\/www.manuelmontanari.com\/blog\/privacy-policy\/","url_meta":{"origin":3231,"position":4},"title":"Privacy Policy","author":"Manuel","date":"9 October 2025","format":false,"excerpt":"Who we are My name is Manuel Montanari, and my website address is: https:\/\/www.manuelmontanari.com\/blog. Comments When visitors leave comments on the site I collect the data shown in the comments form, and also the visitor\u2019s IP address and browser user agent string to help spam detection. An anonymized string created\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.manuelmontanari.com\/blog\/wp-json\/wp\/v2\/pages\/3231","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.manuelmontanari.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.manuelmontanari.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.manuelmontanari.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.manuelmontanari.com\/blog\/wp-json\/wp\/v2\/comments?post=3231"}],"version-history":[{"count":7,"href":"https:\/\/www.manuelmontanari.com\/blog\/wp-json\/wp\/v2\/pages\/3231\/revisions"}],"predecessor-version":[{"id":3240,"href":"https:\/\/www.manuelmontanari.com\/blog\/wp-json\/wp\/v2\/pages\/3231\/revisions\/3240"}],"wp:attachment":[{"href":"https:\/\/www.manuelmontanari.com\/blog\/wp-json\/wp\/v2\/media?parent=3231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}