From c098417454fa0ac2988985f896ff5c27b8448b33 Mon Sep 17 00:00:00 2001 From: dixyes Date: Fri, 20 Oct 2017 21:32:37 +0800 Subject: [PATCH] fix some bug, disable map copy --- index.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index b7b3300..f0e17a6 100644 --- a/index.js +++ b/index.js @@ -17,7 +17,7 @@ const fs = require('hexo-fs'), ['DPlayer.min.css', styleDir], ['DPlayer.min.js', scriptDir], // some map for debug use - ['DPlayer.min.css.map', styleDir], + //['DPlayer.min.css.map', styleDir], //['DPlayer.min.js.map', scriptDir], // if there be any other dplayer file //['someDplayerFile.xxx', targetDir], @@ -89,7 +89,7 @@ hexo.extend.tag.register('dplayer', function(args) { var id = 'dplayer' + (counter++); args.forEach(item => { const k = item.split('=')[0], - v = item.split('=').length === 1 || item.split('=')[1]; + v = item.split('=').length === 1 || item.slice(item.indexOf('=')+1); switch(k){ case 'autoplay': autoplay = v == "true" | v === "yes" | v === "1" | v === true; @@ -172,7 +172,7 @@ hexo.extend.tag.register('dplayer', function(args) { id: did, token: token, maximum: maximum, - addition: (addition == undefined ? undefined : [addition] ) + addition: (addition == undefined ? undefined : [addition] ) }) }).replace("\"document.getElementById('')\"",'document.getElementById("'+ id +'")') + ');'; diff --git a/package.json b/package.json index 6ed25e7..7339ec2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-tag-dplayer", - "version": "0.2.0", + "version": "0.2.1", "description": "Embed dplayer in Hexo posts/pages", "main": "index.js", "scripts": {