Skip to content

Commit

Permalink
check if running inside webextension by checking extension subspace i…
Browse files Browse the repository at this point in the history
…nstead of runtime (SeleniumHQ#6582)
  • Loading branch information
corevo authored and shs96c committed Oct 26, 2018
1 parent 61aba43 commit edbc583
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion javascript/atoms/userAgent.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ bot.userAgent.WEBEXTENSION = (function() {
// The content script global object is different than it's window
// Which requires accessing the chrome and browser objects through this
try {
return !!((chrome || goog.global.browser).runtime);
return !!((goog.global.chrome || goog.global.browser)['extension']);
} catch (e) {
return false;
}
Expand Down

0 comments on commit edbc583

Please sign in to comment.