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 {
+1 -1
View File
@@ -601,7 +601,7 @@
</section>
<footer>
<p>Silent Send v0.3.0</p>
<p id="footerVersion">Silent Send</p>
</footer>
</div>
+3
View File
@@ -28,6 +28,9 @@ document.addEventListener('DOMContentLoaded', async () => {
$('#maxLogEntries').value = settings.maxLogEntries || 200;
$('#browserSync').checked = settings.browserSync === true;
const { version } = api.runtime.getManifest();
$('#footerVersion').textContent = `Silent Send v${version}`;
renderMappings();
renderPasswords();
renderDomains();