Skip to content

various fixes and improvements#45

Open
neuhaus wants to merge 67 commits into
inloop:gh-pagesfrom
neuhaus:main
Open

various fixes and improvements#45
neuhaus wants to merge 67 commits into
inloop:gh-pagesfrom
neuhaus:main

Conversation

@neuhaus
Copy link
Copy Markdown

@neuhaus neuhaus commented May 25, 2026

I did a cleanup removing some depencencies, updating those that are still needed and replacing the editor with something smaller.

Here is a big PR (sorry) implementing what's described in issue #44

also:

  • sql statement history list (stored in browser's localstorage), per sqlite file.
  • docker support
  • correct subquery pagination display and other open issues

neuhaus added 30 commits April 30, 2026 21:01
Table names from .sqlite files were injected as raw HTML in the select
dropdown options and the Select2 formatter. A malicious table name
containing script tags or event handlers would execute arbitrary JS.
Now uses jQuery DOM methods (.text(), .val(), createTextNode) to safely
set text content.
The WASM binary was loaded from a hardcoded absolute URL pointing to
inloop.github.io, making the app fail offline and causing forks/
self-hosted deployments to silently depend on the original hosting.
The file already exists locally at js/sql-wasm.wasm.
These three images (select2-spinner.gif, select2.png, select2x2.png)
were leftover assets from the Select2 library, never referenced
anywhere in the codebase.
These .map files added ~900 KB to the repo with no runtime benefit
for end users. They are development aids that don't need to be
committed to a static site repo.
This jQuery call targeted an element that doesn't exist in the HTML,
making it a silent no-op.
Remove hidden <img> preload trick and <link rel='image_src'> — both
are obsolete techniques superseded by the og:image meta tag that is
already present.
Added a quoteIdentifier() helper that uses SQL-standard double-quote
escaping (doubling embedded double-quotes). Applied to all four places
where table names are interpolated into SQL strings. Previously, table
names containing single quotes would break queries.
This jQuery plugin created a read-only textarea overlay on table cells
(the editor was initialized with <textarea readonly>), providing no
actual editing capability while adding complexity and event listeners.
Modernize remote DB loading to use fetch() with arrayBuffer().
Shorter, cleaner, and better error handling via .catch().
Replace == and != with === and !== in parseLimitFromQuery for
consistency with the rest of the codebase.
Add common patterns: .DS_Store, editor swap files, node_modules,
and *.map to prevent source maps from being re-committed.
neuhaus and others added 28 commits May 23, 2026 15:15
…ed to ensure pagination count updates correctly
…vironment-driven loading defaults and volume mounting
… JavaScript config files for queries containing single quotes
…it directories from the production Docker image
- History button next to Execute opens a Bootstrap Offcanvas sidebar
- Queries are stored per-database using unique key signatures
  (url:, file:, zip: prefixes)
- Deduplicates queries by moving repeats to top of list
- Max 50 entries per database
- Auto-skips empty queries and pagination COUNT(*) queries
- Each card shows timestamp, Run, Copy, and Delete actions
- Clear Active button clears current database history
- Clear All button removes history for all databases
- Clicking a query card loads and executes it
- Dark mode theming with CSS custom properties
navigator.clipboard.writeText in an inline onclick expression loses the
user-activation context in Firefox. Use a named function with a legacy
textarea/execCommand fallback.
The async navigator.clipboard API loses user-gesture context in Firefox
when the promise rejects, making the fallback also fail. Use a purely
synchronous textarea + execCommand('copy') approach with explicit focus.
Bootstrap Offcanvas uses a focus trap that immediately yanks focus back
when ta.focus() targets an element outside the offcanvas. Appending the
hidden textarea inside the sidebar element keeps it within the trap.
Execute on top, History below, each taking half the textarea height
using flex-column with flex-fill on both buttons.
@neuhaus
Copy link
Copy Markdown
Author

neuhaus commented May 25, 2026

The README now links to a live example at neuhaus.github.io, you'll probably want to change (or remove) that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant