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

Function createPosition

src/htmlutil.js:312–330  ·  view source on GitHub ↗
(name, e, oc)

Source from the content-addressed store, hash-verified

310};
311
312var createPosition = function(name, e, oc) {
313 var s = cr('div', e.name, e.id, 'pos1');
314 var b = cr('select', e.name, e.id, 'pos', true);
315 for (var i=1; i<=e.posof; i++) {
316 var o = cr('option', e.name, e.id, 'opt' + i);
317 o.textContent = i;
318 if (i == e.pos) o.selected = true;
319 b.appendChild(o);
320 }
321 b.key = e.id;
322 b.name = e.name;
323 if (oc && !b.inserted) b.addEventListener("change", oc);
324
325 var span = cr('span', e.name, e.id, 'pos2');
326 span.textContent = name;
327 s.appendChild(span);
328 s.appendChild(b);
329 return s;
330};
331
332var createSearchBox = function(tabURL) {
333 var search = crc('div', 'searchbox', 'search_inner');

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…