xautobrowse 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e71119d67c1f7a76df4466079409be87b0980aeb6473324696bd872e9b59f37e
4
- data.tar.gz: 147b61fc5cfc2957542998d6b9e6ac4a8656f831791ad363ce3b9d2bb9c9d87d
3
+ metadata.gz: 2861a42b773f725dd7e418a4ffb07c99c7c8811f7e6057f11bbf7fe18da39ecc
4
+ data.tar.gz: 7a1c8e742e2b68d7060548dad5cc968086106e4cc7b4de779e3fad171b956ba1
5
5
  SHA512:
6
- metadata.gz: fcd0cc0b066699e3f239d79a990ffab514808327d29c176370ebfce542ea19814b72050691356cdb9fe503e3643f13cfa171a394fa0e132d86333df9c7315ce8
7
- data.tar.gz: 573e981566daa1390c90f082dc16f00b022bc24add6f2ab26cb39431431e76b188cc5466c279453b5bd8c4bd1edaea9347d7241f536596d014d017bd4944d207
6
+ metadata.gz: 9cc50365c6089abfe0f8a381b72ef46faf28226f7cb7f5fc303fafaa2a07540da3c4d3bbb74efe4f0a71baef983a57195ff32c2de1db05984f7d7a9fbca867d3
7
+ data.tar.gz: ae9ce9e6b5988f3447d14b32af294e39e57ae34ba39d79ea3cbf0d047a451246843507ef1a900c36ddc034ef67d7bc05a4c989df047b4d3f73718544aae1f9c9
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/xautobrowse.rb CHANGED
@@ -40,6 +40,7 @@ require 'clipboard'
40
40
  #require 'xdo/keyboard'
41
41
  #require 'xdo/xwindow'
42
42
  require 'sps-pub'
43
+ require 'xtabbedwindow'
43
44
  require 'universal_dom_remote'
44
45
 
45
46
 
@@ -58,7 +59,7 @@ class XAutoBrowse
58
59
 
59
60
  class Window < XTabbedWindow
60
61
 
61
- def initialize(browser=nil, new_win: true)
62
+ def initialize(browser=nil, new_win: true, scan_tabs: false)
62
63
 
63
64
  @wm = WMCtrl.instance
64
65
 
@@ -79,7 +80,7 @@ class XAutoBrowse
79
80
  puts 'a: ' + a.inspect if @debug
80
81
  r = a.reverse.find {|x| x[:title] =~ /#{browser}$/i}
81
82
  else
82
- super(browser)
83
+ super(browser, scan_tabs: scan_tabs)
83
84
  r = @window
84
85
  end
85
86
  else
@@ -126,12 +127,12 @@ class XAutoBrowse
126
127
 
127
128
 
128
129
  def initialize(browser= :firefox, new_window: true, debug: false,
129
- sps: false, clicks: {})
130
+ sps: false, clicks: {}, scan_tabs: !new_window)
130
131
 
131
132
  @browser, @debug, @sps, @clicks = browser.to_sym, debug, sps, clicks
132
133
  @new_window = new_window
133
134
 
134
- @window = Window.new(browser, new_win: new_window)
135
+ @window = Window.new(browser, new_win: new_window, scan_tabs: scan_tabs)
135
136
 
136
137
  sleep 4 if new_window
137
138
 
@@ -397,6 +398,10 @@ class XAutoBrowse
397
398
 
398
399
  end
399
400
 
401
+ def title()
402
+ @window.title
403
+ end
404
+
400
405
  def to_doc()
401
406
  copy_source(); sleep 0.5
402
407
  Nokorexi.new(Clipboard.paste).to_doc
data.tar.gz.sig CHANGED
@@ -1 +1 @@
1
- QC�%�0o��Z%6�����|O�h�����0�����x١$*��4`ҤY��� �L
1
+ }zp��2�̺�<��2]xwSᰔ1���#���|����/���d_�c�(%JV�,�_ə��h�ٜ��7:d��JG�.�-���^�� ���M��>9S�\a.�e��<8m�]N��@�WN*,C��0cI��\�ÆxB�~\7�p��}Qխ��fg����[߄ 2]"a Tc��U�%� e�e�Os���~e�{���v�� ~���ICXz����]t[��Gat��*# 9o?�RDXn��U�
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xautobrowse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file