Skip to content
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

use chrome storage api & code cleanup #10

Closed
wants to merge 9 commits into from

Conversation

lleifermann
Copy link

Hey,
i recently ported this Chrome extension to Firefox. In the process i made some changes to the code and wanted to introduce them here too. You can find it here:

https://github.com/lleifermann/openhab-firefox

The PR mainly covers the following things:

  • Implement chrome storage-api
  • Tidy up code base

If you guys want, its now very easy to enable chrome sync for all saved values. This isnt enabled yet because i felt we should first discuss it here.
I also removed the unnecessary .vs folder that got merged in and tried to create a somewhat logical folder structure, to maintain the code a bit better.

I also tried to reproduce this issue: #7

I was only able to reproduce the bug in chromium, not in chrome-stable. The back button works as expected there.
My guess is that the content security policy in chromium disables the XHR requests in the loaded iframe javascript, even if you allow certain domains. If you monitor the requests made from the addon in the debugger, you can clearly see that the back button does not even trigger a request at all.
This is very weird behavior, we should investigate this issue further. Maybe its even a chromium related bug.

Before approving or merging this, please go ahead and test the changes in your chrome/chromium instance.

@lucianopeixoto
Copy link
Collaborator

Nice!

Sorry for the delay. I'll try to merge this ASAP

js/options.js Outdated
// Saves options to localStorage.

const DEFAULT_MYOPENHAB_URL = "https://home.myopenhab.org";
const DEFAULT_PATH = "basicui/app";
Copy link
Collaborator

@lucianopeixoto lucianopeixoto Jan 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be "/basicui/app"

@lucianopeixoto
Copy link
Collaborator

@lleifermann About the issue #7 : I've tried to replicate again, with chrome-stable (Version 63.0.3239.132 (Official Build) (64-bit)) both on Windows 10 and Ubuntu 10.17 I got the same problem. Back button did not work.

@lleifermann
Copy link
Author

@lucianopeixoto I just corrected the basicui path. When i tested it at the time, only chromium was affected, this seems not to be the case anymore. I'am going to look into this further this week.

@lleifermann
Copy link
Author

Any progress on this?

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