Closed clemdavies closed 3 months ago
Thanks for checking in detail, seems some recent change related to js vendored stuff is related ( @guanglinn )
Probably also a duplicate to what actually was meant with #2365
I will check it tomorrow, believe this issue will be solved soon. @gsantner
Thanks, feel free to if you want to. There is no implication that you or somebody else specifically should do something.
I can check after holiday too, but guess theres a good chance somebody else took a look by that 😃
⚠️ This issue respects the following points: ⚠️
Description
I was debugging my own injected script not working anymore. I found what I believe is a bug that will break all injected scripts that use onPageLoaded() to execute their code.
Here is a snippet of the generated html file which has the first script block being my injection through the app settings, the rest is generated by the app itself.
The problem is that there is no function definition for wrapCodeBlockWords anywhere in the file, so this appears to break execution resulting in onPageLoaded never being called.
By injecting my own definition for wrapCodeBlockWords i can fix the execution cycle and ensure that onPageLoaded is called. see steps to reproduce
Steps to reproduce
insert a simple js snippet that should run in settings -> view mode -> inject head ie:
create a new empty .md file
edit the file and insert some text to generate at least one
<p>
tag in the view mode.view the .md file in Markor/Marder
note that the injected snippet does not execute. no red text.
Edit the above injected snippet to the following:
view the .md file again in Markor/Marder
the injected snippet should execute
note: I included the hack/workaround that fixes the execution above as I wanted to be sure that resolving the undefined reference would fix the issue purely inside the app. In order to find it in the first place I used the share as html to export what I assume is the same html file being viewed in the app. However I cannot guarantee that the view mode is rendering the same exported html, or that the export process is adding or removing anything. But this method of exporting could also be used to investigate the issue.
Information
Android version: 14 Device: samsung galaxy a15 5g Markor App Version: 2.12.4 Marder App Version: 2.12.5-2245
Source
F-Droid
Format / File type
Not specific
Additional info / Log