-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
120 lines (107 loc) · 3.59 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/**
* @description change settings here
* options page may come later...
*/
const config = {
/**
* @description notification after copying
*
* @param {Boolean} enable enable/disable (true/false)
* @param {Number} hideAfterMs hide notifiction after XXmilliseconds
* set to -1 to not hide
*
* may only work in secure pages/https, not in http/without SSL
*/
notification:{
enable: false,
hideAfterMs: 2000,
title: "Text copied to clipboard!"
},
/**
* @description Enable key to start/stop listening the mouse
* false -> always listening
* true -> listen only when key is held down (recommended)
*
* if disabled, may interfere with navigation, links might not
* work properly.
*
*
* IMPORTANT: clicking on ANYTHING will copy to clipboard, if
* you click in text and want to paste in a input field,
* whatever is in the input will OVERWRITE the clipboard.
* I only recommend if you are using to copy from a page to
* another software, like notepad for example.
*/
enableActionKey: true,
/**
* @description uses event. preventDefault() and stopPropagation()
* to not allow actions to happen when you click something, this
* allows to click in a link to copy without opening it.
*
*
*/
preventDefaultActions: true,
/**
* @description The key that when you hold it will start listening
* for mouse position and clicks, this allows to not leave it
* always tracking cursor and clicks
*
* keys like ctrl and shift are not recomended if you cliking in
* links, it may prevent for copying or opening link in new
* window/tab
*
* change it by the key you want
* @example //examples:
* actionKey: "Shift"
* actionKey: "Alt"
* actionKey: "w"
* actionKey: "W" (shift+w)
*/
actionKey: "Shift",
/**
* @description the event that will make it interact
* with what you want to select, you still need to click to copy
* but changes if will select when mouse move or whe you click
*
* recommended: click or mousemove
*/
mouseEventType: "mousemove",
/**
* @description put the tag and the attribute if you want to take
* something specifically, like "href" form <a> (links) or "src"
* from an image tag (<img>)
*
*
*/
specialTags: {
"A": "href"
},
/**
* @description Sometimes you are not selecting/clicking a <a> tag
* with this setted to "true", the parent element you are hovering
* will also be checked
*
* Google search results do that, puts a <h3> inside a <a> tag
*/
checkParentElement: true,
/**
* @description enables a highlight when mouse hovers a element,
* adds a background-color to the element
*
* @param {Boolean} enable enable/disable (true/false) highlight
* @param {String} color color of highlight, the recommended is
* a translucent color (with alpha channel, like rgba or 8char HEX)
* @example
* #00000080 -> half translucent black
* rgba(255, 255, 255, 0.5) -> half translucent white
* @param {Number} timeout time to remove the highlight after stop
* moving the mouse
*/
highlight: {
enable: true,
color: "rgba(0,0,0,0.1)",
timeout: 500,
},
// print things on devTools console
debug: false,
}