mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 17:50:54 +08:00
🏷️ 2.3.0發佈
This commit is contained in:
@@ -362,6 +362,21 @@ $(function () {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* PhotoFigcaption
|
||||
*/
|
||||
function addPhotoFigcaption () {
|
||||
var images = $('#article-container img')
|
||||
images.each(function (i, o) {
|
||||
var $this = $(o)
|
||||
if ($this.attr('alt')) {
|
||||
var t = $('<div class="img-alt is-center">' + $this.attr('alt') + '</div>')
|
||||
$this.after(t)
|
||||
}
|
||||
})
|
||||
}
|
||||
if (GLOBAL_CONFIG.isPhotoFigcaption) addPhotoFigcaption()
|
||||
|
||||
/**
|
||||
* justified-gallery 圖庫排版
|
||||
*/
|
||||
@@ -518,8 +533,8 @@ $(function () {
|
||||
}
|
||||
|
||||
var updateAnchor = function (anchor) {
|
||||
if (window.history.replaceState && anchor !== window.location.hash) {
|
||||
window.history.replaceState(undefined, undefined, anchor)
|
||||
if (anchor !== window.location.hash) {
|
||||
location.replace(window.location.href.split('#')[0] + anchor)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -758,19 +773,4 @@ $(function () {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* PhotoFigcaption
|
||||
*/
|
||||
function addPhotoFigcaption () {
|
||||
var images = $('#article-container img')
|
||||
images.each(function (i, o) {
|
||||
var $this = $(o)
|
||||
if ($this.attr('alt')) {
|
||||
var t = $('<div class="img-alt is-center">' + $this.attr('alt') + '</div>')
|
||||
$this.after(t)
|
||||
}
|
||||
})
|
||||
}
|
||||
if (GLOBAL_CONFIG.isPhotoFigcaption) addPhotoFigcaption()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user