locatine 0.01971 → 0.02007
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/locatine/app/content.css +5 -2
- data/lib/locatine/app/content.js +20 -0
- data/lib/locatine/app/manifest.json +1 -1
- data/lib/locatine/for_search/helpers.rb +5 -9
- data/lib/locatine/for_search/public.rb +2 -2
- data/lib/locatine/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d489c3b40e3742d4a0133a1280587c338879b7c
|
4
|
+
data.tar.gz: 3347799276e7b897802781ce57cfc1d480c61b77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 794115b0c100ed8724bce73059ec80c8b39e2d91022ce4a0710838e976faba02be568096477c6b3482a0b591d0cdda90e7a09c3ad15b41b0323286ebd271ea24
|
7
|
+
data.tar.gz: 457935ca593e60dd278cfd18c8aad043f366c7fb8f79197139ddcea79d1cd196b78f2063e7e8f9be0455693568d6a787a7b9ada4e1aa28ce320de739194bdb63
|
data/README.md
CHANGED
@@ -16,7 +16,7 @@ That's it.
|
|
16
16
|
|
17
17
|
## Stage of development:
|
18
18
|
|
19
|
-
Version of Locatine is **0.
|
19
|
+
Version of Locatine is **0.02007** only. It means so far this is an alfa. You can use it in a real project if you are a risky person.
|
20
20
|
|
21
21
|
## Installation
|
22
22
|
|
@@ -51,8 +51,8 @@ s.find(name: "element", scope: "Main").click
|
|
51
51
|
$ LEARN=1 ruby path_to_your_test.rb
|
52
52
|
|
53
53
|
4. It will open the browser and transfer you to the yourpage.com.com
|
54
|
-
5.
|
55
|
-
6.
|
54
|
+
5. Click Locatine application icon at the browser panel
|
55
|
+
6. Select element to represent *element* in the *Main* scope (you can click on it or select it in devtools)
|
56
56
|
7. And confirm the selection
|
57
57
|
|
58
58
|
![U can see an image here. On github)](readme/567.png)
|
@@ -14,12 +14,15 @@ div[locatinestyle=true] {
|
|
14
14
|
top:0;
|
15
15
|
left:0;
|
16
16
|
opacity: 0;
|
17
|
-
background:
|
17
|
+
background-color:rgba(0, 0, 0, 0.5);
|
18
18
|
height: 100%;
|
19
19
|
width: 100%;
|
20
|
-
pointer-events: visible;
|
21
20
|
display: block;
|
22
21
|
z-index: 2147483646;
|
22
|
+
color: #FF99AA;
|
23
|
+
font-size: 45px;
|
24
|
+
text-align: center;
|
25
|
+
cursor: default;
|
23
26
|
}
|
24
27
|
|
25
28
|
div[locatinestyle=false] {
|
data/lib/locatine/app/content.js
CHANGED
@@ -20,6 +20,11 @@ async function creatingDiv(){
|
|
20
20
|
locatine_create_element(document.body, "div", options, "");
|
21
21
|
const magic_cover = document.getElementById('locatine_magic_div');
|
22
22
|
magic_cover.onclick = function(e) {locatine_magic_click(e)};
|
23
|
+
document.body.onkeypress = async function(e) {
|
24
|
+
if (e.which == 13) {
|
25
|
+
await set_value('locatine_confirm', true)
|
26
|
+
}
|
27
|
+
}
|
23
28
|
}
|
24
29
|
|
25
30
|
async function setStyle(style, magicDiv){
|
@@ -40,6 +45,21 @@ async function setTitleHint(magicDiv){
|
|
40
45
|
await set_value('locatine_title', magicDiv.getAttribute("locatinetitle"));
|
41
46
|
await set_value('locatine_hint', magicDiv.getAttribute("locatinehint"));
|
42
47
|
magicDiv.setAttribute("locatinetitle", "ok");
|
48
|
+
let op = 1;
|
49
|
+
magicDiv.innerHTML = await get_value("locatine_title");
|
50
|
+
let timer = setInterval(function () {
|
51
|
+
if ((magicDiv.style.opacity == 1) && (op < 0.97)) {
|
52
|
+
clearInterval(timer);// If other process changed opacity.
|
53
|
+
};
|
54
|
+
if (op <= 0.2) {
|
55
|
+
clearInterval(timer);
|
56
|
+
magicDiv.style.opacity = 0;
|
57
|
+
magicDiv.innerHTML = "";
|
58
|
+
}
|
59
|
+
magicDiv.style.opacity = op;
|
60
|
+
magicDiv.style.filter = 'alpha(opacity=' + op * 100 + ")";
|
61
|
+
op -= op * 0.03;
|
62
|
+
}, 50);
|
43
63
|
}
|
44
64
|
}
|
45
65
|
|
@@ -5,15 +5,11 @@ module Locatine
|
|
5
5
|
module Helpers
|
6
6
|
private
|
7
7
|
|
8
|
-
def enforce(
|
9
|
-
if args.last.class == Hash
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
temp[what] = value
|
14
|
-
args.push(temp)
|
15
|
-
end
|
16
|
-
find(*args)
|
8
|
+
def enforce(inject, *args)
|
9
|
+
inject = args.last.merge(inject) if args.last.class == Hash
|
10
|
+
ok = (args.first.class == String) && inject[:name].nil?
|
11
|
+
inject[:name] = args.first if ok
|
12
|
+
find(inject)
|
17
13
|
end
|
18
14
|
|
19
15
|
def engine
|
@@ -101,13 +101,13 @@ module Locatine
|
|
101
101
|
##
|
102
102
|
# Find alias with return_locator option enforced
|
103
103
|
def lctr(*args)
|
104
|
-
enforce(:
|
104
|
+
enforce({ return_locator: true }, *args)
|
105
105
|
end
|
106
106
|
|
107
107
|
##
|
108
108
|
# Find alias with collection option enforced
|
109
109
|
def collect(*args)
|
110
|
-
enforce(:
|
110
|
+
enforce({ collection: true }, *args)
|
111
111
|
end
|
112
112
|
|
113
113
|
def json=(value)
|
data/lib/locatine/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: locatine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.02007'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergei Seleznev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|