bug fix & optimize

pull/316/head
spirit 2019-10-07 18:29:50 +08:00
parent 82ce5b80d6
commit c1fcf73a1a
2 changed files with 11 additions and 26 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 413 KiB

View File

@ -15,6 +15,7 @@ mashiro_global.ini = new function () {
copy_code_block(); copy_code_block();
coverVideoIni(); coverVideoIni();
checkskinSecter(); checkskinSecter();
scrollBar();
} }
this.pjax = function () { this.pjax = function () {
pjaxInit(); pjaxInit();
@ -89,7 +90,6 @@ function post_list_show_animation() {
}) })
} }
} }
window.onpopstate = post_list_show_animation;
mashiro_global.font_control = new function () { mashiro_global.font_control = new function () {
this.change_font = function () { this.change_font = function () {
if ($("body").hasClass("serif")) { if ($("body").hasClass("serif")) {
@ -287,7 +287,6 @@ function scrollBar() {
}); });
} }
} }
scrollBar();
function checkskinSecter() { function checkskinSecter() {
if (mashiro_global.variables.skinSecter === false) { if (mashiro_global.variables.skinSecter === false) {
@ -300,10 +299,10 @@ function checkskinSecter() {
} }
function checkBgImgCookie() { function checkBgImgCookie() {
var bgurl = getCookie("bgImgSetting"); var bgurl = getCookie("bgImgSetting");
if (bgurl != "") { if (!bgurl) {
$("#" + bgurl).click();
} else {
$("#white-bg").click(); $("#white-bg").click();
} else {
$("#" + bgurl).click();
} }
} }
if (document.body.clientWidth > 860) { if (document.body.clientWidth > 860) {
@ -774,13 +773,11 @@ if(mashiro_option.float_player_on) {
}); });
var apSwitchTag = 0; var apSwitchTag = 0;
var aplayerlist=$(".aplayer-list"); var aplayerlist=$(".aplayer-list");
aplayerlist.removeClass( "aplayer-list-hide" ); aplayerlist.removeClass( "aplayer-list-hide" ).css({maxHeight:'0px'});
aplayerlist.css({maxHeight:'0px'});
$(".aplayer.aplayer-fixed .aplayer-body").addClass("ap-hover"); $(".aplayer.aplayer-fixed .aplayer-body").addClass("ap-hover");
$(".aplayer-miniswitcher").click(function(){ $(".aplayer-miniswitcher").click(function(){
if (apSwitchTag == 0) { if (apSwitchTag == 0) {
aplayerlist.removeClass( "aplayer-list-hide" ); aplayerlist.removeClass( "aplayer-list-hide" ).animate({maxHeight:'250px'});
aplayerlist.animate({maxHeight:'250px'});
$(".aplayer.aplayer-fixed .aplayer-body").removeClass( "ap-hover" ); $(".aplayer.aplayer-fixed .aplayer-body").removeClass( "ap-hover" );
apSwitchTag = 1; apSwitchTag = 1;
} else { } else {
@ -1257,8 +1254,7 @@ var home = location.href,
s.oncanplay = function () { s.oncanplay = function () {
Siren.splay(); Siren.splay();
$('#video-add').show(); $('#video-add').show();
_btn.addClass('videolive'); _btn.addClass('videolive').addClass('haslive');
_btn.addClass('haslive');
} }
} else { } else {
if ($(this).hasClass('video-pause')) { if ($(this).hasClass('video-pause')) {
@ -1275,9 +1271,7 @@ var home = location.href,
s.onended = function () { s.onended = function () {
$('#bgvideo').attr('src', ''); $('#bgvideo').attr('src', '');
$('#video-add').hide(); $('#video-add').hide();
_btn.addClass('loadvideo').removeClass('video-pause'); _btn.addClass('loadvideo').removeClass('video-pause').removeClass('videolive').removeClass('haslive');
_btn.removeClass('videolive');
_btn.removeClass('haslive');
$('.focusinfo').css({ $('.focusinfo').css({
"top": "49.3%" "top": "49.3%"
}); });
@ -1496,9 +1490,7 @@ var home = location.href,
}); });
}, },
NH: function () { NH: function () {
var h1 = 0, var h1 = 0;
h2 = 50,
ss = $(document).scrollTop();
$(window).scroll(function () { $(window).scroll(function () {
var s = $(document).scrollTop(),cached = $('.site-header'); var s = $(document).scrollTop(),cached = $('.site-header');
if (s == h1) { if (s == h1) {
@ -1507,15 +1499,6 @@ var home = location.href,
if (s > h1) { if (s > h1) {
cached.addClass('yya'); cached.addClass('yya');
} }
if (s > h2) {
cached.addClass('gizle');
if (s > ss) {
cached.removeClass('sabit');
} else {
cached.addClass('sabit');
}
ss = s;
}
}); });
}, },
XLS: function () { XLS: function () {
@ -1745,6 +1728,7 @@ var home = location.href,
$('body,html').animate({ $('body,html').animate({
scrollTop: 0, scrollTop: 0,
}, scroll_top_duration); }, scroll_top_duration);
return false;
}); });
} }
} }
@ -1808,6 +1792,7 @@ $(function () {
Siren.PE(); Siren.PE();
Siren.CE(); Siren.CE();
timeSeriesReload(true); timeSeriesReload(true);
post_list_show_animation();
}, false); }, false);
} }
$.fn.postLike = function () { $.fn.postLike = function () {