MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / openTab

Function openTab

popup/index.js:164–174  ·  view source on GitHub ↗
(tab)

Source from the content-addressed store, hash-verified

162}
163
164async function openTab(tab) {
165 activeTabIdSaver.set(tab.id);
166 createTabContent(tab);
167
168 Array.from(document.querySelectorAll(".tablinks")).forEach((_) => {
169 _.classList.remove("active");
170 });
171 document
172 .querySelector('.tablinks[content-id="' + tab.id + '"]')
173 .classList.add("active");
174}
175
176async function createTabContent(tab) {
177 // search bar

Callers 1

createTabsFunction · 0.85

Calls 3

createTabContentFunction · 0.85
removeMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected