打算一直用6.0.0了,此处记录我对这个版本的魔改。
鉴于某些人要参考,现在开放。
歌单随机化
添加到
shuffle($info);//数组随机重置
歌单API移植
服务器非大陆的话只能食用网易云歌单,但是把API移动到大陆服务器就不一样了。
把
然后把
baseUrl="https://*/SKPlayer/Get.php"
自定义标签解析
添加到
//解析自定义mark标记
if(strpos($content,'[/')!==false){
preg_match_all('/\[([a-z])\]/',$content,$arr);
foreach($arr[1] as $mark){
//头
$content=preg_replace("#\[$mark\]#","<$mark>",$content);
//尾
$content=preg_replace("#\[/$mark\]#","</$mark>",$content);
}
}
禁止视频同时播放
添加到
function OnlyOnePlayerPlay() {
setTimeout(()=>$('.kyt-player').delegate('.play-button', 'click', function() {
$('.kyt-player').find('video:not(this)').trigger('pause');
$('.kyt-player').find('.play-button:not(this)').attr('style', 'display:bloke;');
console.log('禁止同时播放。——sp');
}), 1000);
}
OnlyOnePlayerPlay();
添加到
OnlyOnePlayerPlay();
自定义CSS
/* mark标记 */
m{
margin: 0px;
padding: .2em .4em;
border-radius: 0.1875rem;
color: #c7254e;
background-color: rgba(27,31,35,.05);
}
v{
color: #006699;
}
/* mark标记 */
/* 改善文章标题尺寸 */
article>#post-content>div>h2{
font-size: 20px !important;
font-weight: 400;
border-bottom: 1px solid #E5E9EF;
}
article>#post-content>div>h3{
font-size: 17px !important;
font-weight: 500;
}
/* 改善文章标题尺寸 */
/* 代码块插件所需 */
.page>pre>code {
position: relative;
display: block;
overflow-x: auto;
margin: 4.4px 0.px .4px 1px;
padding: 0;
max-height: 500px;
padding-left: 3.5em;
}
.page.code-toolbar>pre>code{
position: relative;
display: block;
overflow-x: auto;
margin: 4.4px 0.px .4px 1px;
padding: 0;
max-height: 500px;
padding-left: 3.5em;
}
.page>pre {
padding: 0;
border-radius: 0;
overflow: hidden;
}
#post-content>pre>code {
position: relative;
display: block;
overflow-x: auto;
margin: 4.4px 0.px .4px 1px;
padding: 0;
max-height: 500px;
padding-left: 3.5em;
}
#post-content>button{}
#post-content>pre:before{}
code::-webkit-scrollbar-track-piece{}
code::-webkit-scrollbar{}
/* 代码块插件所需 */
/* 透明模式BUG修复 */
#toc{
background: inherit !important;
}
/* 透明模式BUG修复 */
/* 友链头像美化 */
.tab-pane>div>a>span>img{
border-radius: 50%;
border: 2px solid #D6D5B7;
box-shadow: 1px 1px 3px #E1E1E1;
}
/* 友链头像美化 */
/* 鼠标悬停图片放大 */
.panel-picture:hover>figure>a,a>.item-thumb:hover,a>.item-thumb-small:hover{
transform: scale(1.05);
}
figure>a,a>.item-thumb,a>.item-thumb-small{
transition: all 0.6s;
}
.panel-picture>figure,.index-post-img,.index-post-img-small{
overflow: hidden;
}
/* 鼠标悬停图片放大 */
/* 鼠标悬停文章加阴影 */
.panel-picture:hover,.panel:hover,.panel-small:hover{
box-shadow: 1px 1px 5px 5px rgba(255,139,49,0.3);
}
/* 鼠标悬停文章加阴影 */
百度cdn回源用户真实ip
开启
添加到
/**使用CDN后获取访客真实ip*/
if (isset($_SERVER['HTTP_X_REAL_IP'])) {
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_REAL_IP'];
}
修复lock界面显示摘要
把
<?php $this->header(Content::exportGeneratorRules($this).'&description'); ?>
修复lock界面控制台报错
注释掉
<?php $this->options->analysis(); ?>
前后的script标签。