MCPcopy
hub / github.com/gildas-lormeau/SingleFile / insertHighlightStylesheet

Function insertHighlightStylesheet

lib/single-file-extension-editor.js:2958–2964  ·  view source on GitHub ↗
(doc)

Source from the content-addressed store, hash-verified

2956 }
2957
2958 function insertHighlightStylesheet(doc) {
2959 if (!doc.querySelector("." + HIGHLIGHTS_STYLESHEET_CLASS)) {
2960 const styleheetHighlights = getStyleElement(HIGHLIGHTS_WEB_STYLESHEET);
2961 styleheetHighlights.classList.add(HIGHLIGHTS_STYLESHEET_CLASS);
2962 doc.documentElement.appendChild(styleheetHighlights);
2963 }
2964 }
2965
2966 function getContent(compressHTML, updatedResources) {
2967 unhighlightCutElement();

Callers 3

initFunction · 0.70
initPageFunction · 0.70
formatPageFunction · 0.70

Calls 2

getStyleElementFunction · 0.70
addMethod · 0.45

Tested by

no test coverage detected