mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
add copy to clipboard on clickin install
This commit is contained in:
@@ -130,10 +130,10 @@ button:active {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.contact {
|
.contact {
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 4vh;
|
bottom: 4vh;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
margin-top: 1vh;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,11 +208,6 @@ function landingTemplate(manifest, config = {}) {
|
|||||||
|
|
||||||
const background = manifest.background || 'https://dl.strem.io/addon-background.jpg';
|
const background = manifest.background || 'https://dl.strem.io/addon-background.jpg';
|
||||||
const logo = manifest.logo || 'https://dl.strem.io/addon-logo.png';
|
const logo = manifest.logo || 'https://dl.strem.io/addon-logo.png';
|
||||||
const contactHTML = manifest.contactEmail ?
|
|
||||||
`<div class="contact">
|
|
||||||
<p>Contact ${manifest.name} creator:</p>
|
|
||||||
<a href="mailto:${manifest.contactEmail}">${manifest.contactEmail}</a>
|
|
||||||
</div>` : '<div class="separator"></div>';
|
|
||||||
const providersHTML = Providers.options
|
const providersHTML = Providers.options
|
||||||
.map(provider => `<option value="${provider.key}">${provider.foreign || ''}${provider.label}</option>`)
|
.map(provider => `<option value="${provider.key}">${provider.foreign || ''}${provider.label}</option>`)
|
||||||
.join('\n');
|
.join('\n');
|
||||||
@@ -346,7 +341,11 @@ function landingTemplate(manifest, config = {}) {
|
|||||||
<a id="installLink" class="install-link" href="#">
|
<a id="installLink" class="install-link" href="#">
|
||||||
<button name="Install">INSTALL</button>
|
<button name="Install">INSTALL</button>
|
||||||
</a>
|
</a>
|
||||||
${contactHTML}
|
<div class="contact">
|
||||||
|
<p>Or paste into Stremio search bar after clicking install</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="separator"></div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
@@ -452,7 +451,9 @@ function landingTemplate(manifest, config = {}) {
|
|||||||
.filter(([key, value]) => value === configurationValue)
|
.filter(([key, value]) => value === configurationValue)
|
||||||
.map(([key, value]) => key)[0] || configurationValue;
|
.map(([key, value]) => key)[0] || configurationValue;
|
||||||
const configuration = configurationValue && configurationValue.length ? '/' + configurationValue : '';
|
const configuration = configurationValue && configurationValue.length ? '/' + configurationValue : '';
|
||||||
installLink.href = 'stremio://' + window.location.host + configuration + '/manifest.json';
|
const location = window.location.host + configuration + '/manifest.json'
|
||||||
|
navigator.clipboard.writeText('https://' + location);
|
||||||
|
installLink.href = 'stremio://' + location;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user