Skip to content

Commit

Permalink
Specifying the attributes to remove.
Browse files Browse the repository at this point in the history
nodeName comes out all lowercase, but keeping both just in ..case...
  • Loading branch information
cinderblockgames authored Jun 14, 2021
1 parent 30994ac commit 055f615
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cindr.musicPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,8 @@ const cindrM = new EventTarget();
if (clean) {
for (let index = node.attributes.length - 1; index >= 0; index--) {
const attr = node.attributes[index].nodeName;
if (attr.startsWith('data-cindr')) {
if (['data-cindrM-song-info', 'data-cindrM-song-meta',
'data-cindrm-song-info', 'data-cindrm-song-meta'].includes(attr)) {
node.removeAttribute(attr);
}
}
Expand Down

0 comments on commit 055f615

Please sign in to comment.