mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
remove clipboard permission prompt (#176)
This commit is contained in:
@@ -482,9 +482,17 @@ export default function landingTemplate(manifest, config = {}) {
|
|||||||
.map(([key, value]) => key)[0] || configurationValue;
|
.map(([key, value]) => key)[0] || configurationValue;
|
||||||
const configuration = configurationValue && configurationValue.length ? '/' + configurationValue : '';
|
const configuration = configurationValue && configurationValue.length ? '/' + configurationValue : '';
|
||||||
const location = window.location.host + configuration + '/manifest.json'
|
const location = window.location.host + configuration + '/manifest.json'
|
||||||
navigator.clipboard.writeText('https://' + location);
|
|
||||||
installLink.href = 'stremio://' + location;
|
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');
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user