MCPcopy Create free account
hub / github.com/Tampermonkey/tampermonkey / createCheckbox

Function createCheckbox

src/htmlutil.js:150–171  ·  view source on GitHub ↗
(name, i, oc)

Source from the content-addressed store, hash-verified

148};
149
150var createCheckbox = function(name, i, oc) {
151 var s = crc('div', 'checkbox', i.name, i.id, 'cb1');
152 s.key = i.id;
153 var input = cr('input', i.name, i.id, 'cb', true);
154 input.title = i.desc ? i.desc : '';
155 input.name = i.name;
156 input.key = i.id;
157 input.reload = i.reload;
158 input.warning = i.warning;
159 input.oldvalue = i.enabled;
160 input.checked = i.enabled;
161 input.type = "checkbox";
162
163 if (oc && !input.inserted) input.addEventListener("click", oc);
164 var span = crc('span', 'checkbox_desc', i.name, i.id, 'cb2');
165 span.textContent = name;
166 s.title = i.desc ? i.desc : '';
167 s.appendChild(input);
168 s.appendChild(span);
169
170 return { elem: s, input: input };
171};
172
173var createDropDown = function(name, e, values, oc) {
174 var s = cr('div', e.name, e.id, 'outer_dd');

Callers

nothing calls this directly

Calls 2

crcFunction · 0.85
crFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…