mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 14:41:20 -08:00
feat(contextmenu): enhance version link with referrer URL for better tracking
This commit is contained in:
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>`,
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user