From b50403dd328c744c8255df23f386f13446a2583e Mon Sep 17 00:00:00 2001 From: Leo Herzog Date: Tue, 30 Jun 2020 14:21:51 -0400 Subject: [PATCH] Add Dynamic Page Title --- bundle.js | 6 ++++++ index.html | 1 + parse.js | 6 ++++++ 3 files changed, 13 insertions(+) diff --git a/bundle.js b/bundle.js index 6ec8af0..d8a3134 100644 --- a/bundle.js +++ b/bundle.js @@ -12040,6 +12040,12 @@ function display() { window.location.hash = parser.toMagnetURI(parsed); + if (parsed.name) { + document.title = "Torrent Parts | " + parsed.name; + } else { + document.title = "Torrent Parts | Inspect and edit what's in your Torrent file or Magnet link"; + } + } function createFileRow(icon, name, size) { diff --git a/index.html b/index.html index 87c3b81..c1998ce 100644 --- a/index.html +++ b/index.html @@ -1,6 +1,7 @@ + Torrent Parts | Inspect and edit what's in your Torrent file or Magnet link diff --git a/parse.js b/parse.js index 37e4d36..85e4b42 100644 --- a/parse.js +++ b/parse.js @@ -154,6 +154,12 @@ function display() { window.location.hash = parser.toMagnetURI(parsed); + if (parsed.name) { + document.title = "Torrent Parts | " + parsed.name; + } else { + document.title = "Torrent Parts | Inspect and edit what's in your Torrent file or Magnet link"; + } + } function createFileRow(icon, name, size) {