Closed Naanaa28 closed 1 year ago
@Naanaa28
In future, might I suggest you learn how to do search/replace with a tool such as Calibre?
That said, the following script should solve both issues you mention (Follow steps as before, but put this in the window on the right.)
let decryptTable = new Map();
let crypt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
let clear = "rhbndjzvqkiexcwsfpogytumalVUQXWSAZKBJNTLEDGIRHCPFOMY";
for(let i = 0; i < crypt.length; ++i) {
decryptTable.set(crypt[i], clear[i]);
}
let decryptChar = c => decryptTable.get(c) ?? c;
let decryptString = cypherText => cypherText.split("").map(c => decryptChar(c)).join("");
for(let e of dom.querySelectorAll(".jmbl-disclaimer")) {
e.remove();
}
for(let e of dom.querySelectorAll("span.jmbl")) {
e.innerHTML = decryptString(e.textContent);
}
return true;
Note, I tested this with chapter 1 of https://secondlifetranslations.com/novel/after-transmigration-the-yanderes-kiss-extends-my-life/. And have confirmed it removes the warning message. I can't guarantee it removes the &nsbp; as this chapter did not have that problem. However, if it doesn't work, please send me the URL of chapter with problem and I'll take another look.
For my notes: 26 minutes work.
Sorry ^^; call me stupid but for some reason I thought Calibre was a paid-only software I have no idea why I never saw the free version.
Anyway this worked like a charm, thank you! But the one you referenced before from https://github.com/dteviot/WebToEpub/issues/683 did not remove the watermarks so I guess this is the updated version. Just letting you know. ^w^
@Naanaa28 Yes, it's an updated version of the script. And thanks for letting me know it works.
@Naanaa28
Thanks to gamebeaker, EpubEditor is now available at https://dteviot.github.io/EpubEditor/, no need to download, unpack, etc.
Duplicate. See: https://github.com/dteviot/WebToEpub/issues/1043 for fix.
Originally posted by @dteviot in https://github.com/dteviot/WebToEpub/issues/1124#issuecomment-1828720608
Hello! I did as instructed and the gibberish was indeed unscambled but the watermark isn't removed and there is also a &nsbp at the end of every de-scrambled paragraph.