Skip to content

Commit

Permalink
prevent buttons from submitting forms
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Feb 9, 2017
1 parent 3d64d42 commit d381582
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions dist/APlayer.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/APlayer.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aplayer",
"version": "1.5.8",
"version": "1.5.9",
"description": "Wow, such a beautiful html5 music player",
"main": "dist/APlayer.min.js",
"scripts": {
Expand Down
14 changes: 7 additions & 7 deletions src/APlayer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
console.log("\n %c APlayer 1.5.8 %c http://aplayer.js.org \n\n","color: #fadfa3; background: #030307; padding:5px 0;","background: #fadfa3; padding:5px 0;");
console.log("\n %c APlayer 1.5.9 %c http://aplayer.js.org \n\n","color: #fadfa3; background: #030307; padding:5px 0;","background: #fadfa3; padding:5px 0;");

require('./APlayer.scss');

Expand Down Expand Up @@ -156,7 +156,7 @@ class APlayer {
let eleHTML = `
<div class="aplayer-pic" ${(this.music.pic ? (`style="background-image: url('${this.music.pic}');"`) : ``)}>
<div class="aplayer-button aplayer-play">
<button class="aplayer-icon aplayer-icon-play">`
<button type="button" class="aplayer-icon aplayer-icon-play">`
+ this.getSVG('play')
+ ` </button>
</div>
Expand All @@ -183,7 +183,7 @@ class APlayer {
- <span class="aplayer-ptime">00:00</span> / <span class="aplayer-dtime">00:00</span>
</span>
<div class="aplayer-volume-wrap">
<button class="aplayer-icon aplayer-icon-volume-down" ${this.isMobile ? 'style="display: none;"' : ''}>`
<button type="button" class="aplayer-icon aplayer-icon-volume-down" ${this.isMobile ? 'style="display: none;"' : ''}>`
+ this.getSVG('volume-down')
+ ` </button>
<div class="aplayer-volume-bar-wrap">
Expand All @@ -192,10 +192,10 @@ class APlayer {
</div>
</div>
</div>
<button class="aplayer-icon aplayer-icon-mode">`
<button type="button" class="aplayer-icon aplayer-icon-mode">`
+ this.getSVG(this.mode)
+ ` </button>
${(this.multiple ? `<button class="aplayer-icon aplayer-icon-menu">`
${(this.multiple ? `<button type="button" class="aplayer-icon aplayer-icon-menu">`
+ this.getSVG('menu')
+ ` </button>` : ``)}
</div>
Expand Down Expand Up @@ -485,7 +485,7 @@ class APlayer {
this.button.innerHTML = '';
setTimeout(() => {
this.button.innerHTML = `
<button class="aplayer-icon aplayer-icon-pause">`
<button type="button" class="aplayer-icon aplayer-icon-pause">`
+ this.getSVG('pause')
+ ` </button>`;
}, 100);
Expand Down Expand Up @@ -521,7 +521,7 @@ class APlayer {
this.button.innerHTML = '';
setTimeout(() => {
this.button.innerHTML = `
<button class="aplayer-icon aplayer-icon-play">`
<button type="button" class="aplayer-icon aplayer-icon-play">`
+ this.getSVG('play')
+ ` </button>`;
}, 100);
Expand Down

0 comments on commit d381582

Please sign in to comment.