mirror of https://github.com/vtrois/kratos
feat: optimiz the bilibili citation method (#253)
parent
5323ba1f1f
commit
ef4697fce6
|
@ -277,7 +277,7 @@
|
||||||
title: '哔哩哔哩',
|
title: '哔哩哔哩',
|
||||||
image: url + '/images/bilibili.png',
|
image: url + '/images/bilibili.png',
|
||||||
onclick: function () {
|
onclick: function () {
|
||||||
ed.selection.setContent('[bilibili cid=""]' + ed.selection.getContent() + '[/bilibili]')
|
ed.selection.setContent('[bilibili]' + ed.selection.getContent() + '[/bilibili]')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -168,10 +168,7 @@ add_shortcode('youtube', 'youtube');
|
||||||
|
|
||||||
function bilibili($atts, $content = null, $code = "")
|
function bilibili($atts, $content = null, $code = "")
|
||||||
{
|
{
|
||||||
extract(shortcode_atts(array("cid" => 'cid'), $atts));
|
$return = '<div class="video-container"><iframe src="//player.bilibili.com/player.html?bvid=';
|
||||||
$return = '<div class="video-container"><iframe src="//player.bilibili.com/player.html?cid=';
|
|
||||||
$return .= $cid;
|
|
||||||
$return .= '&aid=';
|
|
||||||
$return .= $content;
|
$return .= $content;
|
||||||
$return .= '&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe></div>';
|
$return .= '&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe></div>';
|
||||||
return $return;
|
return $return;
|
||||||
|
|
Loading…
Reference in New Issue