Add remove video top mask feature

This commit is contained in:
the1812 2018-09-11 14:31:47 +08:00
parent b9d944f2ef
commit b96b3364f0
10 changed files with 58 additions and 19 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
// ==UserScript==
// @name Bilibili Evolved (Preview)
// @version 1.3.9
// @version 1.3.10
// @description 增强哔哩哔哩Web端体验. (预览版分支)
// @author Grant Howard
// @match *://*.bilibili.com/*
@ -23,6 +23,7 @@
const settings = {
toast: false,
fullTweetsTitle: false,
removeVideoTopMask: true,
removeLiveWatermark: true,
harunaScale: true,
removeAds: true,
@ -46,7 +47,7 @@
notifyNewVersion: true,
fixFullscreen: false,
latestVersionLink: "https://github.com/the1812/Bilibili-Evolved/raw/preview/bilibili-evolved.preview.user.js",
currentVersion: "1.3.9"
currentVersion: "1.3.10"
};
function loadSettings()
{
@ -111,7 +112,8 @@
fullTweetsTitle: new Resource("utils/full-tweets-title.min.js"),
viewCover: new Resource("video/view-cover.min.js"),
notifyNewVersion: new Resource("utils/notify-new-version.min.js"),
toast: new Resource("utils/toast.min.js")
toast: new Resource("utils/toast.min.js"),
removeVideoTopMask: new Resource("video/remove-top-mask.min.js")
};
(function ()
{
@ -169,6 +171,7 @@
this.viewCover.displayName = "查看封面";
this.notifyNewVersion.displayName = "新版本提醒";
this.toast.displayName = "显示消息";
this.removeVideoTopMask.displayName = "删除视频标题层";
}).apply(Resource.all);
}
function downloadText(url, load, error)

View File

@ -1,6 +1,6 @@
// ==UserScript==
// @name Bilibili Evolved
// @version 1.3.9
// @version 1.3.10
// @description 增强哔哩哔哩Web端体验.
// @author Grant Howard
// @match *://*.bilibili.com/*
@ -23,6 +23,7 @@
const settings = {
toast: false,
fullTweetsTitle: false,
removeVideoTopMask: true,
removeLiveWatermark: true,
harunaScale: true,
removeAds: true,
@ -46,7 +47,7 @@
notifyNewVersion: true,
fixFullscreen: false,
latestVersionLink: "https://github.com/the1812/Bilibili-Evolved/raw/master/bilibili-evolved.user.js",
currentVersion: "1.3.9"
currentVersion: "1.3.10"
};
function loadSettings()
{
@ -111,7 +112,8 @@
fullTweetsTitle: new Resource("utils/full-tweets-title.min.js"),
viewCover: new Resource("video/view-cover.min.js"),
notifyNewVersion: new Resource("utils/notify-new-version.min.js"),
toast: new Resource("utils/toast.min.js")
toast: new Resource("utils/toast.min.js"),
removeVideoTopMask: new Resource("video/remove-top-mask.min.js")
};
(function ()
{
@ -169,6 +171,7 @@
this.viewCover.displayName = "查看封面";
this.notifyNewVersion.displayName = "新版本提醒";
this.toast.displayName = "显示消息";
this.removeVideoTopMask.displayName = "删除视频标题层";
}).apply(Resource.all);
}
function downloadText(url, load, error)

View File

@ -43,6 +43,7 @@
<checkbox indent="0" key="expandDanmakuList" dependencies=""></checkbox>
<checkbox indent="0" key="harunaScale" dependencies=""></checkbox>
<checkbox indent="0" key="removeLiveWatermark" dependencies=""></checkbox>
<checkbox indent="0" key="removeVideoTopMask" dependencies=""></checkbox>
<category>触摸优化</category>
<checkbox indent="0" key="touchNavBar" dependencies=""></checkbox>
<checkbox indent="0" key="touchVideoPlayer" dependencies=""></checkbox>

View File

@ -1 +1 @@
1.3.9
1.3.10

21
video/remove-top-mask.js Normal file
View File

@ -0,0 +1,21 @@
(() =>
{
return (_, resources) =>
{
const id = "bilibili-video-top-mask";
if ($(`#${id}`).length === 0)
{
resources.applyStyleFromText(`
<style id='${id}'>
.bilibili-player-video-top
{
display: none !important;
}
</style>
`);
}
return {
ajaxReload: false
};
};
})();

1
video/remove-top-mask.min.js vendored Normal file
View File

@ -0,0 +1 @@
(()=>{return(i,n)=>{const e="bilibili-video-top-mask";if($(`#${e}`).length===0){n.applyStyleFromText(`\n <style id='${e}'>\n .bilibili-player-video-top\n {\n display: none !important;\n }\n </style>\n `)}return{ajaxReload:false}}})();

View File

@ -3,7 +3,7 @@
return (_, resources) =>
{
const id = "bilibili-live-watermark";
if ($(id).length === 0)
if ($(`#${id}`).length === 0)
{
resources.applyStyleFromText(`
<style id='${id}'>

View File

@ -1 +1 @@
(()=>{return(l,e)=>{const i="bilibili-live-watermark";if($(i).length===0){e.applyStyleFromText(`\n <style id='${i}'>\n .bilibili-live-player-video-logo\n {\n display: none !important;\n }\n </style>\n `)}return{ajaxReload:false}}})();
(()=>{return(l,e)=>{const i="bilibili-live-watermark";if($(`#${i}`).length===0){e.applyStyleFromText(`\n <style id='${i}'>\n .bilibili-live-player-video-logo\n {\n display: none !important;\n }\n </style>\n `)}return{ajaxReload:false}}})();