Skip to content

Commit

Permalink
优化与APlayer插件的兼容问题
Browse files Browse the repository at this point in the history
  • Loading branch information
DT27 committed Jul 24, 2018
1 parent 1a0f790 commit ce45594
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
23 changes: 20 additions & 3 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*
* @package EditorMD
* @author DT27
* @version 1.3.0
* @link https://dt27.org
* @version 1.4.0
* @link https://dt27.org/php/editormd-for-typecho/
*/
class EditorMD_Plugin implements Typecho_Plugin_Interface
{
Expand Down Expand Up @@ -368,7 +368,24 @@ public static function footerJS($conent)
},
});
emojify.run();
<?php } ?>
<?php }
if(isset(Typecho_Widget::widget('Widget_Options')->plugins['activated']['APlayer'])){
?>
var len = aPlayerOptions.length;
for(var ii=0;ii<len;ii++){
aPlayers[ii] = new APlayer({
element: document.getElementById('player' + aPlayerOptions[ii]['id']),
narrow: false,
autoplay: aPlayerOptions[ii]['autoplay'],
showlrc: aPlayerOptions[ii]['showlrc'],
music: aPlayerOptions[ii]['music'],
theme: aPlayerOptions[ii]['theme']
});
aPlayers[ii].init();
}
<?php
}
?>
});
</script>
<?php
Expand Down
Loading

0 comments on commit ce45594

Please sign in to comment.