Skip to content

Commit

Permalink
fix: loading static css as normal css
Browse files Browse the repository at this point in the history
  • Loading branch information
Oein committed Jun 7, 2024
1 parent d806cda commit 1f02ab0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion extension/manifests/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"name": "치직치지직 (ChzkChzzk)",
"description": "치지직(chzzk.naver.com)을 더 유용하게!",
"version": "2.12",
"version": "2.12.1",

"options_ui": {
"page": "options.html"
Expand Down
2 changes: 0 additions & 2 deletions extension/src/content_script.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import initRemoveOfflineChannel from "#c/initRemoveOfflineChannel";

import configInstance, { defaultConfig } from "@config";
import log from "@log";
import { initModal } from "@/ui/modal";
let recvconfig = false;

window.addEventListener("message", (event) => {
Expand Down Expand Up @@ -58,7 +57,6 @@ async function main() {
configInstance,
};
const apply = () => {
initModal();
if (!recvconfig) return;
if (configInstance.get("bypassNaver", defaultConfig.bypassNaver)) {
try {
Expand Down
6 changes: 2 additions & 4 deletions extension/src/ui/modal.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import css from "#s/modelui.static.css";
import styler from "#u/styler";

export function initModal() {
styler("modal", css);
}

export default function openModal(config: {
title?: string;
body: string | HTMLElement | ((close: () => void) => HTMLElement);
onClose?: () => void;
}) {
styler("modal", css);

const modal = document.createElement("div");
modal.className = "chzzkExtModalContainer";
const cnbox = document.createElement("div");
Expand Down
2 changes: 1 addition & 1 deletion extension/webpack-chrome/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = {
{ test: /\.static\.html$/, use: "raw-loader" },
{ test: /\.static\.data$/, use: "raw-loader" },
{
test: /\.css$/i,
test: /(?<!\.static)\.css$/i,
use: ["style-loader", "css-loader"],
},
],
Expand Down

0 comments on commit 1f02ab0

Please sign in to comment.