feat: Add parameter to append danmuku library in artplayer-plugin-danmuku

This commit is contained in:
Harvey Zack committed 2024-06-04 21:59:55 +08:00
1 parent 390be821d6
commit 2d44d602e4
8 files changed
+86 -50

No files matched your search

@@ -8,7 +8,8 @@
if (codeElement) {
const libs = event.target.dataset.libs || '';
const code = encodeURIComponent(codeElement.innerText);
const env = 'https://artplayer.org';
const isDev = location.hostname === 'localhost';
const env = isDev ? 'http://localhost:8082' : 'https://artplayer.org';
const url = env + '/?libs=' + libs + '&code=' + code;
window.open(url);
}