mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
fix install link copy functionality
This commit is contained in:
@@ -485,13 +485,8 @@ export default function landingTemplate(manifest, config = {}) {
|
||||
installLink.href = 'stremio://' + location;
|
||||
}
|
||||
|
||||
installLink.addEventListener('click', ()=>{
|
||||
document.addEventListener('copy', function(e) {
|
||||
e.clipboardData.setData('text/plain', installLink.href);
|
||||
e.preventDefault();
|
||||
}, true);
|
||||
|
||||
document.execCommand('copy');
|
||||
installLink.addEventListener('click', function() {
|
||||
navigator.clipboard.writeText(installLink.href.replace('stremio://', 'https://'));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user