Skip to content

Commit

Permalink
Fix issue with running on Chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
peter.hornak committed May 12, 2020
1 parent 409f3dd commit e0c1142
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 1 addition & 5 deletions common/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,5 @@
* Check if we are running in Firefox or not
*/
function running_in_firefox() {
if ((typeof browser) !== "undefined") {
return true;
} else {
return false;
}
return navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
}
5 changes: 4 additions & 1 deletion common/levels.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

// levels of protection
if ((typeof browser) === "undefined") {
var browser = chrome;
}

// levels of protection
var level_0 = {
"level_id": "0",
"level_text": "Built-in 0",
Expand Down
2 changes: 1 addition & 1 deletion common/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//

// set browser var as chrome
if ((typeof browser) !== "undefined") {
if ((typeof browser) === "undefined") {
var browser = chrome;
}

Expand Down

0 comments on commit e0c1142

Please sign in to comment.