Skip to content

Latest commit

 

History

History
326 lines (249 loc) · 19.5 KB

File metadata and controls

326 lines (249 loc) · 19.5 KB

Changelog

Unreleased

4.1.1 (2026-08-12)

  • Fix a crash (TypeError: can’t access property "url", sender.tab is undefined) breaking rendering and every include:: resolution on Firefox when a file:// document is opened in a tab that isn’t yet fully registered with the extension messaging API, e.g. set as the browser’s start page (#734)

4.1.0 (2026-08-07)

  • Add a Release GitHub Actions workflow (workflow_dispatch, pass a version) that bumps the version everywhere it’s recorded (package.json, app/manifest.json, the Safari Xcode project), rolls this changelog’s "Unreleased" section into a dated one, builds and tests the extension, signs the Firefox package with addons.mozilla.org so it can be installed manually outside the store, and publishes a GitHub release with the Chrome/Opera/Firefox zips and the signed Firefox .xpi as assets

  • Remove the redundant broad file:/// entry from the manifest’s host_permissions: reading a local file with a non-AsciiDoc extension (e.g. an include:: or chart:: target like a .csv chart data file) already works through the file:/// access already granted via web_accessible_resources, so declaring it a second time in host_permissions had no effect other than showing up in the install-time permission list

  • Fix a redundant border appearing under the document title on wide screens (toc2 layout) when the document has an author or revision info

  • Fix file:// documents failing to render in Firefox with "Security Error: Content at moz-extension://…​ may not load or link to file://…​": on Firefox, the content script now fetches file:// content itself and passes it to the background script, instead of asking the background script to fetch it directly, which Firefox blocks regardless of granted permissions (Chrome keeps fetching from the background script, since fetching file:// from its content script hits a CORS error there instead)

  • Fix the same file:// Security Error breaking "Export as HTML" on Firefox: the background script now asks the content script for the source instead of fetching file:// itself

  • Fix include:: directives (and Kroki diagrams referencing a local file) failing to resolve on Firefox with the same file:// Security Error: Asciidoctor.js’s internal fetch() calls are now routed through the content script for the duration of a file:// conversion, restoring the pre-4.0 behavior — note this still requires setting both privacy.file_unique_origin and security.fileuri.strict_origin_policy to false in about:config (and restarting Firefox) to actually succeed, since Firefox isolates each file:// document into its own unique origin (https://docs.asciidoctor.org/browser-extension/firefox-known-issues/, #302)

  • Fix a file:// document failing to reload (TypeError: Failed to fetch, or on Chrome "'file:' URLs are treated as unique security origins") after clicking an in-page anchor link (e.g. a ToC entry): the tab’s URL keeps the #fragment from the anchor, which fetch() doesn’t strip for file:// the way it does for http(s); the fragment is now stripped before fetching, and before computing the docfile/docname attributes and the auto-reload cache key

  • Add a Privacy Policy page to the documentation, explaining what each browser permission is used for and confirming no data is collected, sold, or sent to third parties (except diagram source text, when the diagrams extension is explicitly enabled) (docs/modules/ROOT/pages/privacy.adoc)

  • Build a dedicated Opera package that excludes changelog.adoc and README.adoc, since Opera’s add-on validator rejects the whole package over the unrecognized .adoc file type

  • Remove the fontawesome-webfont.ttf and fontawesome-webfont.woff entries from the manifest’s web_accessible_resources: only the .woff2 file is actually bundled, and the Edge Add-ons validator rejects the package when a listed resource doesn’t exist in the archive

  • Remove the downloads permission: "Export as HTML" now triggers the download through a hidden <a download> link injected into the page instead of chrome.downloads.download(), which also makes the feature available on Safari and Firefox for Android, where the downloads API doesn’t exist (#722)

  • Fix a Chrome console error ("Denying load of …​/fontawesome-webfont.woff…​ Resources must be listed in the web_accessible_resources manifest key") on every page: the vendored Font Awesome stylesheet still declared @font-face fallbacks (.eot, .woff, .ttf, .svg) for font files that were dropped from the extension a decade ago, so the browser kept trying to load them; the build now rewrites the stylesheet to only reference the bundled .woff2 file

4.0.0 (2026-08-06)

  • Require Node.js 24 or greater

  • Convert build tasks to ES modules (use fetch instead of https, top-level await, import.meta.dirname)

  • Replace ESLint and Standard with Biome for linting and formatting

  • Replace Puppeteer and Mocha/Chai with Playwright for browser tests

  • Rename lint:firefox npm script to validate:firefox

  • Mark changelog.adoc with a merge=union git attribute, so parallel branches that each append an entry to the "Unreleased" section merge automatically instead of conflicting

  • Remove Bulma and Sass, replace the generated options page stylesheet with a small hand-written CSS file

  • Restructure contrib/samples into a single coherent multi-chapter sample book instead of a set of disconnected syntax snippets

  • Modernize navigation.js, add new restore-scroll-position.js and toc-scrollspy.js examples, and move all three from contrib into the Antora documentation as downloadable examples of the JavaScript "before"/"after" load hooks

  • Fix custom JavaScript being blocked on pages with a strict Content-Security-Policy: run it in the page’s main world via chrome.scripting.executeScript, loaded from a Blob URL script src, instead of appending an inline <script> from the content script

  • Prevent a flash of unstyled/light content while the document is being fetched and converted: hide the page at document_start (matching the reader’s OS-level dark/light preference) and reveal it once rendering finishes

  • Add a "Remove" button next to the JavaScript dropdown in the options page, to delete a previously added custom script, and fix the existing theme "Remove" button to also clear the entry from browser.storage.local (it was only clearing localStorage, leaking the stylesheet content indefinitely)

  • Make the default asciidoctor theme dark-mode compatible, matching the reader’s OS-level prefers-color-scheme: dark syntax highlighting (atom-one-dark, when the github highlight theme is in use), fix table row striping and admonition icon colors that a specificity conflict in the base theme had left unstyled or too dark, and restyle inline Kroki <svg> diagrams (filter: invert(1) hue-rotate(180deg)) for documents that opt in with :kroki-default-options: inline (requires an asciidoctor-kroki version with the browser toDataUri fix)

  • Fix removing a custom theme not reliably restoring the default asciidoctor theme (even after a refresh): the reset relied on a debounced autosave that could be skipped or lost, so save it immediately instead

  • Render the author(s) and revision info (number, date, remark) in a #header block above the table of contents, matching Asciidoctor’s standalone output, since the embeddable output the extension uses never included them, with a small margin below it so the preamble isn’t flush against the title/details (#460)

  • Add support for the :favicon: document attribute (#688)

  • Fix the "Render selection" context menu action, which was broken in several ways: inject.html referenced JavaScript files that no longer exist (namespace.js, converter.js, renderer.js, leftovers from before the switch to ES modules) and loaded inject.js as a classic script even though it uses import; the context menu handler used tabs.executeScript and extension.getViews, both removed in Manifest V3; and applying the theme CSS failed too because chrome.scripting can’t target the extension’s own pages — CSS is now applied directly to the document in that case, and a configured custom JavaScript is skipped there since there’s no CSP-compliant way to run it on an extension page (#113)

  • Merge module/fetch.js into module/converter.js, its only caller

  • Fix auto-reload rebuilding the whole page on every poll tick even when the fetched content hadn’t changed, which reset the page and dropped any in-progress text selection (most noticeable in the plain-text rendering, where selecting/copying the source is the whole point); skip the DOM update when the content is unchanged

  • Fix a custom theme being silently shadowed by a built-in theme of the same name (e.g. a user-uploaded asciidoctor.css): a custom theme now takes precedence over a built-in one when both share a name (#304)

  • Stop polling for changes while the tab is hidden, so a backgrounded tab doesn’t keep fetching and converting the document on every tick (#232)

  • Add a keyboard shortcut (Alt+Shift+R by default, configurable at browser://extensions/shortcuts) to toggle between the rendered and raw view (#186)

  • Behavior change: only .adoc and .asciidoc files are rendered by default now; .ad and .asc join .txt as opt-in extensions, each with their own checkbox on the options page (#677)

  • Fix the bottom padding being too tight when a document has footnotes: the base stylesheet zeroes it out to avoid double-spacing before #footer, but the extension’s embeddable output never renders a #footer (#120)

  • Open the quickstart guide in a new tab the first time the extension is installed (#528)

  • Fix the quickstart guide reopening every time the extension is turned off and back on in Safari’s Extensions preferences: Safari fires runtime.onInstalled with reason install on every re-enable there, not just on a true first install, so guard it with a persisted flag instead of trusting the reason alone

  • Fix the on/off toolbar toggle getting stuck once the background script has been restarted since the last click (e.g. after the browser reclaims an idle MV3 background context, which Safari does aggressively): the toggle tracked its enabled/disabled status in a module-level variable that silently reset on every restart instead of reading it back from storage.local, so a click could flip the wrong way without any error

  • Document that local file:// documents aren’t supported in Safari, a platform limitation with no current workaround (docs/modules/ROOT/pages/safari-known-issues.adoc)

  • Add a Safari app extension Xcode project (safari/) that references app/ directly instead of a duplicated copy, so the same source builds the Chrome, Firefox, and Safari packages; bundle background.js (an ES module) into a self-contained script and load it via background.scripts rather than background.service_worker (Safari’s MV3 service worker mode can silently fail to start at all), and generate a Safari-specific manifest that drops the extension_ids key and file:// match pattern from web_accessible_resources, both of which Safari rejects outright, taking every listed resource down with them (including the on/off toolbar icons)

  • Fix Asciidoctor WARNING messages (e.g. an unterminated block) showing up as errors in the browser console: they’re now logged with console.warn, reserving console.error for actual ERROR/FATAL messages

  • Add an "Export as HTML" feature (right-click menu on a rendered page, or the Alt+Shift+E keyboard shortcut) that saves the document as a standalone HTML file, matching what asciidoctor file.adoc -o file.html would produce; not available where the downloads API is missing (Safari, Firefox for Android) (#148)

3.0.0 (2025-05-03)

  • Migrate to manifest v3 — include won’t work anymore!

  • Migrate documentation to Antora: https://docs.asciidoctor.org/browser-extension/

  • Reorganize use-cases to separate page, try-it-yourself to a quickstart page, diagrams try-it-yourself to a diagrams quickstart page (#652) (#654)

2.7.1 (2023-06-03)

  • Add accept header when fetching AsciiDoc content (mainly to workaround an issue on github.com)

  • Update dependencies

2.7.0 (2021-02-17)

  • Fix MathJax equation numbering (#412)

  • Upgrade Asciidoctor.js from 2.2.0 to 2.2.1

    • Based on Asciidoctor 2.0.12!

  • Upgrade Asciidoctor Kroki from 0.8.2 to 0.12.0

    • Add excalidraw, bpmn and bytefield as a supported diagrams

    • Global configuration using kroki-default-format and kroki-default-options attributes

  • Upgrade bulma from 0.8.2 to 0.9.1

  • Update development dependencies

    • Bump addons-linter from 1.25.0 to 2.18.0

    • Bump puppeteer from 3.3.0 to 7.1.0

    • Bump lodash from 4.17.15 to 4.17.19

    • Bump archiver from 4.0.1 to 5.2.0

    • Bump mocha from 8.0.1 to 8.3.0

    • Bump sinon from 9.0.2 to 9.2.4

    • Bump bl from 1.2.2 to 1.2.3

    • Bump csso from 4.0.3 to 4.2.0

    • Bump standard from 14.3.4 to 16.0.3

    • Bump node-sass from 4.14.1 to 5.0.0

    • Bump eslint from 6.8.0 to 7.20.0

    • Bump chai from 4.2.0 to 4.3.0

2.6.1 (2020-06-16)

  • Do not add the toc2 class if the document has no section - thanks @mnrvwl

  • Stop auto reload when the extension has been disabled - thanks @mnrvwl

  • Remove the deprecated options_page - thanks @mnrvwl

  • Upgrade Asciidoctor.js from 2.1.1 to 2.2.0

  • Upgrade Asciidoctor Kroki from 0.7.0 to 0.8.1

  • Support sidebar toc

  • Compatibility with Firefox, use the same codebase again!

  • Remove chartist sourcemap reference

  • Update development dependencies

    • Bump mocha from 7.1.1 to 8.0.1

    • Bump puppeteer from 2.1.1 to 3.3.0

    • Bump standard from 14.3.3 to 14.3.4

    • Bump node-sass from 4.14.0 to 4.14.1

    • Bump archiver from 3.1.1 to 4.0.1

    • Bump addons-linter from 1.23.0 to 1.25.0

2.5.0 (Chrome)

  • Upgrade Asciidoctor.js from 2.0.3 to 2.1.1

  • Show errors thrown by the background script on the page (thanks @doub)

  • Catch exceptions thrown by the initial XMLHttpRequest

  • Use the Cache-Control header to make sure that we fetch the latest version available

  • Upgrade Asciidoctor Kroki from 0.4.0 to 0.7.0 with new diagrams: packetdiag, rackdiag, vega and vegalite

  • Upgrade chartist from 0.11.0 to 0.11.4

  • Upgrade bulma from 0.7.5 to 0.8.2

  • Update development dependencies

    • Bump eslint from 5.16.0 to 6.8.0

    • Bump sinon from 8.1.1 to 9.0.2

    • Bump browserify from 16.2.3 to 16.5.1

    • Bump uglify-js from 3.5.9 to 3.8.1

    • Bump archiver from 3.0.0 to 3.1.1

    • Bump csso from 3.5.1 to 4.0.3

    • Bump mocha from 7.0.1 to 7.1.1

    • Bump puppeteer from 1.20.0 to 2.1.1

    • Bump standard.js to 14.3.3

  • Use GitHub Actions

2.4.1 (Firefox)

Publish a new version with the same content as 2.3.1.

2.4.0

  • Move the fetch and convert functions in the background script (as the latest version of Chrome 80+ blocks XMLHttpRequest sent by the content script)

  • Upgrade to MathJax 3.0.1

⚠️ This version contains a major issue on Firefox and has been unpublished from the addons.mozilla.org.

2.3.1

  • Fix Kroki on Firefox (thanks @mbeckerle)

  • Set display block on stemblock

2.3.0

  • Upgrade to MathJax 3.0.0 (thanks @sindzicat)

  • Use server-side syntax highlighting (thanks @john-cj)

  • Upgrade addons-linter (Firefox) to 1.15.0

  • Upgrade Puppeteer to 1.20.0

  • Bump eslint-utils from 1.3.1 to 1.4.2

2.2.1

2.2.0

  • Fix inter-document cross references by using .adoc as outfilesuffix (thanks @jmini)

  • Disable the diagram extension by default (can be enabled in options page)

  • The Kroki server URL can now be configured in the options page (for instance, you can point to a local instance)

2.1.0

  • Set built-in attributes docfile, docname and docfilesuffix (thanks @utopalex & @ehmkah)

  • Use Kroki extension to render diagrams (support BlockDiag, SeqDiag, ActDiag, NwDiag, C4, Ditaa, Erd, GraphViz, Mermaid, Nomnoml, PlantUML, SvgBob and UMLet diagrams!)

2.0.0

  • Load additional languages for highlight.js (using :highlightjs-languages: attribute)

  • Upgrade to Asciidoctor.js 2.0.3

  • The default safe mode is now safe (was secure)

1.5.9.100

  • Add more languages to highlight.js (dockerfile, elm, golo, gradle, haskell, handlebars, kotlin, rust, swift, yaml, typescript)

  • Upgrade chartist to 0.11.0

  • Use the new Asciidoctor logo

  • Upgrade to Asciidoctor.js 1.5.9

1.5.6.100

  • Add <meta name="viewport"> to the rendered HTML (thanks @mattpalermo)

  • Remove JQuery dependency

  • Use ECMAScript 6 features to improve the code readability and structure

  • Us the stylesheet query string to configure the stylesheet per document ?stylesheet=github

  • Upgrade to Asciidoctor.js 1.5.6

  • Allow to configure the polling to remote and local files

  • Don’t show document title when noheader attribute is set (thanks @mojavelinux)

  • Use highlight.js as the default source-highlighter

  • Add PlantUML extension to render diagram

  • Load MathJax only when stem attribute is defined

  • Improve the performance on the first rendering

  • Improve the performance when enabling/disabling the extension

  • Redesign the options page using Bulma

  • Add the Mozilla addons linter in the build process

1.5.5.112

  • Use the browser namespace

  • Use correct config for MathJax (thanks @mojavelinux)

  • Add missing images for golo, riak, maker and github themes (thanks @puffybsd)

1.5.5.111

  • Add condition for unsupported API on Firefox Mobile

1.5.5.110

  • Upgrade Chartist to 0.8.3

  • Upgrade MathJax to 2.7.2

  • Remove fragment identifier from outfilesuffix (thanks @oncletom)

  • Fix timezone regexp to handle numeric and non-latin timezones (thanks @guziks, @stayfool, @tequlia2pop, @noah538 & @jfstn)

1.5.5.101

  • Updating a custom .css or .js file is not automatically saved

1.5.5.100

  • Asciidoctor.js 1.5.5-4

  • Highlight.js 9.9.0

  • Font Awesome 4.7.0

  • Options page now save changes automatically

1.5.4.111

  • Fix custom attributes parsing on the options page

1.5.4.110

  • Upgrade Font Awesome to 4.6.3

  • Decode entities in document title (Thanks @ismail & @mojavelinux)

  • MathJax is now working on remote files (Thanks @kindlychung)

  • Add missing images from Riak theme (Thanks @ssebastianj)

1.5.4.100

  • Asciidoctor 1.5.4

  • Font Awesome 4.5.0

  • MathJax 2.6.0

1.5.2.120

  • Chart extension

    Line chart
    [chart,line]
    ....
    January,February,March
    28,48,40
    65,59,80
    ....
  • Emoji extension

    Large heart emoji
    emoji:heart[lg]
  • Allow attributes to be defined via URL parameters

    Set TOC placement to preamble

    ?toc=preamble

  • Add tip about enabling local file access to options page

1.5.2.111

  • Support embedded videos

  • Fix enable/disable on local files

  • Font Awesome 4.3.0

1.5.2.100

  • Asciidoctor 1.5.2

  • Support :max-width: attribute

  • Offline mode

  • .txt files extension (configurable)

1.5.1.100

  • Asciidoctor 1.5.1

  • Fade navigation to enable sections as slides (contrib)

1.5.0.100

  • Asciidoctor 1.5.0 !

  • New stylesheet with Open Source Fonts

  • Better print styles

  • Font Awesome 4.1

  • MathJax support

  • Allow custom Javacript and Stylesheet

0.4.0

  • Upgrade to Asciidoctor 1.5.0-preview.8

  • Activate includes!

  • Render selection

  • Match URLs that contain a query string

0.3.0

  • Upgrade to Asciidoctor 1.5.0.preview.1

  • Add integration with Font Awesome 3.2.1

0.2.5

  • Add configuration option for specifying custom attributes

  • Allow to change the theme of AsciiDoc HTML output

0.2.4

  • Add highlight.js for syntax highlighting

  • Add context menu to send the "browser content" to the Asciidoctor Editor

0.2.3

  • Auto reload, you don’t need to refresh your browser anymore!

  • Shiny icon in chrome://extensions/

  • Support .asc file extension (thanks @mojavelinux)