Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zhennann/markdown

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zhennann/markdown - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

34

index.js

@@ -38,7 +38,7 @@ const markdown_it = require('markdown-it');

// element
const id = `aplayer-${(new Date()).getTime()}`;
const id = `aplayer-${(new Date()).getTime()}${idx}`;
// opening tag
return `<p><div id="${id}">
<script type="text/javascript">
function loadScript(src, callback) {
function __aplayerLoadScript(src, callback) {
if (!(typeof callback === 'function')) {

@@ -74,3 +74,3 @@ callback = function() {};

}
function loadLink(src, callback) {
function __aplayerLoadLink(src, callback) {
if (!(typeof callback === 'function')) {

@@ -102,6 +102,6 @@ callback = function() {};

}
function loadAplayer(callback){
function __aplayerLoadResource(callback){
if(window.APlayer) return callback();
loadLink('https://cdnjs.cloudflare.com/ajax/libs/aplayer/1.10.1/APlayer.min.css',function(){
loadScript('https://cdnjs.cloudflare.com/ajax/libs/aplayer/1.10.1/APlayer.min.js', function() {
__aplayerLoadLink('https://cdnjs.cloudflare.com/ajax/libs/aplayer/1.10.1/APlayer.min.css',function(){
__aplayerLoadScript('https://cdnjs.cloudflare.com/ajax/libs/aplayer/1.10.1/APlayer.min.js', function() {
return callback();

@@ -111,6 +111,6 @@ })

}
loadAplayer(function(){
var options = ${content};
function __aplayerLoad(id,options){
// options
if(!options.audio) return;
options.container = document.getElementById('${id}');
options.container = document.getElementById(id);
if(options.audio.concat){

@@ -123,4 +123,16 @@ for(var i=0;i<options.audio.length;i++){

}
new window.APlayer(options);
});
// queue
if(!window.__aplayerLoadQueue){
window.__aplayerLoadQueue=[options];
__aplayerLoadResource(function(){
for(var i=0;i<window.__aplayerLoadQueue.length;i++){
new window.APlayer(window.__aplayerLoadQueue[i]);
}
window.__aplayerLoadQueue=null;
});
}else{
window.__aplayerLoadQueue.push(options);
}
}
__aplayerLoad('${id}',${content});
</script>

@@ -127,0 +139,0 @@ `;

{
"name": "@zhennann/markdown",
"version": "1.0.3",
"version": "1.0.4",
"description": "markdown",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc