Skip to content
This repository was archived by the owner on Apr 30, 2026. It is now read-only.

Commit 21ebbdf

Browse files
committed
Use link tag to include css to avoid window size jump issue
1 parent 18b059a commit 21ebbdf

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

src/js/popup.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import '../css/pure/pure-min.css'
2-
import '../css/animate.css'
3-
import '../css/style.css'
41
import $ from 'jquery'
52
import React from 'react'
63
import { render } from 'react-dom'

src/manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"matches": [ "\u003Call_urls>" ]
1919
} ],
2020
"web_accessible_resources": [
21-
"base.js"
21+
"css/*.css",
22+
"base.js"
2223
],
2324
"browser_action": {
2425
"default_icon": "img/icon.png",

src/popup.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
<!doctype html>
22
<html>
3-
<head>
4-
<title>Custom JavaScript</title>
5-
</head>
3+
<head>
4+
<title>Custom JavaScript</title>
5+
<link rel="stylesheet" href="css/style.css">
6+
<link rel="stylesheet" href="css/animate.css">
7+
<link rel="stylesheet" href="css/pure/pure-min.css">
8+
</head>
69
<body>
710
<div class="customjs" id="customjs">
811
<form action="" method="post" accept-charset="utf-8" id="popup-form" class="pure-form">

webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ const options = {
9292
'process.env.NODE_ENV': JSON.stringify(env.NODE_ENV)
9393
}),
9494
new CopyWebpackPlugin([
95+
{ from: 'src/css', to: 'css' },
9596
{ from: 'src/img', to: 'img' }
9697
]),
9798
...HtmlFiles,

0 commit comments

Comments
 (0)