Files
ArtPlayer/packages/artplayer/src/contextmenu/version.js
T
Harvey Zack 7e7bd8c0ad Refactor version display in context menu and clean up versioning format
- Updated the context menu version function to dynamically append the application version to the link and include a ref parameter in the URL.
- Removed the build version log from the initialization logs in the Artplayer class.
- Cleaned up the version and environment getters to return unquoted strings.
2025-06-20 10:18:39 +08:00

14 lines
443 B
JavaScript

export default function version(option) {
return {
...option,
html: `<a href="https://artplayer.org" target="_blank">ArtPlayer</a>`,
mounted(el) {
const link = el.querySelector('a');
const version = this.constructor.version;
const ref = encodeURIComponent(location.href);
link.textContent += ` ${version}`;
link.href += `?ref=${ref}`;
},
};
}