Skip to content

Commit

Permalink
[NCLC]修正缩小标题宽度的活动图标大小问题,第三方chromium原生扩展兼容修正
Browse files Browse the repository at this point in the history
  • Loading branch information
indefined committed Apr 27, 2019
1 parent b5dcb27 commit 474a87b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 17 deletions.
22 changes: 11 additions & 11 deletions neteaseCCLiveCleaner/README.md
Expand Up @@ -9,32 +9,32 @@

**提交问题反馈前请先看完说明**

-------------------------
## 功能预览

![预览](https://greasyfork.org/system/screenshots/screenshots/000/015/035/original/preview.jpg)

-------------------------
## 使用说明

- 安装脚本后点击直播间的特效按钮,按需求勾选自己想屏蔽的功能
- 只会在有特效按钮的页面生效,未开播或者页面中找不到特效按钮的房间不起作用
- 屏蔽功能只是不显示了,比如抽奖和清晰度提醒之类还是会存在的,只是你看不见而已
- 功能只是简单分组的,没有经过精确测试,各模块功能可能有重复,或者存在实际功能和写的不一样,自行测试
- 不能保证完全屏蔽所有显示的功能,如有漏屏蔽或者功能屏蔽建议最好精确反馈位置,能直接给个样式表最好
- 已知没有屏蔽到的功能
- 包子喊话的弹幕气泡
- 不能保证完全屏蔽所有显示的功能,如有漏屏蔽或者新屏蔽建议最好精确反馈位置,能直接给个样式表最好
- 已知没有完全屏蔽的功能
- 去除弹幕气泡功能不能屏蔽包子喊话的气泡
- 可能会存在开启某功能后页面错位等情况,如错位反馈请准确说明在什么情况下开启了哪个功能后触发的
- 已知可能错位功能:
- 解除播放器高度限制、自动折叠榜单区、缩小播放器边距功能在某些视频页面可能导致播放器和聊天区高度不一致
- 已知可能错位功能:
- 解除播放器高度限制、自动折叠榜单区、缩小播放器边距功能在某些视频页面可能导致播放器和聊天区高度不一致
- 本人不常用CC直播所以不一定能解决反馈问题

-------------------------
## 功能预览

![预览](https://greasyfork.org/system/screenshots/screenshots/000/015/035/original/preview.jpg)

-------------------------
## 设置存储相关

- 本脚本会优先尝试脚本管理器提供的GM3以前的存储API存取配置
- Tampermonkey、Violentmonkey、GM3等脚本管理器适用
- 配置保存在脚本管理器内,所有页面通用
- 如果无法获得脚本管理器提供存储API,会使用浏览器原生localStorage存储
- 使用GM4、chrome原生扩展、书签法使用的适用
- 使用GM4、第三方chromium原生扩展、书签法安装的适用
- 此方法保存的配置HTTP和HTTPS页面不通用
28 changes: 22 additions & 6 deletions neteaseCCLiveCleaner/neteaseCCLiveCleaner.user.js
Expand Up @@ -2,7 +2,7 @@
// @name 网易CC直播净化
// @namespace indefined
// @supportURL https://github.com/indefined/UserScripts/issues
// @version 0.1
// @version 0.1.1
// @description 自定义屏蔽CC直播HTML5网页大部分不想看到的东西
// @author indefined
// @match *://cc.163.com/*
Expand Down Expand Up @@ -54,6 +54,19 @@ div#searchBoss {
.anchor-live {
margin: 0 10px;
}
.header-match-rcm-imgs,
.header-match-rcm-imgs .match-rcm-imgs-list .match-rcm-imgs-item,
.header-match-rcm-imgs .match-rcm-imgs-list .match-rcm-imgs-item a,
.header-match-rcm-imgs .match-rcm-imgs-list .match-rcm-imgs-item img {
height: 16px;
width: 25px;
}
.header-match-rcm-imgs .match-rcm-imgs-list .match-rcm-imgs-item img {
background-size: cover;
}
.header-match-rcm-imgswrap .match-arrow-left {
margin-top: 6px !important;
}
/*缩小标题栏高度后增加主框体高度*/
body:not(.blizzardtv-iframe-body) .main-container {
height: calc(100% - 30px) !important;
Expand Down Expand Up @@ -451,9 +464,12 @@ div#bunShoutDynamic{}
configDiv:document.querySelector('ul.ban-effect-list'),
config:(()=>{
try{
return 'undefined'!=typeof(GM_getValue)?
JSON.parse(GM_getValue('ccLiveConfig','{}'))
:JSON.parse(localStorage.getItem('ccLiveConfig')||'{}');
if('undefined'!=typeof(GM_info)&&'undefined'!=typeof(GM_getValue)) {
return JSON.parse(GM_getValue('ccLiveConfig','{}'));
}
else {
return JSON.parse(localStorage.getItem('ccLiveConfig')||'{}');
}
}catch(e){
console.error('CC直播净化:读取配置失败,使用默认配置',e);
return {};
Expand All @@ -464,8 +480,8 @@ div#bunShoutDynamic{}
if(!configList[i]) delete this.config[i];
}
try{
if('undefined'!=typeof(GM_setValue)){
GM_setValue('ccLiveConfig',JSON.stringify(this.config))
if('undefined'!=typeof(GM_info)&&'undefined'!=typeof(GM_setValue)){
GM_setValue('ccLiveConfig',JSON.stringify(this.config));
}
else {
localStorage.setItem('ccLiveConfig',JSON.stringify(this.config));
Expand Down

0 comments on commit 474a87b

Please sign in to comment.