diff --git a/CHANGELOG b/CHANGELOG index 86554ff..f5642dc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +0.2.9 (2017-??-??) +========================= +- Code cleaning, global functions + 0.2.8 (2017-08-08) ========================= - Changed Firefox's minimum version to 55.0 diff --git a/README.md b/README.md index bdc87aa..b65cfd0 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,9 @@ For testing purposes, please use following unofficial KeePassXC [release's](http Get the extension for [Firefox](https://addons.mozilla.org/en-US/firefox/addon/keepassxc-browser/) or [Chrome/Chromium](https://chrome.google.com/webstore/detail/keepassxc-browser/iopaggbpplllidnfmcghoonnokmjoicf). -The extension is supported with Firefox 56.0a1 and newer. If you want to load it as a temporary plugin with Firefox 54 you can just change the minimum version from the manifest file before loading it. +The extension is supported with Firefox 55 and newer. If you want to load it as a temporary plugin with Firefox 54 you can just change the minimum version from the manifest file before loading it. + +Please thee this [wiki page](https://github.com/varjolintu/keepassxc-browser/wiki/Connecting-the-database-with-current-beta-build) for instructions how to configure this KeePassXC fork in order to connect the database correctly. ## How it works There are two methods which you can use keepassxc-browser to connect to KeePassXC: diff --git a/keepassxc-browser/background/browserAction.js b/keepassxc-browser/background/browserAction.js index 48a9951..c2f4dc7 100644 --- a/keepassxc-browser/background/browserAction.js +++ b/keepassxc-browser/background/browserAction.js @@ -1,5 +1,3 @@ -window.browser = (function () { return window.msBrowser || window.browser || window.chrome; })(); - var browserAction = {}; const BLINK_TIMEOUT_DEFAULT = 7500; diff --git a/keepassxc-browser/background/event.js b/keepassxc-browser/background/event.js index 8dcddcf..0a09842 100644 --- a/keepassxc-browser/background/event.js +++ b/keepassxc-browser/background/event.js @@ -1,5 +1,3 @@ -window.browser = (function () { return window.msBrowser || window.browser || window.chrome; })(); - var event = {}; event.onMessage = function(request, sender, callback) { diff --git a/keepassxc-browser/background/init.js b/keepassxc-browser/background/init.js index c50f71e..76be8fb 100644 --- a/keepassxc-browser/background/init.js +++ b/keepassxc-browser/background/init.js @@ -7,8 +7,6 @@ keepass.changePublicKeys(null, (pkRes) => { keepass.getDatabaseHash((gdRes) => {}, null); }); -window.browser = (function () { return window.msBrowser || window.browser || window.chrome; })(); - // Set initial tab-ID //browser.tabs.query({'active': true, 'windowId': browser.windows.WINDOW_ID_CURRENT}, (tabs) => { browser.tabs.query({"active": true, "currentWindow": true}, (tabs) => { diff --git a/keepassxc-browser/background/keepass.js b/keepassxc-browser/background/keepass.js index d72b43d..033a10a 100644 --- a/keepassxc-browser/background/keepass.js +++ b/keepassxc-browser/background/keepass.js @@ -20,8 +20,6 @@ keepass.keyRing = (typeof(localStorage.keyRing) === 'undefined') ? {} : JSON.par keepass.keyId = 'keepassxc-browser-cryptokey-name'; keepass.keyBody = 'keepassxc-browser-key'; -window.browser = (function () { return window.msBrowser || window.browser || window.chrome; })(); - const kpActions = { SET_LOGIN: 'set-login', GET_LOGINS: 'get-logins', diff --git a/keepassxc-browser/background/page.js b/keepassxc-browser/background/page.js index b761219..0063dc0 100644 --- a/keepassxc-browser/background/page.js +++ b/keepassxc-browser/background/page.js @@ -1,5 +1,3 @@ -window.browser = (function () { return window.msBrowser || window.browser || window.chrome; })(); - const defaultSettings = { checkUpdateKeePassXC: 3, autoCompleteUsernames: true, diff --git a/keepassxc-browser/keepassxc-browser.js b/keepassxc-browser/keepassxc-browser.js index 6555a60..a1927d4 100644 --- a/keepassxc-browser/keepassxc-browser.js +++ b/keepassxc-browser/keepassxc-browser.js @@ -1,10 +1,3 @@ -var isFirefox = false; -if (typeof browser !== 'undefined') { - isFirefox = true; -} - -window.browser = (function () { return window.msBrowser || window.browser || window.chrome; })(); - // Initialize autocomplete feature $(this.target).find('input').autocomplete(); @@ -804,6 +797,7 @@ cipFields.prepareId = function(id) { cipFields.getAllFields = function() { let fields = []; + // get all input fields which are text, email or password and visible jQuery(cipFields.inputQueryPattern).each(function() { if (jQuery(this).is(':visible') && jQuery(this).css('visibility') !== 'hidden' && jQuery(this).css('visibility') !== 'collapsed') { diff --git a/keepassxc-browser/manifest.json b/keepassxc-browser/manifest.json index 1c27cfe..2f03a3f 100644 --- a/keepassxc-browser/manifest.json +++ b/keepassxc-browser/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "keepassxc-browser", - "version": "0.2.8", + "version": "0.2.9", "description": "KeePassXC integration for modern web browsers", "author": "Sami Vänttinen", "icons": { @@ -24,6 +24,7 @@ }, "background": { "scripts": [ + "global.js", "background/nacl.min.js", "background/nacl-util.min.js", "background/keepass.js", @@ -41,6 +42,7 @@ "https://*/*" ], "js": [ + "global.js", "jquery-3.2.1.min.js", "jquery-ui.min.js", "keepassxc-browser.js" diff --git a/keepassxc-browser/options/options.html b/keepassxc-browser/options/options.html index d0e9d93..ad791ae 100644 --- a/keepassxc-browser/options/options.html +++ b/keepassxc-browser/options/options.html @@ -5,6 +5,7 @@ + diff --git a/keepassxc-browser/options/options.js b/keepassxc-browser/options/options.js index 64cb05b..6730b62 100644 --- a/keepassxc-browser/options/options.js +++ b/keepassxc-browser/options/options.js @@ -1,10 +1,3 @@ -var isFirefox = false; -if (typeof browser !== 'undefined') { - isFirefox = true; -} - -window.browser = (function () { return window.msBrowser || window.browser || window.chrome; })(); - if (jQuery) { var $ = jQuery.noConflict(true); } diff --git a/keepassxc-browser/popups/popup.html b/keepassxc-browser/popups/popup.html index c9af685..d341a35 100644 --- a/keepassxc-browser/popups/popup.html +++ b/keepassxc-browser/popups/popup.html @@ -4,6 +4,7 @@ + diff --git a/keepassxc-browser/popups/popup.js b/keepassxc-browser/popups/popup.js index 779baf5..3704966 100644 --- a/keepassxc-browser/popups/popup.js +++ b/keepassxc-browser/popups/popup.js @@ -1,5 +1,3 @@ -window.browser = (function () { return window.msBrowser || window.browser || window.chrome; })(); - function status_response(r) { $('#initial-state').hide(); $('#error-encountered').hide(); diff --git a/keepassxc-browser/popups/popup_functions.js b/keepassxc-browser/popups/popup_functions.js index 1b0b93e..0fc5d1c 100644 --- a/keepassxc-browser/popups/popup_functions.js +++ b/keepassxc-browser/popups/popup_functions.js @@ -1,8 +1,5 @@ -window.browser = (function () { return window.msBrowser || window.browser || window.chrome; })(); - var $ = jQuery.noConflict(true); var _settings = typeof(localStorage.settings) ==='undefined' ? {} : JSON.parse(localStorage.settings); -//var global = browser.runtime.getBackgroundPage(); function updateAvailableResponse(available) { if (available) { diff --git a/keepassxc-browser/popups/popup_httpauth.html b/keepassxc-browser/popups/popup_httpauth.html index afe2006..2c48ab6 100644 --- a/keepassxc-browser/popups/popup_httpauth.html +++ b/keepassxc-browser/popups/popup_httpauth.html @@ -4,6 +4,7 @@ + diff --git a/keepassxc-browser/popups/popup_httpauth.js b/keepassxc-browser/popups/popup_httpauth.js index aa839bf..9425fef 100644 --- a/keepassxc-browser/popups/popup_httpauth.js +++ b/keepassxc-browser/popups/popup_httpauth.js @@ -1,5 +1,3 @@ -window.browser = (function () { return window.msBrowser || window.browser || window.chrome; })(); - $(function() { browser.runtime.getBackgroundPage(function(global) { browser.tabs.query({"active": true, "currentWindow": true}, (tab) => { diff --git a/keepassxc-browser/popups/popup_login.html b/keepassxc-browser/popups/popup_login.html index 5882ce9..d2e8af8 100644 --- a/keepassxc-browser/popups/popup_login.html +++ b/keepassxc-browser/popups/popup_login.html @@ -4,6 +4,7 @@ + diff --git a/keepassxc-browser/popups/popup_login.js b/keepassxc-browser/popups/popup_login.js index 19b6d2d..389e982 100644 --- a/keepassxc-browser/popups/popup_login.js +++ b/keepassxc-browser/popups/popup_login.js @@ -1,5 +1,3 @@ -window.browser = (function () { return window.msBrowser || window.browser || window.chrome; })(); - $(function() { browser.runtime.getBackgroundPage(function(global) { browser.tabs.query({"active": true, "currentWindow": true}, (tabs) => { diff --git a/keepassxc-browser/popups/popup_multiple-fields.html b/keepassxc-browser/popups/popup_multiple-fields.html index 2b6339c..656c45b 100644 --- a/keepassxc-browser/popups/popup_multiple-fields.html +++ b/keepassxc-browser/popups/popup_multiple-fields.html @@ -4,6 +4,7 @@ + diff --git a/keepassxc-browser/popups/popup_remember.html b/keepassxc-browser/popups/popup_remember.html index 6f58a39..643a513 100644 --- a/keepassxc-browser/popups/popup_remember.html +++ b/keepassxc-browser/popups/popup_remember.html @@ -4,6 +4,7 @@ + diff --git a/keepassxc-browser/popups/popup_remember.js b/keepassxc-browser/popups/popup_remember.js index 413af3e..aac9fcb 100644 --- a/keepassxc-browser/popups/popup_remember.js +++ b/keepassxc-browser/popups/popup_remember.js @@ -1,5 +1,3 @@ -window.browser = (function () { return window.msBrowser || window.browser || window.chrome; })(); - var _tab; function _initialize(tab) {