Skip to content

Add NullTranslation parser#2794

Merged
dteviot merged 1 commit into
dteviot:ExperimentalTabModefrom
kuwoyuki:feat/NullTranslation-parser
Jul 13, 2026
Merged

Add NullTranslation parser#2794
dteviot merged 1 commit into
dteviot:ExperimentalTabModefrom
kuwoyuki:feat/NullTranslation-parser

Conversation

@kuwoyuki

@kuwoyuki kuwoyuki commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

NullTranslation parser.
it's a quite annoying to parse Next.js (App Router / RSC) site that has chapters AES-GCM encrypted.
I left in 2 chapter builder methods for now, 1st decrypts in the ext and the latter just saves it in a div to decrypt in EpubEditor

            // we do it here
            // const plaintext = await this._decryptChapterContent({
            //     encryptedData: encryptedBytes,
            //     b64Key: base64Key,
            // });
            // NullTranslationParser.renderChapterText(plaintext, newDoc);

            // ..or we save the payload for post-processing
            NullTranslationParser.embedEncryptedChapter({
                newDoc, encryptedBytes, base64Key, url,
            });

not familiar with addon store policies so lmk if the former needs to be removed.

Mutator PR here dteviot/EpubEditor#23

eslint/pack.js change is because split and join by \r was giving me an empty popup.html in the archive, I assume it has something to do with git and line endings.. I think it's safer to just normalize the line endings before splitting.

@dteviot

dteviot commented Jul 13, 2026

Copy link
Copy Markdown
Owner

@kuwoyuki

not familiar with addon store policies so lmk if the former needs to be removed.

It's OK to leave the decryption code in there, just not execute it. Basically, we're not allowed to decrypt it in the extension in the store.

@dteviot dteviot merged commit 6e4fd22 into dteviot:ExperimentalTabMode Jul 13, 2026
1 check passed
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.

2 participants