MCPcopy Create free account
hub / github.com/MathMan05/Fermi / fix

Function fix

src/webpage/utils/cssMagic.ts:93–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

91 return specificity.join("\n");
92}
93export function fix() {
94 if (!CSS.supports("selector(&)")) {
95 fetch("/style.css")
96 .then((_) => _.text())
97 .then((txt) => {
98 const link = Array.from(document.getElementsByTagName("link")).find((_) =>
99 _.href.endsWith("/style.css"),
100 );
101 if (!link) {
102 alert("link not found");
103 return;
104 }
105 const css = unnest(txt);
106 console.log(css);
107
108 const style = document.createElement("style");
109 style.textContent = css;
110 link.after(style);
111 link.remove();
112 });
113 }
114}

Callers 1

utils.tsFile · 0.85

Calls 3

unnestFunction · 0.85
findMethod · 0.80
removeMethod · 0.45

Tested by

no test coverage detected