From d86eaa8951ae31ed0151730118efed2be6646217 Mon Sep 17 00:00:00 2001 From: DrowsyFlesh Date: Mon, 21 Oct 2019 16:35:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8E=BB=E6=B1=A1=E7=B2=89?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98=E5=92=8C=E9=A2=86=E7=93=9C?= =?UTF-8?q?=E5=AD=90=E6=80=A7=E8=83=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 4 +- src/js/modules/chatFilter/UI/index.js | 4 + src/js/modules/index.js | 10 +-- .../modules/liveChatMode/UI/LiveChatMode.js | 1 + src/js/modules/treasure/UI/Treasure.js | 9 +-- .../modules/videoDarkMode/UI/VideoDarkMode.js | 44 +++++++++-- src/manifest.json | 78 +------------------ src/styles/scss/video.scss | 2 +- 8 files changed, 55 insertions(+), 97 deletions(-) diff --git a/package.json b/package.json index f9b47de..694157d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bilibili-helper-master", - "version": "1.2.2-beta.11", + "version": "1.2.2-beta.12", "description": "bilibili-helper", "main": "index.js", "dependencies": { @@ -95,4 +95,4 @@ "license": "MIT", "repository": "https://github.com/zacyu/bilibili-helper", "readme": "/source/README.md" -} +} \ No newline at end of file diff --git a/src/js/modules/chatFilter/UI/index.js b/src/js/modules/chatFilter/UI/index.js index 5dfba1c..ce11144 100644 --- a/src/js/modules/chatFilter/UI/index.js +++ b/src/js/modules/chatFilter/UI/index.js @@ -27,6 +27,10 @@ export class ChatFilterUI extends UI { chatFilter.setAttribute('id', 'bilibili-helper-chat-filter'); chatFilter.setAttribute('style', 'position: relative;'); + const iconBar = document.querySelector('.control-panel-icon-row'); + iconBar.style.overflow = 'unset'; + iconBar.style.height = '24px'; + document.querySelector('.icon-left-part').appendChild(chatFilter); ReactDOM.render(, chatFilter, resolve); } diff --git a/src/js/modules/index.js b/src/js/modules/index.js index 826eb34..a2c6dc1 100644 --- a/src/js/modules/index.js +++ b/src/js/modules/index.js @@ -31,10 +31,10 @@ import {NotAutoPlay, NotAutoPlayUI} from 'Modules/notAutoPlay'; import {LiveUpCheck, LiveUpCheckUI} from 'Modules/liveUpCheck'; //import {ShowDisabledVideo, ShowDisabledVideoUI} from 'Modules/ShowDisabledVideo'; -let VideoUnblock; -try { - VideoUnblock = require('./videoUnblock').VideoUnblock; -} catch (e) {``;} +//let VideoUnblock; +//try { +// VideoUnblock = require('./videoUnblock').VideoUnblock; +//} catch (e) {``;} export const Features = { Background, @@ -57,7 +57,7 @@ export const Features = { QuickSearch, VideoHideDanmu, LiveChatMode, - VideoUnblock, + //VideoUnblock, VideoDarkMode, ProxyForWebsite, CvImages, diff --git a/src/js/modules/liveChatMode/UI/LiveChatMode.js b/src/js/modules/liveChatMode/UI/LiveChatMode.js index 7244695..6f461dd 100644 --- a/src/js/modules/liveChatMode/UI/LiveChatMode.js +++ b/src/js/modules/liveChatMode/UI/LiveChatMode.js @@ -41,6 +41,7 @@ export default () => { .hide-aside-area .live-room-app .app-content .app-body .player-and-aside-area .aside-area { background-color: transparent; pointer-events: none; + z-index: 1001!important; } .hide-aside-area .live-room-app .app-content .app-body .player-and-aside-area .aside-area .chat-history-panel { position: fixed; diff --git a/src/js/modules/treasure/UI/Treasure.js b/src/js/modules/treasure/UI/Treasure.js index cf55730..f08b32f 100644 --- a/src/js/modules/treasure/UI/Treasure.js +++ b/src/js/modules/treasure/UI/Treasure.js @@ -304,14 +304,13 @@ export default () => { }; getGrayScaleMap = (context, rate = 235, width = 120, height = 40) => { - const getGrayscale = (x, y) => { - const pixel = context.getImageData(x, y, 1, 1).data; - return pixel ? (77 * pixel[0] + 150 * pixel[1] + 29 * pixel[2] + 128) >> 8 : 0; - }; + const pixelMap = context.getImageData(0, 0, width, height).data; const map = []; for (let y = 0; y < height; y++) { // line y for (let x = 0; x < width; x++) { // column x - const gray = getGrayscale(x, y); + const index = (y * width + x) * 4; + const pixel = pixelMap.slice(index, index + 4); + const gray = pixel ? (77 * pixel[0] + 150 * pixel[1] + 29 * pixel[2] + 128) >> 8 : 0; map.push(gray > rate ? gray : 0); } } diff --git a/src/js/modules/videoDarkMode/UI/VideoDarkMode.js b/src/js/modules/videoDarkMode/UI/VideoDarkMode.js index 4b427eb..7769ab4 100644 --- a/src/js/modules/videoDarkMode/UI/VideoDarkMode.js +++ b/src/js/modules/videoDarkMode/UI/VideoDarkMode.js @@ -30,7 +30,8 @@ export default () => { const VideoDarkModeStyle = createGlobalStyle` html { - --dark-1: #0c0c0c; + --dark-0: #101010; + --dark-1: #141414; --dark-2: #131313; --dark-3: #1f1f1f; --dark-4: #2b2b2b; @@ -47,12 +48,26 @@ export default () => { #bofqi.mini-player:before { box-shadow: #000000 0 0 8px; } + // profile window + + .profile-m.dd-bubble { + background-color: var(--dark-1); + border: 1px solid var(--dark-0); + border-top: none; + .member-menu { + border-top: 1px solid var(--dark-0); + } + .member-bottom { + background-color: var(--dark-0); + } + } + // nav 搜索框 - .bili-header-m .nav-menu .showSearch.nav-search #nav_searchform { - border-color: var(--dark-3); - background-color: var(--dark-2); + .bili-header-m .nav-search #nav_searchform { + border-color: var(--dark-3)!important; + background-color: var(--dark-2)!important; input { - color: var(--dark-font-0); + color: var(--dark-font-0)!important; } } .bili-header-m .nav-menu .bilibili-suggest { @@ -64,6 +79,9 @@ export default () => { background-color: var(--dark-2); } } + li.suggest-item a { + color: #616161!important; + } li.suggest-item:hover { background-color: var(--dark-3); } @@ -76,7 +94,7 @@ export default () => { } // 创作团队 .members-info .members-info__header { - background-color: #131313; + background-color: var(--dark-1); .title { color: #99a2aa; } @@ -135,10 +153,22 @@ export default () => { background-color: black !important; } .danmaku-info-row { - .danmaku-info-danmaku,span { + .danmaku-info-danmaku, span { color: var(--dark-font-1)!important; } + &.danmaku-info-row-block { + opacity: 0.3!important; + } } + // 弹幕列表管理菜单 + .danmaku-wrap .player-auxiliary-area .player-auxiliary-danmaku-management { + background-color: var(--dark-3)!important; + & > * { + border-color: var(--dark-1)!important; + } + } + + .v-wrap .danmaku-wrap { background-color: var(--dark-2)!important; } diff --git a/src/manifest.json b/src/manifest.json index 97d8c3e..ae01760 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,77 +1 @@ -{ - "version": "1.2.2.11", - "update_url": "https://clients2.google.com/service/update2/crx", - "manifest_version": 2, - "minimum_chrome_version": "56.0.0", - "name": "__MSG_extensionName__", - "short_name": "__MSG_extensionShortName__", - "default_locale": "zh_CN", - "description": "__MSG_extensionDescription__", - "options_ui": {"page": "config.html", "open_in_tab": true}, - "options_page": "config.html", - "background": {"scripts": ["vendors.bundle.js", "features.bundle.js", "background.js"], "persistent": true}, - "browser_action": { - "default_icon": {"19": "statics/imgs/icon-19.png", "38": "statics/imgs/icon-38.png"}, - "default_popup": "popup.html", - "default_title": "__MSG_extensionShortName__" - }, - "content_scripts": [ - { - "all_frames": false, - "js": ["video.js", "vendors.bundle.js", "features.bundle.js"], - "css": ["styles/vendors.css", "styles/features.css"], - "matches": [ - "*://*.bilibili.com/bangumi/play/ss*", - "*://*.bilibili.com/bangumi/play/ep*", - "*://*.bilibili.com/video/av*", - "*://www.bilibili.com/watchlater/*" - ], - "run_at": "document_end" - }, - { - "all_frames": true, - "js": ["vendors.bundle.js", "live.js", "statics/js/ocrad.min.js", "features.bundle.js"], - "matches": ["*://live.bilibili.com/*"], - "run_at": "document_end" - }, - { - "all_frames": false, - "js": ["vendors.bundle.js", "website.js", "features.bundle.js"], - "matches": ["*://localhost/*", "*://helper.drowsyflesh.com/*", "*://bilibili-helper.github.io/*"], - "run_at": "document_start" - }, - { - "all_frames": false, - "js": ["vendors.bundle.js", "cv.js", "features.bundle.js"], - "css": ["styles/vendors.css", "styles/features.css"], - "matches": ["*://www.bilibili.com/read/cv*"], - "run_at": "document_end" - }, - { - "all_frames": false, - "js": ["vendors.bundle.js", "tbilibili.js", "features.bundle.js"], - "css": ["styles/vendors.css", "styles/features.css"], - "matches": ["*://t.bilibili.com/?tab=*"], - "run_at": "document_end" - } - ], - "externally_connectable": {"matches": ["*://*/*"]}, - "icons": {"16": "statics/imgs/icon-16.png", "32": "statics/imgs/icon-32.png", "128": "statics/imgs/icon-128.png"}, - "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDXGarzPXVb5UpkDTsw4cdApsrQvPTNTMXdz/7j9QVuQZoPm5R9l3o9ppfGYeae7sZRaJiueBEO/LA8s7KCuE9icPl72xSqdei3Jo0PTTUlmNQIysl9PZy6Xd520sS5wNFhPaxOy1ApHZ6+o+yMEXWmjx2fX0tHJd7dKTii47MTnQIDAQAB", - "permissions": [ - "downloads", - "alarms", - "contextMenus", - "cookies", - "notifications", - "storage", - "tabs", - "webRequest", - "webRequestBlocking", - "http://*/", - "https://*/" - ], - "web_accessible_resources": ["statics/*", "bilibili-helper.woff", "at.alicdn.com/t/*", "libs/*", "js/*"], - "content_security_policy": "script-src 'self' https://www.google-analytics.com/analytics.js https://www.google-analytics.com/analytics_debug.js; object-src 'self';", - "incognito": "split" -} +{"version":"1.2.2.12","update_url":"https://clients2.google.com/service/update2/crx","manifest_version":2,"minimum_chrome_version":"56.0.0","name":"__MSG_extensionName__","short_name":"__MSG_extensionShortName__","default_locale":"zh_CN","description":"__MSG_extensionDescription__","options_ui":{"page":"config.html","open_in_tab":true},"options_page":"config.html","background":{"scripts":["vendors.bundle.js","features.bundle.js","background.js"],"persistent":true},"browser_action":{"default_icon":{"19":"statics/imgs/icon-19.png","38":"statics/imgs/icon-38.png"},"default_popup":"popup.html","default_title":"__MSG_extensionShortName__"},"content_scripts":[{"all_frames":false,"js":["video.js","vendors.bundle.js","features.bundle.js"],"css":["styles/vendors.css","styles/features.css"],"matches":["*://*.bilibili.com/bangumi/play/ss*","*://*.bilibili.com/bangumi/play/ep*","*://*.bilibili.com/video/av*","*://www.bilibili.com/watchlater/*"],"run_at":"document_end"},{"all_frames":true,"js":["vendors.bundle.js","live.js","statics/js/ocrad.min.js","features.bundle.js"],"matches":["*://live.bilibili.com/*"],"run_at":"document_end"},{"all_frames":false,"js":["vendors.bundle.js","website.js","features.bundle.js"],"matches":["*://localhost/*","*://helper.drowsyflesh.com/*","*://bilibili-helper.github.io/*"],"run_at":"document_start"},{"all_frames":false,"js":["vendors.bundle.js","cv.js","features.bundle.js"],"css":["styles/vendors.css","styles/features.css"],"matches":["*://www.bilibili.com/read/cv*"],"run_at":"document_end"},{"all_frames":false,"js":["vendors.bundle.js","tbilibili.js","features.bundle.js"],"css":["styles/vendors.css","styles/features.css"],"matches":["*://t.bilibili.com/?tab=*"],"run_at":"document_end"}],"externally_connectable":{"matches":["*://*/*"]},"icons":{"16":"statics/imgs/icon-16.png","32":"statics/imgs/icon-32.png","128":"statics/imgs/icon-128.png"},"key":"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDXGarzPXVb5UpkDTsw4cdApsrQvPTNTMXdz/7j9QVuQZoPm5R9l3o9ppfGYeae7sZRaJiueBEO/LA8s7KCuE9icPl72xSqdei3Jo0PTTUlmNQIysl9PZy6Xd520sS5wNFhPaxOy1ApHZ6+o+yMEXWmjx2fX0tHJd7dKTii47MTnQIDAQAB","permissions":["downloads","alarms","contextMenus","cookies","notifications","storage","tabs","webRequest","webRequestBlocking","http://*/","https://*/"],"web_accessible_resources":["statics/*","bilibili-helper.woff","at.alicdn.com/t/*","libs/*","js/*"],"content_security_policy":"script-src 'self' https://www.google-analytics.com/analytics.js https://www.google-analytics.com/analytics_debug.js; object-src 'self';","incognito":"split"} \ No newline at end of file diff --git a/src/styles/scss/video.scss b/src/styles/scss/video.scss index 2447f12..916d111 100644 --- a/src/styles/scss/video.scss +++ b/src/styles/scss/video.scss @@ -11,7 +11,7 @@ body { } .bilibili-helper { position: fixed; - bottom: 412px; + bottom: 420px; right: 6px; z-index: 1000; & > span {