xqcoretools 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/xqcoretools +5 -3
- 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?(
|
218
|
-
click = node.get_attribute(
|
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(
|
229
|
+
node.set_attribute(event, "XQ.Core.sendHostEvent(#{click})")
|
228
230
|
node.remove_attribute('href')
|
229
231
|
end
|
230
232
|
end
|