This documentation explains how to build a basic Chrome Extension using Manifest V3.
The example creates a popup with a button. Clicking the button triggers an alert.
- Google Chrome (latest version)
| javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{ | |
| default: Turndown | |
| }, { | |
| default: Readability | |
| }]) => { | |
| /* Optional vault name */ | |
| const vault = ""; | |
| /* Optional folder name such as "Clippings/" */ |
| javascript:(function(){if(window.__tabRecActive){alert('Tab Recorder is already running.');return;}window.__tabRecActive=true;var css='#tab-rec-ui{position:fixed;top:12px;right:12px;z-index:2147483647;background:rgba(17,17,17,.92);color:#fff;padding:10px 12px;border-radius:10px;font:13px/1.4 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;box-shadow:0 6px 18px rgba(0,0,0,.35)}#tab-rec-ui button{background:#1f6feb;border:0;color:#fff;padding:6px 10px;border-radius:6px;cursor:pointer}#tab-rec-ui button[disabled]{opacity:.55;cursor:not-allowed}#tab-rec-ui .row{margin-top:6px}#tab-rec-ui .muted{opacity:.8;font-size:12px}';var style=document.createElement('style');style.textContent=css;document.head.appendChild(style);var ui=document.createElement('div');ui.id='tab-rec-ui';ui.innerHTML='<div style="font-weight:600;margin-bottom:6px">Tab Recorder</div><div class="row"><button id="tr-start">Start</button> <button id="tr-pause" disabled>Pause</button> <button id="tr-stop" disabled>Stop</button></di |
| // Inspired by https://twitter.com/coderitual/status/1112297299307384833 and https://tapajyoti-bose.medium.com/7-killer-one-liners-in-javascript-33db6798f5bf | |
| // Remove any duplicates from an array of primitives. | |
| const unique = [...new Set(arr)] | |
| // Sleep in async functions. Use: await sleep(2000). | |
| const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms))); | |
| // or | |
| const sleep = util.promisify(setTimeout); |
| ; Shift + Wheel for horizontal scrolling | |
| +WheelDown::WheelRight | |
| +WheelUp::WheelLeft |
| !function(){const t=document.title||"",e=document.querySelectorAll("meta"),o=document.querySelectorAll("a[href]"),n=document.querySelector('link[rel="canonical"]');let r="",a="";e.forEach((t=>{const e=t.name?.toLowerCase();"description"===e&&(r=t.content||""),"robots"===e&&(a=t.content||"")}));const s=n?.href||"",d=["<html><head><title>Link Analysis</title>","<style>body{font-family:sans-serif;margin:0 auto;max-width:1200px;padding:20px}table{border-collapse:collapse;margin:10px 0;width:100%}th,td{border:1px solid #ddd;padding:8px;text-align:left}th{background:#f5f5f5}td{max-width:400px;overflow:auto;font-size:14px}.stats{background:#f9f9f9;padding:10px;margin:10px 0}textarea{width:100%;box-sizing:border-box;font-family:monospace;font-size:12px}</style>","</head><body><h1>Page Analysis</h1>"];d.push('<div class="stats"><strong>Page Info:</strong></div>',"<table><tr><th>Property</th><th>Value</th></tr>",`<tr><td>Title</td><td>${t}</td></tr>`,`<tr><td>Description</td><td>${r}</td></tr>`,`<tr><td>Robots</td><td> |
| javascript: (() => { | |
| // Configurações e constantes | |
| const CONFIG = { | |
| BADGE_ID: "citation-tool", | |
| HOST_ID: "citation-tool-host", | |
| APP_INFO: { | |
| name: "Citation Tool", | |
| version: "v20250526", // sanitize function simplified | |
| credits: "by @magasine", | |
| }, |
| javascript:(()%3D%3E%7B!function()%7Bconst%20e%3D%7Bname%3A%22Citation%20Tool%22%2Ccredits%3A%22by%20%40magasine%22%7D%2Ct%3D%7Bid%3A%225d43e4a38323880f34a1da6e7c96ad0e%22%2Cuser%3A%22magasine%22%2Cfilename%3A%22citationTool.js%22%7D%2Co%3D%60gist-cache-%24%7B%22citation-tool%22%7D%60%2Ca%3Dwindow.trustedTypes%3F.createPolicy%3F.(%22citationToolPolicy%22%2C%7BcreateScript%3Ae%3D%3Ee%7D)%3Bfunction%20n(e)%7Bconst%20t%3Ddocument.createElement(%22script%22)%3Bt.type%3D%22text%2Fjavascript%22%3Bconst%20o%3Da%3Fa.createScript(e)%3Ae%3Bt.textContent%3Do%2Cdocument.documentElement.appendChild(t)%2Ct.remove()%7Dconst%20c%3D%60https%3A%2F%2Fgist.githubusercontent.com%2F%24%7Bt.user%7D%2F%24%7Bt.id%7D%2Fraw%2F%24%7Bt.filename%7D%60%3Bfetch(c).then((e%3D%3E%7Bif(!e.ok)throw%20new%20Error(%22Falha%20ao%20buscar%20c%C3%B3digo.%22)%3Breturn%20e.text()%7D)).then((t%3D%3Efunction(t%2Ca%3D%22remote%22)%7BlocalStorage.setItem(o%2CJSON.stringify(%7Bcode%3At%2Ctimestamp%3ADate.now()%7D))%2Cconsole.info(%60%5B%24%7Be.name%7D%5D%2 |
| javascript:(function () { | |
| var active; | |
| var magnifier; | |
| var config = { | |
| scale: 75, | |
| size: 160, | |
| image: | |
| 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAOtMSURBVHgBrL2JmuS4zQQYyK/e/42b2EkRcUDVY/vf3bKnK0spkSCOwMFDdep0F9D9z3/8jfjvfe379/nnn8/8ffqfazXfNY7a+V77XsXz/fk2gn9+8+o//3yb+efSP9fm7+jj+89zb+G2Md9/H2A/35/nmtqfNqfvnr+zv2Yb/9x/YpykjW3c5jyuZzxFOmYMddvxdQQN7/H85fr7+3m+a9N3ya+hA+r7PG1eWmroJy+f+5//7ee+f3+fAeV0QgY1fOiQpfofum9nz7OHn3vz6bY/8v/S+X2W8unh29CdfFMfKY/gbS/5//MF9eBLy/eGD/XYcmGf5PXhtTN8Hxm7r9Ad9pn2Eboj+SPtZNp7Pv/zz+efcZwWzzrsY/X5Hcsaw9D7JbggmtIeT8hC16RD2LpyIJ6fe+n5/WP1ug8UB3a16FGs5pejI50KNMTRqJ4nxuKevz/Tfl0lGF1/nqsYxHQ7mvXPr88/9zbBokJF2ko49J1/tLhG4fkbYRjdVOPnMvzXvf/5xDYevRrg4p2PUpzhHHlgnpAy0TAGUexsjKLMaff7vX42P9hvVQ1wmGgaVdOcef3Lqw9u3xLkUEY6SXNodX1GBqAy9+0XIbfRmOJjyLF/CT+3WdLesAH2lVd9an7jkZdQ76UHNbI+//yvKq+HBoweSZ/68orGGMwaJ1OPo/oa42DT0+B95ozkpt1nvE1lhMVMhQs7CF0cxbnjnRs+dXXz80+/f1IGo4hz+9MV++4BSOp5fVq8fcBhQ |
| /** | |
| * Copyright (c) 2022 hidao80 | |
| * Released under the MIT license | |
| * https://opensource.org/licenses/mit-license.php | |
| */ | |
| /* | |
| README | |
| ======== | |
| url-sticky |