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