Files
NapCatQQ/.pnpm-store/v3/files/65/15530fb5c7996c327dadcb9353fe5867aae5055531b7a9c4fecadf5a61938f830f0a6e7be31a7b32b6b2dd7556191a2918b15e1a89baf31dd51e90c0f235b4
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

28 lines
839 B
Plaintext

let GOOBER_ID = '_goober';
let ssr = {
data: ''
};
/**
* Returns the _commit_ target
* @param {Object} [target]
* @returns {HTMLStyleElement|{data: ''}}
*/
export let getSheet = (target) => {
if (typeof window === 'object') {
// Querying the existing target for a previously defined <style> tag
// We're doing a querySelector because the <head> element doesn't implemented the getElementById api
let el =
(target ? target.querySelector('#' + GOOBER_ID) : window[GOOBER_ID]) ||
Object.assign(document.createElement('style'), {
innerHTML: ' ',
id: GOOBER_ID
});
el.nonce = window.__nonce__;
if (!el.parentNode) (target || document.head).appendChild(el);
return el.firstChild;
}
return target || ssr;
};