xqcoretools 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/bin/xqcoretools +5 -3
  2. metadata +1 -1
data/bin/xqcoretools CHANGED
@@ -203,6 +203,8 @@ class XQCoreTools < Thor
203
203
 
204
204
  def self.modifyHostEvents(platform, document)
205
205
 
206
+ event = 'Windows' == platform ? 'onmousedown' : 'ontouchstart'
207
+
206
208
  nodes = document.css('a')
207
209
 
208
210
  for node in nodes do
@@ -214,8 +216,8 @@ class XQCoreTools < Thor
214
216
 
215
217
  click = ''
216
218
 
217
- if node.has_attribute?('onmousedown')
218
- click = node.get_attribute('onmousedown')
219
+ if node.has_attribute?(event)
220
+ click = node.get_attribute(event)
219
221
 
220
222
  if !click.end_with?(';')
221
223
  click += ';'
@@ -224,7 +226,7 @@ class XQCoreTools < Thor
224
226
 
225
227
  click += "'#{href}'"
226
228
 
227
- node.set_attribute('onmousedown', "XQ.Core.sendHostEvent(#{click})")
229
+ node.set_attribute(event, "XQ.Core.sendHostEvent(#{click})")
228
230
  node.remove_attribute('href')
229
231
  end
230
232
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xqcoretools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: