为 无页面跳转收听正确读音 的 chromium 扩展 添加样式 (#372)

* 新增README.md页面无跳转即可收听正确读音 的 chromium 扩展

* add 手动安装扩展 方法

* fix no element error

* add comment console log

* change load chrome extension describe

* use prettier format code

* comment console.log

* fix  http protocol audio media no play

* add chromium extension use Reference

* 无页面跳转收听正确读音请安装我们的 chromium 扩展

* 无页面跳转收听正确读音请安装我们的 [chromium 扩展]

* change chromium extension README.md

* add css

* add css extension

* add css extension

* change app.css extension

* 限定权限
pull/374/head
好吧,你想说啥 2 years ago committed by GitHub
parent f51ba17dc4
commit a690220e4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,4 +1,4 @@
# 本项目 `README.md` 页面无跳转即可收听正确读音 的 chromium 扩展 # 无页面跳转收听正确读音 的 chromium 扩展
### 手动安装扩展 ### 手动安装扩展

@ -0,0 +1,12 @@
tr:hover {
border: 8px solid #ddd !important;
border-radius: 8px !important;
box-shadow: 5px 5px 15px #daf5fe !important;
color: #fff !important;
background-color: #3ec487 !important;
/*
font-weight: 200;
font-size: 1.1rem;
*/
}

@ -2,6 +2,12 @@
let URLObj = new URL(location.href); let URLObj = new URL(location.href);
console.log(URLObj); console.log(URLObj);
if (document.querySelector("#readme table tbody")) { if (document.querySelector("#readme table tbody")) {
console.log(chrome.runtime.getURL("css/app.css"));
let css = document.createElement("link");
css.setAttribute("rel", "stylesheet");
css.setAttribute("type", "text/css");
css.setAttribute("href", chrome.runtime.getURL("css/app.css"));
document.head.appendChild(css);
let audio_player = new Audio(); let audio_player = new Audio();
audio_player.setAttribute("autoplay", "true"); audio_player.setAttribute("autoplay", "true");
document document

@ -2,10 +2,13 @@
"name": "chinese-programmer-wrong-pronunciation-chromium-extension", "name": "chinese-programmer-wrong-pronunciation-chromium-extension",
"version": "0.1.0", "version": "0.1.0",
"manifest_version": 3, "manifest_version": 3,
"description": "README.md 页面无跳转 即可听正确读音", "description": "页面无跳转 听正确读音",
"content_scripts": [ "content_scripts": [
{ {
"matches": ["*://*/shimohq/chinese-programmer-wrong-pronunciation/*"], "matches": [
"*://*/shimohq/chinese-programmer-wrong-pronunciation/*",
"*://*/jingjingxyk/chinese-programmer-wrong-pronunciation/*"
],
"run_at": "document_end", "run_at": "document_end",
"js": ["js/content-script.js"] "js": ["js/content-script.js"]
} }
@ -14,7 +17,15 @@
"declarativeNetRequest", "declarativeNetRequest",
"declarativeNetRequestWithHostAccess" "declarativeNetRequestWithHostAccess"
], ],
"host_permissions": ["*://github.com/*", "*://localhost:*/*"], "host_permissions": ["*://github.com/*"],
"web_accessible_resources": [
{
"resources": ["*.js", "*.css", "*.html"],
"matches": ["*://*/*"],
"extension_ids": [],
"use_dynamic_url": true
}
],
"declarative_net_request": { "declarative_net_request": {
"rule_resources": [ "rule_resources": [
{ {

Loading…
Cancel
Save