mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 20:30:53 +08:00
🐛 修復POST-META關閉閲讀分鐘和訪問量後,評論量前有分割線的bug
🐛 修復canvas_ribbon透明度變為1再變回預設值bug 🐛 修復當default_cover沒設置時,會出現無圖片的bug 🎨 部分js調整
This commit is contained in:
@@ -1,23 +1,24 @@
|
||||
"use strict";
|
||||
/**
|
||||
* Butterfly
|
||||
* Generate js and css according to user setting
|
||||
*/
|
||||
|
||||
hexo.extend.helper.register("my_html", function(type, data) {
|
||||
var result = "";
|
||||
var tag = type === "css" ? "css" : "script";
|
||||
'use strict'
|
||||
|
||||
hexo.extend.helper.register('my_html', function (type, data) {
|
||||
var result = ''
|
||||
var tag = type === 'css' ? 'css' : 'script'
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var src = data[i].split("||")[0].trim();
|
||||
var other = data[i].split("||")[1] ? data[i].split("||")[1].trim() : "";
|
||||
var src = data[i].split('||')[0].trim()
|
||||
var other = data[i].split('||')[1] ? data[i].split('||')[1].trim() : ''
|
||||
|
||||
if (tag === "css") {
|
||||
if (tag === 'css') {
|
||||
result +=
|
||||
'<link rel="stylesheet" href="' +
|
||||
this.url_for(src) +
|
||||
'" ' +
|
||||
other +
|
||||
">";
|
||||
'<link rel="stylesheet" href="' + this.url_for(src) + '" ' + other + '>'
|
||||
} else {
|
||||
result +=
|
||||
'<script src="' + this.url_for(src) + '" ' + other + "></script>";
|
||||
'<script src="' + this.url_for(src) + '" ' + other + '></script>'
|
||||
}
|
||||
}
|
||||
return result;
|
||||
});
|
||||
return result
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user