-
-
Notifications
You must be signed in to change notification settings - Fork 364
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
Added Otter Browser detection. #310
Conversation
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
lib/browser/base.rb
Outdated
@@ -179,5 +179,10 @@ def proxy? | |||
def electron?(expected_version = nil) | |||
Electron.new(ua).match? && detect_version?(full_version, expected_version) | |||
end | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing whitespace detected.
lib/browser/otter-browser.rb
Outdated
@@ -0,0 +1,21 @@ | |||
# frozen_string_literal: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing whitespace detected.
lib/browser/otter-browser.rb
Outdated
# frozen_string_literal: | ||
|
||
module Browser | ||
class OtterBrowser < Base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar code found in 8 other locations (mass = 21) (lib/browser/otter-browser.rb#4, lib/browser/alipay.rb#4, lib/browser/electron.rb#4, lib/browser/firefox.rb#4, lib/browser/micro_messenger.rb#4, lib/browser/nokia.rb#4, lib/browser/phantom_js.rb#4, lib/browser/uc_browser.rb#4, and lib/browser/weibo.rb#4)
I don't understand it… |
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
|
||
# Detect if browser is Otter Browser. | ||
def otter_browser?(expected_version = nil) | ||
OtterBrowser.new(ua).match? && detect_version?(full_version, expected_version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [84/80]
# frozen_string_literal: true | ||
|
||
module Browser | ||
class OtterBrowser < Base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar code found in 8 other locations (mass = 21) (lib/browser/otter_browser.rb#4, lib/browser/alipay.rb#4, lib/browser/electron.rb#4, lib/browser/firefox.rb#4, lib/browser/micro_messenger.rb#4, lib/browser/nokia.rb#4, lib/browser/phantom_js.rb#4, lib/browser/uc_browser.rb#4, and lib/browser/weibo.rb#4)
Ebert has finished reviewing this Pull Request and has found:
You can see more details about this review at https://ebertapp.io/github/fnando/browser/pulls/310. |
Signed-off-by: Marcin Mikołajczak me@m4sk.in