Skip to content

Instantly share code, notes, and snippets.

View Wilman-es's full-sized avatar

Wilman Wilman-es

View GitHub Profile
javascript:!function(){if("undefined"==typeof XLSX){var e=document.createElement("script");e.type="text/javascript",e.src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.17.5/xlsx.full.min.js",document.head.appendChild(e),e.onload=function(){t()}}else t();function t(){var e=[],t=document.querySelectorAll(".clamp-word"),n="",o=[".com",".es","es/",".com/","html","="];t.forEach(function(t){var a=t.textContent.trim().replace(/\s+/g," ");o.some(function(e){return a.includes(e)})||a===n||a.includes("-")||a.includes("/")||(e.push(a),n=a)});document.querySelectorAll(".data-table tbody tr").forEach(function(e){e.insertAdjacentHTML("beforeend",'<td class="no-border-right table-cell-number text-right" colspan="1" style="width: 40px;">&nbsp;</td>')});var a=document.createElement("ul");e.forEach(function(e){var t=document.createElement("li");t.textContent=e,a.appendChild(t)});var l=document.createElement("button");l.textContent="Descargar Excel",l.style.marginBottom="10px",l.addEventListener("click",function(){var t,n,o;t=
@Wilman-es
Wilman-es / Bookmarklet-Extract-schema.js
Created February 1, 2024 17:13
Bookmarklet Extract schema
javascript:(()=>{function e(){var e=document.querySelectorAll('script[type="application/ld+json"]'),n=[];e.length>0?(e.forEach(function(e,t){try{var l=JSON.parse(e.textContent);!function e(t){if(t&&"object"==typeof t&&t["@type"])for(var l in n.push(t["@type"]),t)null!==t[l]&&"object"==typeof t[l]&&e(t[l])}(l)}catch(o){console.error("Error parsing JSON-LD block "+(t+1)+":",o)}}),n.length>0?t(n):alert("No se encontraron tipos (@type) en los bloques JSON-LD v\xe1lidos en la p\xe1gina.")):alert("No se encontraron bloques JSON-LD en la p\xe1gina.")}function t(e){var t=document.createElement("div");t.style.position="fixed",t.style.top="50%",t.style.left="50%",t.style.width="400px",t.style.height="350px",t.style.background="#000",t.style.color="#00ff00",t.style.fontSize="140%",t.style.border="1px solid #00ff00",t.style.overflow="auto",t.style.zIndex="9999",t.style.marginTop="-100px",t.style.marginLeft="-150px",t.style.textAlign="center";var n=document.createElement("div");n.style.fontWeight="bold",n.style.padding="1