-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare Timimi for saving TiddlyWiki Classic in Chrome #44
Comments
Actually JavaScript code in |
Here's the problem: in Firefox
in Chrome patch-classic-io.js is injected, but it gets a sandboxed context and |
What if we add the code in the patch to the content-script itself - as a function? Instead of inject, we can call it as a function, right? |
Not sure, could you provide a sample code? The following seems to work:
(sorry for ugly formatting, github markup makes it a bit difficult) However, while this injecting works in extension edited locally, it doesn't seem to find the Timimi backend, so I've only succeeded with saving when activated both current Timimi extension and my local version. Any idea how can I fix this? |
You mean you want to create a local environment for testing purposes? |
Yes, that would be helpful (so that I can create PRs with more confidence) |
Actually, that worked in Firefox: I loaded Timimi extension from cloned and edited repo on local file system and it interacted with Timimi backend just like the main extension. Not sure why this is not the case in Chrome (well, in Vivaldi, I haven't tested this in Chrome yet) |
Yeah. Chrome works a little differently. You need to edit the timimi.json for it to work with chrome in testing environment. |
Here is what you have to do. |
well, this doesn't seem to be working. To be sure, I've retested in Chrome (instead of Vivaldi), but it's the same:
A message (more likely browser than native, white one with Timimi icon) appeared saying "Timimi save FAILED Error on contacting Timimi host" and the changes are not saved. I'll probably create a PR in parallel (not sure where the changes should go though: they can be used for Firefox too and it's not nice if the code is duplicated anyway, since further changes should be remembered to be put into both) |
Hi Riz, any comments on this? What do you think about merging #48 so that we can use this minimal implementation in the next release and improve it further if needed? |
Merged. Now the only thing we have to see is if it passes the chrome store's security check. |
Great, thanks! Yeah, the security check is indeed is an interesting question because such code injection may be considered "hacky". By the way, do you have any plans to de-duplicate code for Firefox and Chrome extensions? Like generate one from another, so that it is enough to introduce new changes only in one place. |
The plan is to make the code similar in both eventually. |
Hi Riz,
any news on this? What's the usual time they take to review an updated version? |
Currently, saving in Chrome doesn't work for TWC. Here's a quick note from #32, I'll expand it at some point (additional research required):
The text was updated successfully, but these errors were encountered: