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

Function createImage

src/htmlutil.js:73–91  ·  view source on GitHub ↗
(src, name, id, append, title, oc)

Source from the content-addressed store, hash-verified

71};
72
73var createImage = function(src, name, id, append, title, oc) {
74 var image = cr('image', name, id, append, true);
75
76 image.setAttribute("width", "16px");
77 image.setAttribute("height", "16px");
78 image.setAttribute("src", src);
79 if (oc) image.setAttribute("style", "cursor: pointer;");
80 if (title) image.title = title;
81 image.key = id;
82 image.name = name;
83 image.alt = ' ?';
84
85 if (oc && !image.inserted) {
86 image.addEventListener("click", oc);
87 image.href = 'javascript://nop/';
88 }
89
90 return image;
91};
92
93var createFileInput = function(name, id, oc) {
94 var input = crc('input', 'import', 'file', null, null, true);

Callers

nothing calls this directly

Calls 1

crFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…