Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
zanwei authored Sep 26, 2023
1 parent bca275c commit 3806f4c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
11 changes: 10 additions & 1 deletion contentScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ function injectCSS() {
const fontImport = "@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap');";

const css = `
.font-detector {
color: #A8A8A8;
}
.font-detector span {
color: #fff;
}
#fontInfoTooltip {
backdrop-filter: blur(50px); /* 添加背景模糊 */
border: 1px solid #2F2F2F; /* 添加 1px border */
Expand Down Expand Up @@ -49,7 +57,8 @@ function injectCSS() {
injectCSS();

function createTooltip() {
const tooltip = document.createElement('div');
const tooltip = document.createElement('div');
tooltip.classList.add('font-detector');
tooltip.setAttribute('id', 'fontInfoTooltip');
tooltip.style.position = 'absolute';
tooltip.style.display = 'none';
Expand Down
5 changes: 2 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "FontDetector",
"version": "1.1.5",
"version": "1.1.6",
"description": "Display font information on hover over text elements.",
"permissions": [
"activeTab"
Expand All @@ -17,8 +17,7 @@
{
"matches": ["<all_urls>"],
"js": ["contentScript.js"],
"all_frames": true,
"css": ["popup.css"]
"all_frames": true
}
],
"icons": {
Expand Down
9 changes: 9 additions & 0 deletions popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ body {
font-family: 'Poppins', Arial, sans-serif;
margin: 0;
padding: 0;
color: initial;
}

.container {
Expand All @@ -16,3 +17,11 @@ body {
color: #A8A8A8;
font-size: 16px;
}

.font-detector {
color: #A8A8A8;
}

.font-detector span {
color: #fff;
}

0 comments on commit 3806f4c

Please sign in to comment.