-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaddButton.js
More file actions
27 lines (22 loc) · 716 Bytes
/
Copy pathaddButton.js
File metadata and controls
27 lines (22 loc) · 716 Bytes
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
var parent = document.getElementById("js-agenda-input-component");
var input = document.getElementById("new_agenda_item");
var btn = document.createElement("BUTTON");
var text = document.createTextNode("Submit Tension To Triage");
btn.onclick = function () {
var e = new KeyboardEvent("keypress", {
bubbles: true, cancelable: true, keyCode: 13
});
input.dispatchEvent(e);
};
btn.style.width = "100%";
btn.style.padding = "0.25rem 0.5rem";
btn.style.marginTop = "1rem";
btn.style.color = "#fff";
btn.style.backgroundColor = "#3F9BB2";
btn.style.borderColor = "#3F9BB2";
btn.style.borderRadius = "0.1rem";
btn.style.fontSize = "0.875rem";
btn.appendChild(text);
if(parent) {
parent.appendChild(btn)
}