diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-09-13 17:29:35 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-09-13 17:29:35 +0200 |
| commit | 06b7617a863d00dbcc91d1e46f09942c6aad366e (patch) | |
| tree | 6824426ab489c5cede29e1de63b8050dfeb47e8e /extension/tada.js | |
| parent | ec4adc33ec00dfe4a5720a13551428aaddaf72d9 (diff) | |
Refactor content script
Diffstat (limited to 'extension/tada.js')
| -rw-r--r-- | extension/tada.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/extension/tada.js b/extension/tada.js new file mode 100644 index 0000000..5898aea --- /dev/null +++ b/extension/tada.js @@ -0,0 +1,8 @@ +export function initializeTada(source) { + const audioElement = document.createElement("audio"); + audioElement.setAttribute("class", "junction-tada"); + audioElement.src = source; + document.querySelector("body").appendChild(audioElement); + + return () => audioElement.play(); +} |