Fix footer version, improve PDF filter detection

- options.html/js: Footer version now reads dynamically from manifest via
  api.runtime.getManifest().version instead of hardcoded v0.3.0
- document-scanner.js: Increase FlateDecode lookback from 200 to 500 bytes
  (real PDF stream dictionaries are often larger than 200 bytes), and support
  array form /Filter [/FlateDecode] alongside the scalar form

https://claude.ai/code/session_01ReZUeR1nrYzJeX7fTqwXMw
This commit is contained in:
Claude
2026-03-29 21:32:49 +00:00
parent 4b494b5eab
commit bcce37483e
3 changed files with 6 additions and 3 deletions
+2 -2
View File
@@ -257,8 +257,8 @@ const DocumentScanner = {
// Try to decompress if FlateDecode
let content = streamData;
const filterMatch = str.slice(Math.max(0, match.index - 200), match.index)
.match(/\/Filter\s*\/FlateDecode/);
const dictSlice = str.slice(Math.max(0, match.index - 500), match.index);
const filterMatch = dictSlice.match(/\/Filter\s*(?:\/FlateDecode|\[\/FlateDecode\]|\[.*?\/FlateDecode.*?\])/);
if (filterMatch) {
try {