feat(contextmenu): enhance version link with referrer URL for better tracking

This commit is contained in:
Harvey Zhao committed 2026-03-02 17:39:47 +08:00
1 parent 88de2ae9e6
commit bad7892660
3 files changed
+12 -8

No files matched your search

@@ -1,8 +1,10 @@
import { version } from '../../package.json'
import { version } from "../../package.json";
import { isBrowser } from "../utils/compatibility";
export default function (option) {
return {
...option,
html: `<a href="https://artplayer.org" target="_blank" style="width:100%;">ArtPlayer ${version}</a>`,
}
const url = isBrowser ? location.href : "";
return {
...option,
html: `<a href="https://artplayer.org?ref=${encodeURIComponent(url)}" target="_blank" style="width:100%;">ArtPlayer ${version}</a>`,
};
}