aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rw-r--r--_layouts/post.html10
-rw-r--r--torrent.html31
m---------vendor/webtorrent0
4 files changed, 2 insertions, 42 deletions
diff --git a/.gitmodules b/.gitmodules
index f169aba..6d301d9 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,6 +1,3 @@
[submodule "vendor/reveal.js"]
path = vendor/reveal.js
url = https://github.com/hakimel/reveal.js
-[submodule "vendor/webtorrent"]
- path = vendor/webtorrent
- url = https://github.com/webtorrent/webtorrent
diff --git a/_layouts/post.html b/_layouts/post.html
index 13dbf21..345f781 100644
--- a/_layouts/post.html
+++ b/_layouts/post.html
@@ -19,10 +19,7 @@ layout: default
</audio>
<div class="torrent-link">
- {% capture torrent-file %}{{ ogg | absolute_url | append: ".torrent" }}{% endcapture %}
- <a href="{{ torrent-file }}">torrent</a>
- |
- <a href="/torrent.html?torrent={{ torrent-file | uri_escape }}">online webtorrent</a>
+ <a href="{{ ogg | absolute_url | append: ".torrent" }}">torrent</a>
</div>
{% endif %}
@@ -33,10 +30,7 @@ layout: default
</video>
<div class="torrent-link">
- {% capture torrent-file %}{{ webm | absolute_url | append: ".torrent" }}{% endcapture %}
- <a href="{{ torrent-file }}">torrent</a>
- |
- <a href="/torrent.html?torrent={{ torrent-file | uri_escape }}">online webtorrent</a>
+ <a href="{{ webm | absolute_url | append: ".torrent" }}">torrent</a>
</div>
{% endif %}
diff --git a/torrent.html b/torrent.html
deleted file mode 100644
index 17e24ff..0000000
--- a/torrent.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="UTF-8">
- <link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
- <meta name="viewport" content="width=device-width, initial-scale=1" />
- <link rel="stylesheet" href="/styles.css" />
- <title>WebTorrent player - EuAndreh</title>
- <script src="/vendor/webtorrent/webtorrent.min.js"></script>
- </head>
- <body>
- <div id="output"></div>
- <div id="torrentLink"></div>
- <script>
- const params = new URLSearchParams(window.location.search);
- const torrentID = params.get("torrent"); // "https://webtorrent.io/torrents/sintel.torrent";
- document.querySelector("#torrentLink").innerHTML = `Downloading <a href=${torrentID}>${torrentID}</a>`;
-
- const client = new WebTorrent();
- client.add(torrentID, torrent =>
- torrent.files.forEach(file => file.appendTo("#output")));
- </script>
- <noscript>
- This page uses JavaScript for downloading with <a href="https://webtorrent.io/">WebTorrent</a>.
-
- <br />
-
- To view the content either enable JavaScript or download the torrent file directly (link in the URL).
- </noscript>
- </body>
-</html>
diff --git a/vendor/webtorrent b/vendor/webtorrent
deleted file mode 160000
-Subproject 2d78a30a72072b859336f8d9340398d6bb2169e