mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Add files
This commit is contained in:
commit
410685c73b
263
.gitignore
vendored
Normal file
263
.gitignore
vendored
Normal file
@ -0,0 +1,263 @@
|
||||
.vscode/
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
|
||||
# Visual Studio 2015 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUNIT
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# DNX
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# JustCode is a .NET coding add-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# TODO: Comment the next line if you want to checkin your web deploy settings
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
#*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/packages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/packages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/packages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignoreable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
node_modules/
|
||||
orleans.codegen.cs
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# JetBrains Rider
|
||||
.idea/
|
||||
*.sln.iml
|
||||
|
||||
# CodeRush
|
||||
.cr/
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
21
LICENCE
Normal file
21
LICENCE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Grant Howard
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
3037
bilibili-evolved.js
Normal file
3037
bilibili-evolved.js
Normal file
File diff suppressed because it is too large
Load Diff
1394
style/style-dark.scss
Normal file
1394
style/style-dark.scss
Normal file
File diff suppressed because it is too large
Load Diff
210
style/style-old.scss
Normal file
210
style/style-old.scss
Normal file
@ -0,0 +1,210 @@
|
||||
.bili-header-m>.nav-menu
|
||||
{
|
||||
background: rgb(0, 86, 177) !important;
|
||||
box-shadow: rgba(17, 81, 150, 0.48) 0px 2px 10px 1px !important;
|
||||
|
||||
background: $customStyleColorff !important;
|
||||
box-shadow: $customStyleColor70 0px 2px 10px 1px !important;
|
||||
}
|
||||
|
||||
.nav-mask
|
||||
{
|
||||
background-color: transparent !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.bili-header-m .nav-menu .nav-con .nav-item .t
|
||||
{
|
||||
color: #effbff !important;
|
||||
|
||||
color: $foregroundd !important;
|
||||
}
|
||||
|
||||
li.nav-item:hover
|
||||
{
|
||||
background-color: hsla(0,0%,$brightness,.2) !important;
|
||||
}
|
||||
|
||||
.vip-m
|
||||
{
|
||||
background: white !important;
|
||||
}
|
||||
|
||||
a.t>i.bili-icon
|
||||
{
|
||||
filter: grayscale(100) brightness($filterBrightness) saturate(0) !important;
|
||||
background-image: url(https://www.bilibili.com/favicon.ico) !important;
|
||||
background-size: cover !important;
|
||||
background-position: inherit !important;
|
||||
width: 16px !important;
|
||||
height: 16px !important;
|
||||
opacity: 0.81 !important;
|
||||
}
|
||||
|
||||
#entryOld,
|
||||
.nav-search-submit,
|
||||
.b-icon-app,
|
||||
.title-icon
|
||||
{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.i-face>.face
|
||||
{
|
||||
border: 1.5px solid #fff !important;
|
||||
border: 1.5px solid #fff3 !important;
|
||||
margin-top: -1px !important;
|
||||
}
|
||||
|
||||
div.up-load
|
||||
{
|
||||
margin: 5px 0 0 5px !important;
|
||||
height: 32px !important;
|
||||
}
|
||||
.u-link
|
||||
{
|
||||
background-image: none !important;
|
||||
background-color: #D5E3F2 !important;
|
||||
border: 1px solid #effbff !important;
|
||||
color: #effbff !important;
|
||||
|
||||
background: transparent !important;
|
||||
color: $foregroundd !important;
|
||||
border-radius: 4px !important;
|
||||
line-height: 30px !important;
|
||||
height: 30px !important;
|
||||
border: 1px solid $foregroundb !important;
|
||||
transition: background-color .2s !important;
|
||||
}
|
||||
|
||||
.u-link:hover
|
||||
{
|
||||
opacity: 1 !important;
|
||||
background-color: hsla(0,0%,$brightness,.2) !important;
|
||||
}
|
||||
|
||||
.nav-search
|
||||
{
|
||||
width: 140px !important;
|
||||
}
|
||||
|
||||
.nav-search-keyword
|
||||
{
|
||||
width: 130px !important;
|
||||
}
|
||||
|
||||
#nav_searchform
|
||||
{
|
||||
background-image: none !important;
|
||||
background-color: #D5E3F2 !important;
|
||||
|
||||
margin-top: 0.1rem !important;
|
||||
border-radius: 4px !important;
|
||||
background: #fffb !important;
|
||||
border: none !important;
|
||||
transition: background-color .2s !important;
|
||||
box-shadow: 0px 2px 10px 1px #0002;
|
||||
}
|
||||
|
||||
#nav_searchform:hover
|
||||
{
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
#bilibiliPlayer
|
||||
{
|
||||
box-shadow: 0px 10px 30px 5px #D0E4EC !important;
|
||||
|
||||
box-shadow: 0px 10px 30px 5px $customStyleColor40 !important;
|
||||
}
|
||||
|
||||
.blur-bg
|
||||
{
|
||||
opacity: $blurBackgroundOpacity !important;
|
||||
filter: blur(20px) !important;
|
||||
}
|
||||
|
||||
.cancel
|
||||
{
|
||||
width: 28px !important;
|
||||
}
|
||||
|
||||
ul.bilibili-suggest
|
||||
{
|
||||
margin-left: -30px !important;
|
||||
width: 200px !important;
|
||||
}
|
||||
|
||||
li.suggest-item>a
|
||||
{
|
||||
max-width: 155px !important;
|
||||
}
|
||||
|
||||
div.num
|
||||
{
|
||||
border: 1px solid #fff8 !important;
|
||||
}
|
||||
|
||||
#primary_menu,
|
||||
#primary_menu>ul.nav-menu
|
||||
{
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
}
|
||||
|
||||
div.nav-gif,
|
||||
#primary_menu
|
||||
{
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.up-nav
|
||||
{
|
||||
top: 37px !important;
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 1291px)
|
||||
{
|
||||
.bilibili-suggest.nav,
|
||||
.nav-search
|
||||
{
|
||||
width: 250px !important;
|
||||
margin-right: 72px !important;
|
||||
}
|
||||
|
||||
.nav-search-keyword
|
||||
{
|
||||
width: 240px !important;
|
||||
}
|
||||
|
||||
ul.bilibili-suggest
|
||||
{
|
||||
margin-left: 0px !important;
|
||||
width: 250px !important;
|
||||
}
|
||||
|
||||
li.suggest-item>a
|
||||
{
|
||||
max-width: 205px !important;
|
||||
}
|
||||
}
|
||||
|
||||
::-webkit-scrollbar
|
||||
{
|
||||
width: 5px !important;
|
||||
height: 5px !important;
|
||||
}
|
||||
::-webkit-scrollbar-corner,
|
||||
::-webkit-scrollbar-track
|
||||
{
|
||||
background: transparent !important;
|
||||
}
|
||||
::-webkit-resizer,
|
||||
::-webkit-scrollbar-thumb
|
||||
{
|
||||
background: #aaa !important;
|
||||
}
|
||||
::-webkit-scrollbar-thumb:hover
|
||||
{
|
||||
background: #888 !important;
|
||||
}
|
||||
249
style/style.scss
Normal file
249
style/style.scss
Normal file
@ -0,0 +1,249 @@
|
||||
.bili-wrapper
|
||||
{
|
||||
display: flex !important;
|
||||
justify-content: center !important;
|
||||
align-items: center !important;
|
||||
height: 50px !important;
|
||||
|
||||
}
|
||||
.bili-header-m>.nav-menu
|
||||
{
|
||||
background: rgb(0, 86, 177) !important;
|
||||
box-shadow: rgba(17, 81, 150, 0.48) 0px 2px 10px 1px !important;
|
||||
|
||||
background: $customStyleColorff !important;
|
||||
box-shadow: $customStyleColor70 0px 2px 10px 1px !important;
|
||||
}
|
||||
div.stardust-player
|
||||
{
|
||||
background: #fff !important;
|
||||
}
|
||||
/*div.player
|
||||
{
|
||||
width: 835.5px !important;
|
||||
}*/
|
||||
.nav-mask
|
||||
{
|
||||
background-color: transparent !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.nav-con
|
||||
{
|
||||
flex-grow: 10 !important;
|
||||
flex-shrink: 0 !important;
|
||||
}
|
||||
|
||||
.nav-con.fl
|
||||
{
|
||||
margin-left: -2em !important;
|
||||
}
|
||||
|
||||
.bili-header-m .nav-menu .nav-con .nav-item .t
|
||||
{
|
||||
color: #effbff !important;
|
||||
|
||||
color: $foregroundd !important;
|
||||
}
|
||||
|
||||
li.nav-item:hover
|
||||
{
|
||||
background-color: hsla(0,0%,$brightness,.2) !important;
|
||||
}
|
||||
|
||||
li.nav-item.home:hover
|
||||
{
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
.vip-m
|
||||
{
|
||||
background: white !important;
|
||||
}
|
||||
|
||||
a.t>i.bili-icon-logo,
|
||||
a.t>i.bili-icon
|
||||
{
|
||||
filter: grayscale(100) brightness($filterBrightness) saturate(0) !important;
|
||||
width: 50px !important;
|
||||
left: -60px !important;
|
||||
top: 0px !important;
|
||||
height: 50px !important;
|
||||
opacity: 0.81 !important;
|
||||
background-position-y: 12px !important;
|
||||
}
|
||||
|
||||
#entryOld,
|
||||
.nav-search-submit,
|
||||
.b-icon-app,
|
||||
.title-icon
|
||||
{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.i-face>.face
|
||||
{
|
||||
border: 1.5px solid #fff !important;
|
||||
border: 1.5px solid #fff3 !important;
|
||||
margin-top: -1px !important;
|
||||
}
|
||||
div.up-load
|
||||
{
|
||||
margin-left: 9px !important;
|
||||
height: 32px !important;
|
||||
order: 4 !important;
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.u-link
|
||||
{
|
||||
background-image: none !important;
|
||||
background-color: #D5E3F2 !important;
|
||||
border: 1px solid #effbff !important;
|
||||
color: #effbff !important;
|
||||
|
||||
background: transparent !important;
|
||||
color: $foregroundd !important;
|
||||
border-radius: 4px !important;
|
||||
line-height: 30px !important;
|
||||
height: 30px !important;
|
||||
border: 1px solid $foregroundb !important;
|
||||
transition: background-color .2s !important;
|
||||
}
|
||||
|
||||
.u-link:hover
|
||||
{
|
||||
opacity: 1 !important;
|
||||
background-color: hsla(0,0%,$brightness,.2) !important;
|
||||
}
|
||||
|
||||
.nav-search
|
||||
{
|
||||
width: 130px !important;
|
||||
}
|
||||
|
||||
.nav-search-keyword
|
||||
{
|
||||
width: 120px !important;
|
||||
}
|
||||
|
||||
#nav_searchform
|
||||
{
|
||||
background-image: none !important;
|
||||
background-color: #D5E3F2 !important;
|
||||
|
||||
margin-top: 0.1rem !important;
|
||||
border-radius: 4px !important;
|
||||
background: #fffb !important;
|
||||
border: none !important;
|
||||
transition: background-color .2s !important;
|
||||
box-shadow: 0px 2px 10px 1px #0002;
|
||||
}
|
||||
|
||||
#nav_searchform:hover
|
||||
{
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
#bilibiliPlayer
|
||||
{
|
||||
box-shadow: 0px 10px 30px 5px #D0E4EC !important;
|
||||
|
||||
box-shadow: 0px 10px 30px 5px $customStyleColor40 !important;
|
||||
}
|
||||
|
||||
.blur-bg
|
||||
{
|
||||
opacity: $blurBackgroundOpacity !important;
|
||||
filter: blur(20px) !important;
|
||||
}
|
||||
|
||||
.cancel
|
||||
{
|
||||
width: 28px !important;
|
||||
}
|
||||
|
||||
ul.bilibili-suggest
|
||||
{
|
||||
margin-left: -35px !important;
|
||||
width: 200px !important;
|
||||
}
|
||||
|
||||
li.suggest-item>a
|
||||
{
|
||||
max-width: 155px !important;
|
||||
}
|
||||
|
||||
div.num
|
||||
{
|
||||
border: 1px solid #fff8 !important;
|
||||
}
|
||||
|
||||
#primary_menu,
|
||||
#primary_menu>ul.nav-menu
|
||||
{
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
}
|
||||
|
||||
/*li.home>a.t,*/
|
||||
div.nav-gif,
|
||||
#primary_menu
|
||||
{
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
/*li.home>a.t
|
||||
{
|
||||
font-size: 0 !important;
|
||||
}*/
|
||||
|
||||
@media only screen and (min-width: 1291px)
|
||||
{
|
||||
.nav-con
|
||||
{
|
||||
margin: 0 1em !important;
|
||||
}
|
||||
|
||||
.bilibili-suggest.nav,
|
||||
.nav-search
|
||||
{
|
||||
width: 250px !important;
|
||||
}
|
||||
|
||||
.nav-search-keyword
|
||||
{
|
||||
width: 240px !important;
|
||||
}
|
||||
|
||||
ul.bilibili-suggest
|
||||
{
|
||||
margin-left: 0px !important;
|
||||
width: 250px !important;
|
||||
}
|
||||
|
||||
li.suggest-item>a
|
||||
{
|
||||
max-width: 205px !important;
|
||||
}
|
||||
}
|
||||
|
||||
::-webkit-scrollbar
|
||||
{
|
||||
width: 5px !important;
|
||||
height: 5px !important;
|
||||
}
|
||||
::-webkit-scrollbar-corner,
|
||||
::-webkit-scrollbar-track
|
||||
{
|
||||
background: transparent !important;
|
||||
}
|
||||
::-webkit-resizer,
|
||||
::-webkit-scrollbar-thumb
|
||||
{
|
||||
background: #aaa !important;
|
||||
}
|
||||
::-webkit-scrollbar-thumb:hover
|
||||
{
|
||||
background: #888 !important;
|
||||
}
|
||||
0
touch/touch-navbar.js
Normal file
0
touch/touch-navbar.js
Normal file
0
touch/touch-player.js
Normal file
0
touch/touch-player.js
Normal file
29
utils/common.js
Normal file
29
utils/common.js
Normal file
@ -0,0 +1,29 @@
|
||||
const waitForQuery = settings =>
|
||||
{
|
||||
const MaxRetry = settings.maxQueryRetry;
|
||||
let retry = 0;
|
||||
const tryQuery = (query, condition, action, failed) =>
|
||||
{
|
||||
if (retry >= MaxRetry)
|
||||
{
|
||||
if (failed)
|
||||
{
|
||||
failed();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const result = query();
|
||||
if (condition(result))
|
||||
{
|
||||
action(result);
|
||||
}
|
||||
else
|
||||
{
|
||||
retry++;
|
||||
setTimeout(() => tryQuery(query, condition, action, failed), settings.queryInterval);
|
||||
}
|
||||
}
|
||||
};
|
||||
return tryQuery;
|
||||
};
|
||||
1
utils/common.min.js
vendored
Normal file
1
utils/common.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
const waitForQuery=settings=>{const MaxRetry=settings.maxQueryRetry;let retry=0;const tryQuery=(query,condition,action,failed)=>{if(retry>=MaxRetry)failed&&failed();else{const result=query();condition(result)?action(result):(retry++,setTimeout(()=>tryQuery(query,condition,action,failed),settings.queryInterval))}};return tryQuery};
|
||||
8
utils/enable-new-player.js
Normal file
8
utils/enable-new-player.js
Normal file
@ -0,0 +1,8 @@
|
||||
// 运行后可使b站采用新版播放器(对番剧/稍后再看页面无效)
|
||||
function setCookie(key, value, expireDays)
|
||||
{
|
||||
const date = new Date();
|
||||
date.setTime(date.getTime() + expireDays * 24 * 60 * 60 * 1000);
|
||||
document.cookie = `${key}=${value};expires=${date.toUTCString()};path=/`;
|
||||
}
|
||||
setCookie("stardustplayer", "1", 90000);
|
||||
0
utils/expand-danmaku.js
Normal file
0
utils/expand-danmaku.js
Normal file
0
utils/gui-settings.js
Normal file
0
utils/gui-settings.js
Normal file
0
utils/remove-ads.js
Normal file
0
utils/remove-ads.js
Normal file
0
utils/watchlater.js
Normal file
0
utils/watchlater.js
Normal file
Loading…
Reference in New Issue
Block a user