21 lines
670 B
JavaScript
21 lines
670 B
JavaScript
/*
|
|
* Nightcord Content Script
|
|
* Injected into discord.com — injects the main Nightcord bundle into the page.
|
|
*
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*/
|
|
|
|
(function () {
|
|
// Inject Nightcord CSS
|
|
const style = document.createElement("link");
|
|
style.rel = "stylesheet";
|
|
style.href = chrome.runtime.getURL("dist/Nightcord.css");
|
|
document.documentElement.appendChild(style);
|
|
|
|
// Inject the main Nightcord JS bundle
|
|
const script = document.createElement("script");
|
|
script.src = chrome.runtime.getURL("dist/Nightcord.js");
|
|
script.type = "text/javascript";
|
|
(document.head ?? document.documentElement).appendChild(script);
|
|
})();
|