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

Function createItemButton

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

Source from the content-addressed store, hash-verified

265};
266
267var createItemButton = function(name, i, oc) {
268 var b = null;
269
270 b = crc('input', 'button' , name, i.id, 'bu', true);
271 b.name = i.name;
272 b.key = i.id;
273 b.type = "button";
274 b.value = i.name;
275 b.reload = i.reload;
276 b.ignore = i.ignore || i.reload;
277 b.warning = i.warning;
278 if (i.enabledBy) b.setAttribute('name', 'enabled_by_' + i.enabledBy);
279
280 if (!b.inserted && oc) {
281 b.addEventListener("click", oc);
282 }
283
284 return b;
285};
286
287var createSimpleButton = function(name, id, text, oc) {
288 var b = null;

Callers

nothing calls this directly

Calls 1

crcFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…