Skip to content

Commit

Permalink
feat: config string now sent to console when copy/install button clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
g0ldyy committed Jul 18, 2024
1 parent aaeb97a commit 9f46fa9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions comet/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -646,21 +646,26 @@

copyLinkButton.addEventListener("click", () => {
const settings = getSettings();
const settingsString = btoa(JSON.stringify(settings))

const textArea = document.createElement("textarea");
textArea.value = `${window.location.origin}/${btoa(JSON.stringify(settings))}/manifest.json`;
textArea.value = `${window.location.origin}/${settingsString}/manifest.json`;
document.body.appendChild(textArea);
textArea.focus();
textArea.select();
document.execCommand("copy");
document.body.removeChild(textArea);

console.log(settingsString);

copyAlert.toast();
});

installButton.addEventListener("click", () => {
const settings = getSettings();
window.location.href = `stremio://${window.location.host}/${btoa(JSON.stringify(settings))}/manifest.json`;
const settingsString = btoa(JSON.stringify(settings))
window.location.href = `stremio://${window.location.host}/${settingsString}/manifest.json`;
console.log(settingsString);
installAlert.toast();
});
</script>
Expand Down

0 comments on commit 9f46fa9

Please sign in to comment.