Commit Graph

187 Commits

Author SHA1 Message Date
Michael
dd1ab415d2 Merge pull request #6 from TauNeutrino/perf-optimize-tags-7950496920454073492
 Optimize tag badge generation with for...of
2026-03-10 13:52:12 +01:00
google-labs-jules[bot]
cbbb2f4073 perf: optimize tag badge generation in ui_helpers.js
Replaced redundant Array traversal (map().join('')) with a for...of loop
to construct the tagsHtml string. This avoids allocating a new array
for each item being rendered, reducing memory pressure and improving
rendering performance for menus with many tags.

Benchmark results (100,000 iterations):
- 0 tags: 13.3ms -> 4.0ms (~70% improvement)
- 1 tag: 60.9ms -> 46.7ms (~23% improvement)
- 10 tags: 489ms -> 411ms (~16% improvement)
- 50 tags: 2286ms -> 1942ms (~15% improvement)

Co-authored-by: TauNeutrino <1600410+TauNeutrino@users.noreply.github.com>
2026-03-10 12:51:57 +00:00
Michael
1e9cde0ce0 Merge pull request #5 from TauNeutrino/remove-console-logs-2603846512127419944
🧹 [code health] remove leftover console.log statements
2026-03-10 13:40:13 +01:00
google-labs-jules[bot]
f192de5feb chore: remove leftover console.log statements
Removed informational and debug console.log statements from src/index.js, src/actions.js, and src/ui_helpers.js to improve code health and user experience. Refactored src/index.js to avoid empty blocks.

Co-authored-by: TauNeutrino <1600410+TauNeutrino@users.noreply.github.com>
2026-03-10 12:39:59 +00:00
Michael
7759491395 Merge pull request #4 from TauNeutrino/fix-xss-vulnerability-2050985831484711700
🔒 security: fix XSS vulnerabilities in UI helpers and actions
2026-03-10 13:38:12 +01:00
google-labs-jules[bot]
a2b2ec227f security: escape dynamic content in innerHTML to prevent XSS
This commit addresses several XSS vulnerabilities by ensuring that
dynamic data from external APIs (GitHub) and error messages are
properly escaped before being rendered via innerHTML.

Affected areas:
- openVersionMenu error handling and version list
- showErrorModal title and button text
- showToast message content

All changes were verified with a reproduction test case.

Co-authored-by: TauNeutrino <1600410+TauNeutrino@users.noreply.github.com>
2026-03-10 12:37:54 +00:00
Michael
7f413d58f1 Merge pull request #3 from TauNeutrino/add-github-api-header-tests-8413597786677025631
🧪 add tests for GitHub API header generation
2026-03-10 13:34:45 +01:00
google-labs-jules[bot]
c20a5fb879 🧪 [testing improvement] add unit tests for GitHub API header generation
- Added `tests/test_api.js` to verify header generation in `src/api.js`.
- Included test cases for `githubHeaders` and `apiHeaders`.
- Followed the project's existing testing pattern using Node.js `vm` module.

Co-authored-by: TauNeutrino <1600410+TauNeutrino@users.noreply.github.com>
2026-03-10 12:34:30 +00:00
Michael
adc018d4d3 Merge pull request #1 from TauNeutrino/jules-refactor-kantine-16557872688817970022
Refactor kantine.js into a Webpack module structure
2026-03-10 13:11:18 +01:00
google-labs-jules[bot]
2f08a951b4 Refactor kantine.js into modular ES6 structure
Moved `kantine.js` into a `src/` directory with multiple modularized files:
- `api.js`: All API calls and constants
- `state.js`: State management (auth, cache, theme, tags, etc.)
- `utils.js`: Helpers for UI and Date formatting
- `ui.js`: DOM manipulation logic
- `events.js`: Initial DOM event listeners and logic hooks
- `actions.js`: Data fetching actions, local processing logic
- `ui_helpers.js`: UI helper functions (rendering modals, handling DOM injections)

Updated the `build-bookmarklet.sh` to compile with Webpack via newly created `webpack.config.js`. Updated all relevant test scripts to use the new output `dist/kantine.bundle.js` and modified logic to work within Webpack scopes.

Co-authored-by: TauNeutrino <1600410+TauNeutrino@users.noreply.github.com>
2026-03-10 11:55:36 +00:00
Kantine Wrapper
86e2e51dc3 chore: update build artifacts for v1.6.11 v1.6.11 2026-03-09 14:41:56 +01:00
Kantine Wrapper
12fe759970 refactor: Separate timestamp updates for the main header and notification checks, and update the version to v1.6.11. 2026-03-09 14:41:49 +01:00
Kantine Wrapper
bb5dab64cd chore: update build artifacts for v1.6.10 v1.6.10 2026-03-09 13:23:04 +01:00
Kantine Wrapper
cbf03ea497 feat: Update to v1.6.10, refactor relative time calculation, persist last updated timestamp, and update DE language stems. 2026-03-09 13:22:55 +01:00
Kantine Wrapper
6b8ac5ca1d chore: update build artifacts for v1.6.8 v1.6.8 2026-03-06 10:01:16 +01:00
Kantine Wrapper
2964eba88b chore: dist files update 2026-03-06 10:01:09 +01:00
Kantine Wrapper
089e5375b4 chore: update build artifacts for v1.6.8 2026-03-06 09:55:54 +01:00
Kantine Wrapper
e514f42dbe feat: minify bookmarklet javascript via terser 2026-03-06 09:55:54 +01:00
Kantine Wrapper
f7a9b061ea chore: update build artifacts for v1.6.7 v1.6.7 2026-03-06 09:39:33 +01:00
Kantine Wrapper
fe75347682 chore: update dist files 2026-03-06 09:39:26 +01:00
Kantine Wrapper
5c5255058c chore: increase logo image size in the header 2026-03-06 09:38:20 +01:00
Kantine Wrapper
e16398ef74 chore: update build artifacts for v1.6.7 2026-03-06 08:54:48 +01:00
Kantine Wrapper
6a57e2716f chore: footer text erweitert 2026-03-06 08:54:33 +01:00
Kantine Wrapper
d383808f4f chore: update build artifacts for v1.6.7 2026-03-06 08:46:46 +01:00
Kantine Wrapper
498b400033 style: scale header logo to 40x40px 2026-03-06 08:46:46 +01:00
Kantine Wrapper
884a17e7d3 chore: update build artifacts for v1.6.6 v1.6.6 2026-03-06 08:41:06 +01:00
Kantine Wrapper
ad660799ec style: flatten past ordered items 2026-03-06 08:41:06 +01:00
Kantine Wrapper
a5fe50bbf0 chore: update build artifacts for v1.6.5 v1.6.5 2026-03-06 08:39:09 +01:00
Kantine Wrapper
a98faec51e chore: release v1.6.5 2026-03-06 08:39:09 +01:00
Kantine Wrapper
212bf3b015 chore: update build artifacts for v1.6.4 v1.6.4 2026-03-06 08:38:24 +01:00
Kantine Wrapper
f29ecd4b79 style: remove past ordered borders and swap header icon 2026-03-06 08:38:17 +01:00
Kantine Wrapper
1be6e44d7f chore: update build artifacts for v1.6.4 2026-03-05 16:38:09 +01:00
Kantine Wrapper
49b0ab17ac chore: refine language heuristics and dictionary 2026-03-05 16:37:55 +01:00
Kantine Wrapper
55e738a554 chore: update build artifacts for v1.6.3 v1.6.3 2026-03-05 12:47:56 +01:00
Kantine Wrapper
45adfa9d5d fix: Correct menu item text extraction from name to description and introduce a language splitting utility. 2026-03-05 12:47:51 +01:00
Kantine Wrapper
f5f6dddba3 chore: update build artifacts for v1.6.3 2026-03-05 12:43:49 +01:00
Kantine Wrapper
b06f6c3551 chore: inject temp menu logger 2026-03-05 12:43:25 +01:00
Kantine Wrapper
b66030dce5 fix: prevent heuristic split on final English-only fragment 2026-03-05 11:56:55 +01:00
Kantine Wrapper
8e7ec468d4 chore: update build artifacts for v1.6.3 2026-03-05 11:46:57 +01:00
Kantine Wrapper
8ce3ae4c92 feat: Update footer slogan, optimize footer height and container padding, and bump version to v1.6.3. 2026-03-05 11:46:51 +01:00
Kantine Wrapper
6a70a5a5e8 feat: sticky headers (v1.6.2) v1.6.2 2026-03-05 11:34:19 +01:00
Kantine Wrapper
edec109552 chore: update build artifacts for v1.6.1 v1.6.1 2026-03-04 14:46:17 +01:00
Kantine Wrapper
a7aea2ece3 chore: version bump 2026-03-04 14:46:11 +01:00
Kantine Wrapper
49dc1cc135 chore: update build artifacts for v1.6.0 v1.6.0 2026-03-04 14:45:25 +01:00
Kantine Wrapper
90f1c0ed04 feat: Add descriptive German tooltips to various UI elements for improved usability 2026-03-04 14:45:13 +01:00
Kantine Wrapper
42978c6e7e chore: update build artifacts for v1.6.0 2026-03-04 13:29:25 +01:00
Kantine Wrapper
6ad3498bcc cleanup test file 2026-03-04 13:27:13 +01:00
Kantine Wrapper
b44ecb2ccf v1.6.0: Language Filter 2026-03-04 13:26:46 +01:00
Kantine Wrapper
9e161e2907 chore: update build artifacts for v1.6.0 2026-03-04 13:11:43 +01:00
Kantine Wrapper
8b15760463 feat: Introduce language filter with DE/EN/ALL toggle for menu descriptions and update to version 1.6.0. 2026-03-04 13:11:34 +01:00