-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from youranreus/dev3.0
version 3.2.8
- Loading branch information
Showing
8 changed files
with
76 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* | ||
* @package G | ||
* @author 季悠然 | ||
* @version 3.2.7R | ||
* @version 3.2.8 | ||
* @link https://季悠然.space | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
/** | ||
* 重定向 | ||
* | ||
* @package custom | ||
*/ | ||
?> | ||
|
||
<div style="display: flex;height: 100vh;justify-content: center; align-items: center;"> | ||
<h2 style="opacity: 0.3; font-weight: 200;font-size: 2.5rem">跳转中...</h2> | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
setTimeout(()=>{window.location.href= '<?php echo $this->fields->redirectURL ;?>'},<?php echo $this->fields->redirectSecond ;?>) | ||
</script> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -324,13 +324,15 @@ let ajaxComment = () =>{ | |
else | ||
{ | ||
afterSendComment(false); | ||
showToast('评论失败,' + newComment.querySelector('.container').innerHTML); | ||
let msg = newComment.querySelector('.container') ? newComment.querySelector('.container').innerHTML : newComment.childNodes[0].childNodes[0].childNodes[0].innerText; | ||
showToast('评论失败,' + msg.replaceAll('<br>', '')); | ||
} | ||
}) | ||
.catch((error) => { | ||
let newComment = document.createElement('div'); | ||
newComment.innerHTML = error; | ||
showToast('评论失败,' + newComment.querySelector('.container').innerHTML); | ||
let msg = newComment.querySelector('.container') ? newComment.querySelector('.container').innerHTML : newComment.childNodes[0].childNodes[0].childNodes[0].innerText; | ||
showToast('评论失败,' + msg.replaceAll('<br>', '')); | ||
}); | ||
return false; | ||
}; | ||
|
@@ -414,7 +416,7 @@ let doLazyload = () => { | |
let banners = document.getElementsByClassName("article-banner"); | ||
let pics = document.querySelectorAll("img:not(img#header-background,img#profile-avatar)"); | ||
preLazy(banners, "style", "origin"); | ||
preLazy(pics, "src", "origin", "https://cdn.jsdelivr.net/gh/youranreus/[email protected]/G/IMG/loading2.gif"); | ||
preLazy(pics, "src", "origin", window.G_CONFIG.imgUrl + "loading2.gif"); | ||
lazyload(banners, function (element, observe) { | ||
lazyBanner(element, observe); | ||
}); | ||
|
@@ -443,32 +445,32 @@ let sendLike = () => { | |
}); | ||
} | ||
|
||
window.onload = function () { | ||
console.log("G.js onload"); | ||
let pjax = new Pjax({ | ||
elements: "a:not(a[target='_blank'], a[no-pjax])", // default is "a[href], form[action]" | ||
selectors: ["#main", "title"], | ||
timeout: 10000, | ||
cacheBust: false, | ||
scrollRestoration: true | ||
}); | ||
|
||
if (document.getElementById("sliderbar-video") !== undefined && document.getElementById("sliderbar-video") !== null) { | ||
let photo = document.getElementById("sliderbar-photo"); | ||
let video = document.getElementById("sliderbar-video"); | ||
photo.style.height = document.querySelector('#categoryList').offsetHeight + 'px'; | ||
if (photo.offsetHeight >= photo.offsetWidth) | ||
video.style.height = photo.offsetHeight + 'px'; | ||
else | ||
video.style.height = photo.offsetWidth + 'px'; | ||
} | ||
else if (document.getElementById("sliderbar-photo")!== undefined && document.getElementById("sliderbar-photo") !== null){ | ||
document.getElementById("sliderbar-photo").style.height = document.querySelector('#categoryList').offsetHeight + 'px'; | ||
} | ||
autoDarkMode(); | ||
toolbarInit(); | ||
pageInit(); | ||
}; | ||
// window.onload = function () { | ||
// console.log("G.js onload"); | ||
// let pjax = new Pjax({ | ||
// elements: "a:not(a[target='_blank'], a[no-pjax])", // default is "a[href], form[action]" | ||
// selectors: ["#main", "title"], | ||
// timeout: 10000, | ||
// cacheBust: false, | ||
// scrollRestoration: true | ||
// }); | ||
|
||
// if (document.getElementById("sliderbar-video") !== undefined && document.getElementById("sliderbar-video") !== null) { | ||
// let photo = document.getElementById("sliderbar-photo"); | ||
// let video = document.getElementById("sliderbar-video"); | ||
// photo.style.height = document.querySelector('#categoryList').offsetHeight + 'px'; | ||
// if (photo.offsetHeight >= photo.offsetWidth) | ||
// video.style.height = photo.offsetHeight + 'px'; | ||
// else | ||
// video.style.height = photo.offsetWidth + 'px'; | ||
// } | ||
// else if (document.getElementById("sliderbar-photo")!== undefined && document.getElementById("sliderbar-photo") !== null){ | ||
// document.getElementById("sliderbar-photo").style.height = document.querySelector('#categoryList').offsetHeight + 'px'; | ||
// } | ||
// autoDarkMode(); | ||
// toolbarInit(); | ||
// pageInit(); | ||
// }; | ||
|
||
/** | ||
* pjax发送回调 | ||
|
@@ -515,6 +517,30 @@ document.addEventListener('pjax:complete', () => { | |
|
||
window.ready(function () { | ||
doLazyload(); | ||
console.log("G.js ready"); | ||
let pjax = new Pjax({ | ||
elements: "a:not(a[target='_blank'], a[no-pjax])", // default is "a[href], form[action]" | ||
selectors: ["#main", "title"], | ||
timeout: 10000, | ||
cacheBust: false, | ||
scrollRestoration: true | ||
}); | ||
|
||
if (document.getElementById("sliderbar-video") !== undefined && document.getElementById("sliderbar-video") !== null) { | ||
let photo = document.getElementById("sliderbar-photo"); | ||
let video = document.getElementById("sliderbar-video"); | ||
photo.style.height = document.querySelector('#categoryList').offsetHeight + 'px'; | ||
if (photo.offsetHeight >= photo.offsetWidth) | ||
video.style.height = photo.offsetHeight + 'px'; | ||
else | ||
video.style.height = photo.offsetWidth + 'px'; | ||
} | ||
else if (document.getElementById("sliderbar-photo")!== undefined && document.getElementById("sliderbar-photo") !== null){ | ||
document.getElementById("sliderbar-photo").style.height = document.querySelector('#categoryList').offsetHeight + 'px'; | ||
} | ||
autoDarkMode(); | ||
toolbarInit(); | ||
pageInit(); | ||
}); | ||
|
||
window.onbeforeunload = function () { | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.