mirror of
https://github.com/leoherzog/TorrentParts.git
synced 2026-01-24 04:08:04 -08:00
Add Source Setting to Example Button
This commit is contained in:
@@ -62726,12 +62726,18 @@ function start() {
|
|||||||
example1.addEventListener('click', function(event) {
|
example1.addEventListener('click', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
notyf.success("Parsing Ubuntu 20.04 Magnet URL");
|
notyf.success("Parsing Ubuntu 20.04 Magnet URL");
|
||||||
|
source = "magnet";
|
||||||
|
originalSourceIcon.innerHTML = '<span class="fad fa-magnet fa-fw"></span>';
|
||||||
|
sourceTooltip.setContent("Currently loaded information sourced from Magnet URL");
|
||||||
parse("magnet:?xt=urn:btih:9fc20b9e98ea98b4a35e6223041a5ef94ea27809&dn=ubuntu-20.04-desktop-amd64.iso&tr=https%3A%2F%2Ftorrent.ubuntu.com%2Fannounce&tr=https%3A%2F%2Fipv6.torrent.ubuntu.com%2Fannounce");
|
parse("magnet:?xt=urn:btih:9fc20b9e98ea98b4a35e6223041a5ef94ea27809&dn=ubuntu-20.04-desktop-amd64.iso&tr=https%3A%2F%2Ftorrent.ubuntu.com%2Fannounce&tr=https%3A%2F%2Fipv6.torrent.ubuntu.com%2Fannounce");
|
||||||
});
|
});
|
||||||
|
|
||||||
example2.addEventListener('click', async function(event) {
|
example2.addEventListener('click', async function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
notyf.success("Fetching and Parsing “The WIRED CD” Torrent File...");
|
notyf.success("Fetching and Parsing “The WIRED CD” Torrent File...");
|
||||||
|
source = "remote-torrent-file";
|
||||||
|
originalSourceIcon.innerHTML = '<span class="fad fa-file-alt fa-fw"></span>';
|
||||||
|
sourceTooltip.setContent("Currently loaded information sourced from remotely fetched Torrent file");
|
||||||
parseRemote("https://webtorrent.io/torrents/wired-cd.torrent");
|
parseRemote("https://webtorrent.io/torrents/wired-cd.torrent");
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -62740,6 +62746,9 @@ function start() {
|
|||||||
notyf.success("Parsing Jack Johnson Archive.org Torrent File");
|
notyf.success("Parsing Jack Johnson Archive.org Torrent File");
|
||||||
let response = await fetch("/ext/jj2008-06-14.mk4_archive.torrent");
|
let response = await fetch("/ext/jj2008-06-14.mk4_archive.torrent");
|
||||||
let arrayBuffer = await response.arrayBuffer();
|
let arrayBuffer = await response.arrayBuffer();
|
||||||
|
source = "torrent-file";
|
||||||
|
originalSourceIcon.innerHTML = '<span class="fad fa-file-alt fa-fw"></span>';
|
||||||
|
sourceTooltip.setContent("Currently loaded information sourced from Torrent file");
|
||||||
parse(Buffer.from(arrayBuffer));
|
parse(Buffer.from(arrayBuffer));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
2
bin/bundle.min.js
vendored
2
bin/bundle.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -120,12 +120,18 @@ function start() {
|
|||||||
example1.addEventListener('click', function(event) {
|
example1.addEventListener('click', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
notyf.success("Parsing Ubuntu 20.04 Magnet URL");
|
notyf.success("Parsing Ubuntu 20.04 Magnet URL");
|
||||||
|
source = "magnet";
|
||||||
|
originalSourceIcon.innerHTML = '<span class="fad fa-magnet fa-fw"></span>';
|
||||||
|
sourceTooltip.setContent("Currently loaded information sourced from Magnet URL");
|
||||||
parse("magnet:?xt=urn:btih:9fc20b9e98ea98b4a35e6223041a5ef94ea27809&dn=ubuntu-20.04-desktop-amd64.iso&tr=https%3A%2F%2Ftorrent.ubuntu.com%2Fannounce&tr=https%3A%2F%2Fipv6.torrent.ubuntu.com%2Fannounce");
|
parse("magnet:?xt=urn:btih:9fc20b9e98ea98b4a35e6223041a5ef94ea27809&dn=ubuntu-20.04-desktop-amd64.iso&tr=https%3A%2F%2Ftorrent.ubuntu.com%2Fannounce&tr=https%3A%2F%2Fipv6.torrent.ubuntu.com%2Fannounce");
|
||||||
});
|
});
|
||||||
|
|
||||||
example2.addEventListener('click', async function(event) {
|
example2.addEventListener('click', async function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
notyf.success("Fetching and Parsing “The WIRED CD” Torrent File...");
|
notyf.success("Fetching and Parsing “The WIRED CD” Torrent File...");
|
||||||
|
source = "remote-torrent-file";
|
||||||
|
originalSourceIcon.innerHTML = '<span class="fad fa-file-alt fa-fw"></span>';
|
||||||
|
sourceTooltip.setContent("Currently loaded information sourced from remotely fetched Torrent file");
|
||||||
parseRemote("https://webtorrent.io/torrents/wired-cd.torrent");
|
parseRemote("https://webtorrent.io/torrents/wired-cd.torrent");
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -134,6 +140,9 @@ function start() {
|
|||||||
notyf.success("Parsing Jack Johnson Archive.org Torrent File");
|
notyf.success("Parsing Jack Johnson Archive.org Torrent File");
|
||||||
let response = await fetch("/ext/jj2008-06-14.mk4_archive.torrent");
|
let response = await fetch("/ext/jj2008-06-14.mk4_archive.torrent");
|
||||||
let arrayBuffer = await response.arrayBuffer();
|
let arrayBuffer = await response.arrayBuffer();
|
||||||
|
source = "torrent-file";
|
||||||
|
originalSourceIcon.innerHTML = '<span class="fad fa-file-alt fa-fw"></span>';
|
||||||
|
sourceTooltip.setContent("Currently loaded information sourced from Torrent file");
|
||||||
parse(Buffer.from(arrayBuffer));
|
parse(Buffer.from(arrayBuffer));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user