File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 1+ require 'dependencies'
2+
13class Helper
2- def initialize ( window )
3- @navigator = window . navigator
4- end
4+ @@navigator = $window. navigator
55
6- def ios?
7- @navigator . user_agent &.match? ( /\b (iPad|iPhone|iPod)\b / )
6+ def self . ios?
7+ @@ navigator . user_agent &.match? ( /\b (iPad|iPhone|iPod)\b / )
88 end
99
10- def macos?
11- @navigator . user_agent &.match? ( /\b Mac\b / )
10+ def self . macos?
11+ @@ navigator . user_agent &.match? ( /\b Mac\b / )
1212 end
1313end
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ def initialize
3333 @current_item = nil
3434 @current_copycode = nil
3535 @updating = false
36- @helper = Helper . new ( $window)
36+ # @helper = Helper.new($window)
3737
3838 initialize_menu
3939
@@ -63,7 +63,7 @@ def initialize
6363
6464 #If hold down the control and the Enter key goes down, run
6565 $document. on :keydown , '#editor' do |e |
66- if e . key == "Enter" && ( ( e . ctrl? && !@helper . ios? ) || ( ( @helper . macos? || @helper . ios? ) && e . meta? ) )
66+ if ( e . key == "Enter" && ( e . ctrl? && !Helper . ios? ) ) || ( ( Helper . macos? || Helper . ios? ) && e . meta? )
6767 e . prevent
6868 do_run
6969 end
You can’t perform that action at this time.
0 commit comments