MCPcopy
hub / github.com/Tampermonkey/tampermonkey / createTab

Function createTab

src/options.js:1563–1577  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1561 };
1562
1563 var createTab = function() {
1564 var tabh = null;
1565 if (i.nnew) {
1566 tabh = crc('div', 'head_icon', i.name, i.id, 'details_h');
1567 tabh.appendChild(HtmlUtil.createImage(i.image, i.name, i.id, 'new_script_head'));
1568 } else {
1569 tabh = crc('div', '', i.name, i.id, 'details_h');
1570 tabh.textContent = I18N.getMessage('Edit') + ' - ' + (i.name.length > 25 ? i.name.substr(0,25) + '...' : i.name);
1571 }
1572
1573 var tabc = cr('td', i.name, i.id, 'details_c');
1574 tab = tabv.insertTab(null, 'details_' + Helper.createUniqueId(i.name, i.id), tabh, tabc, onSelect, i.nnew ? null : doClose);
1575
1576 scriptdetails = createScriptDetailsTabView(tab, i, tr, tabc, doClose);
1577 };
1578
1579 var scriptClick = function(e, noselect) {
1580 if (!tab) createTab();

Callers 1

scriptClickFunction · 0.70

Calls 3

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…