更新
This commit is contained in:
parent
a6e28f92ec
commit
49aaf5899d
@ -398,7 +398,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
this.options = {
|
this.options = {
|
||||||
type: /^success$|^info$|^warning$|^error$/.test(this.getAttribute('type')) ? this.getAttribute('type') : 'info',
|
type: /^success$|^info$|^warning$|^error$/.test(this.getAttribute('type')) ? this.getAttribute('type') : 'info',
|
||||||
content: _temp.innerHTML.trim().replace(/^(<br>)|(<br>)$/g, '') || '警告提示'
|
content: _temp.innerHTML.trim().replace(/^(<br>)|(<br>)$/g, '') || '警告提示'
|
||||||
}
|
};
|
||||||
const htmlStr = `
|
const htmlStr = `
|
||||||
<div class="joe_alert ${this.options.type}">
|
<div class="joe_alert ${this.options.type}">
|
||||||
${this.options.content}
|
${this.options.content}
|
||||||
@ -537,10 +537,11 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this.bvid = this.getAttribute('bvid');
|
this.bvid = this.getAttribute('bvid');
|
||||||
|
this.page = this.getAttribute('page') && !Number.isNaN(this.getAttribute('page')) ? this.getAttribute('page') : 1;
|
||||||
this.render();
|
this.render();
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
if (this.bvid) this.innerHTML = `<iframe allowfullscreen="true" class="joe_vplayer" src="//player.bilibili.com/player.html?bvid=${this.bvid}"></iframe>`;
|
if (this.bvid) this.innerHTML = `<iframe allowfullscreen="true" class="joe_vplayer" src="//player.bilibili.com/player.html?bvid=${this.bvid}&page=${this.page}"></iframe>`;
|
||||||
else this.innerHTML = 'Bvid未填写!';
|
else this.innerHTML = 'Bvid未填写!';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
assets/js/joe.short.min.js
vendored
2
assets/js/joe.short.min.js
vendored
File diff suppressed because one or more lines are too long
@ -2,7 +2,7 @@
|
|||||||
/* 获取主题当前版本号 */
|
/* 获取主题当前版本号 */
|
||||||
function _getVersion()
|
function _getVersion()
|
||||||
{
|
{
|
||||||
return "7.1.4";
|
return "7.1.5";
|
||||||
};
|
};
|
||||||
|
|
||||||
/* 判断是否是手机 */
|
/* 判断是否是手机 */
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "typecho-joe-next",
|
"name": "typecho-joe-next",
|
||||||
"version": "7.1.4",
|
"version": "7.1.5",
|
||||||
"description": "A Theme Of Typecho",
|
"description": "A Theme Of Typecho",
|
||||||
"main": "index.php",
|
"main": "index.php",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -410,10 +410,15 @@ export default class JoeAction {
|
|||||||
<label>视频Bvid</label>
|
<label>视频Bvid</label>
|
||||||
<input autocomplete="off" name="bvid" placeholder="请输入视频Bvid"/>
|
<input autocomplete="off" name="bvid" placeholder="请输入视频Bvid"/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="fitem">
|
||||||
|
<label>视频选集</label>
|
||||||
|
<input autocomplete="off" name="page" placeholder="请输入视频选集"/>
|
||||||
|
</div>
|
||||||
`,
|
`,
|
||||||
confirm: () => {
|
confirm: () => {
|
||||||
const bvid = $(".cm-modal input[name='bvid']").val();
|
const bvid = $(".cm-modal input[name='bvid']").val();
|
||||||
const str = `\n{bilibili bvid="${bvid}"/}\n\n`;
|
const page = $(".cm-modal input[name='page']").val();
|
||||||
|
const str = `\n{bilibili bvid="${bvid}" page="${page}"/}\n\n`;
|
||||||
if (this._getLineCh(cm)) this._replaceSelection(cm, '\n' + str);
|
if (this._getLineCh(cm)) this._replaceSelection(cm, '\n' + str);
|
||||||
else this._replaceSelection(cm, str);
|
else this._replaceSelection(cm, str);
|
||||||
cm.focus();
|
cm.focus();
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user