Editing User:Toad64/SandboxGive feedback
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 6: | Line 6: | ||
// In your Common.js | // In your Common.js | ||
$(document).ready(function() { | $(document).ready(function() { | ||
// Find every native audio player generated by the wiki | |||
$('audio').each(function() { | $('audio').each(function() { | ||
// Create your custom component | |||
const | const myPlayer = document.createElement('audio-player'); | ||
// | // Transfer the source | ||
myPlayer.setAttribute('track', $(this).attr('src')); | |||
// Replace the native player with your custom one | |||
$(this).replaceWith(myPlayer); | |||
}); | }); | ||
}); | }); | ||
| Line 60: | Line 55: | ||
border: none; | border: none; | ||
border-radius: 50%; | border-radius: 50%; | ||
background: var(--background-color-interactive); | background: var(--background-color-interactive); | ||
| Line 69: | Line 61: | ||
} | } | ||
.seek { | .seek { | ||
flex: 1; | flex: 1; | ||
| Line 109: | Line 96: | ||
cursor: pointer; | cursor: pointer; | ||
} | } | ||
.time { | .time { | ||
font-size: 12px; | font-size: 12px; | ||