@steambrew/api
Version:
This sub-project is responsible for transpiling and assembling @steambrew/client and @steambrew/webkit into a bundle that is injectable into the Steam Client. `StartPreloader` is the main function that is called from the backend of Millennium in C++ with
3 lines (2 loc) • 1.88 kB
JavaScript
import{_ as e,a as t}from"../millennium.js";import{Millennium as n}from"./chunk-millennium-api.js";function r(e,t,n){if(!e.querySelectorAll("style[id='".concat(n,"']")).length){var r=Object.assign(e.createElement("style"),{id:n});r.textContent=t,e.head.appendChild(r)}}function o(){return e(this,void 0,void 0,function(){var e,o,c,i;return t(this,function(t){switch(t.label){case 0:return c=(o=JSON).parse,[4,n.callServerMethod("core","Core_GetSystemColors")];case 1:return e=c.apply(o,[t.sent()]),i=Object.entries(e).map(function(e){var t=e[0],n=e[1],r=function(e){return e.replace(/Rgb$/,"-RGB").replace(/^./,function(e){return e.toUpperCase()})}(t);return"--SystemAccentColor".concat(r,": ").concat(n,";")}).join("\n"),r(document,":root {\n".concat(i,"\n}"),"SystemAccentColorInject"),[2]}})})}function c(){return e(this,void 0,void 0,function(){var e,o,c;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),c=(o=JSON).parse,[4,n.callServerMethod("core","Core_LoadQuickCss")];case 1:return e=c.apply(o,[t.sent()]),r(document,e,"MillenniumQuickCss"),[3,3];case 2:return t.sent(),[3,3];case 3:return[2]}})})}function i(){return e(this,void 0,void 0,function(){var e,o,c;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),c=(o=JSON).parse,[4,n.callServerMethod("core","Core_GetRootColors")];case 1:return e=c.apply(o,[t.sent()]),r(document,e,"RootColors"),[3,3];case 2:return t.sent(),[3,3];case 3:return[2]}})})}function s(){return e(this,arguments,void 0,function(e){return void 0===e&&(e=[]),t(this,function(t){return document.documentElement.setAttribute("data-millennium-plugin",e.join(" ")),document.documentElement.classList.add("MillenniumWindow_SteamBrowser"),[2]})})}export{s as addPluginDOMBreadCrumbs,o as appendAccentColor,c as appendQuickCss,i as appendRootColors};
//# sourceMappingURL=chunk-browser-init.js.map