Instead of having a separate HTML and JavaScript files for each popup, use just single popup for everything and parse the content based on the page.popupData. The refactor also eliminates some duplicate code in the popup files.
The content should now change in real time according to database state (open/locked/login/default) if the popup is open.
Other minor changes:
Popup states and icon types are converted to enums.
browserAction.show() is renamed to browserAction.updatePopupIcon().
browserAction.showDefault() is renamed to browserAction.updatePopup().
TODO:
[x] Use only single popup file
[x] Change content dynamically when popup is open
[ ] There's a delay with get_status on Firefox every time the popup is opened
[ ] After connecting a new database the status does not update correctly
Instead of having a separate HTML and JavaScript files for each popup, use just single popup for everything and parse the content based on the
page.popupData
. The refactor also eliminates some duplicate code in the popup files.The content should now change in real time according to database state (open/locked/login/default) if the popup is open.
Other minor changes:
browserAction.show()
is renamed tobrowserAction.updatePopupIcon()
.browserAction.showDefault()
is renamed tobrowserAction.updatePopup()
.TODO:
get_status
on Firefox every time the popup is openedFixes #76.