GreenLunar / IKWYD Linkify

// ==UserScript== 
// @name        IKWYD Linkify
// @author      GreenLunar
// @namespace   org.openuserjs.GreenLunar.iknowwhatyoudownload
// @homepageURL https://openuserjs.org/scripts/GreenLunar/IKWYD_Linkify
// @supportURL  https://openuserjs.org/scripts/GreenLunar/IKWYD_Linkify/issues 
// @updateURL   https://openuserjs.org/meta/GreenLunar/IKWYD_Linkify.meta.js 
// @copyright   GreenLunar
// @license     MIT; https://opensource.org/licenses/MIT
// @description Place links to torrent indexer directly from "I Know What You Download" pages.
// @include     https://iknowwhatyoudownload.com/*/torrent/*
// @include     https://iknowwhatyoudownload.com/*/peer/?ip=*
// @version     1.0.1
// @run-at      document-end
// @noframes
// @icon        data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAABbGlDQ1BpY2MAACiRdZG9S0JRGMZ/amGU4VBDRIODRYNCJERj2eAiIWaQ1aLXr0Dtcq8S0hq0NAgNUUtfQ/9BrUFrQRAUQURbe19LyO09Kiih53Du++O553l573PBHs5rBbNnDgrFkhENBT0r8VWP8x07TtkBfAnN1OcjkTBd188jNlUf/KpX93sd10AqbWpg6xOe0XSjJCzTEN4q6Yr3hIe1XCIlfCLsM2RA4VulJxv8pjjb4C/FRiy6AHbV05Nt42QbazmjIDwp7C3ky1pzHvUlrnRxeUnqqJwxTKKECOIhSZkN8pTwSy1KZp19U3XfIpvi0eSpU8EQR5aceH2ilqVrWmpG9LTsPBWV+/88zUxgutHdFYTeV8v6HAfnPtSqlvV7alm1M3C8wHWx5d+UnGa/Ra+2NO8xuHfg8qalJQ/gahdGnvWEkahLDjn2TAY+LmAwDkP30L/WyKr5nvMniG3LL7qDwyOYkPvu9T8jxGgash1T5AAAAAlwSFlzAAAN1gAADdYBkG95nAAAIABJREFUeF7tXQd4VFUWPsmkQkgPIYQSOmggIF1AsSFKUUGqru7asYNlde0N24rCqrs2dm2oILouqIhrpSOggCIgLRCSkF5IIZOy/38nE4YwM+/Ne29CcQ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u2H3rKZAeOM2TjgCcMMdKCMgCFZ4kuA2Qe6QjBJt8YTSCzoThY4YtMsz29Ymq82zFvdZs7oTngDcEARN0eQITHeXUl9IECQUuvXAl0siUMhJXI+cjKahIobx2VzZvEuJtndGR6fXl+wTga1rYt3lgf8BxpEcfbm3gtEAAAAASUVORK5CYII=
// ==/UserScript==

if (location.pathname.includes('torrent')) {

  // TODO Configuration to select a provider
  indexer = 'https://btdig.com/search?order=0&q='
  message = 'Click on any of the listed filenames below to look \
             up for via torrent indexer.  Looking up for common \
             filenames (e.g. README.md) is lesser effective.'
  
  // get torrent name
  element = document.getElementById('title');
  title = element.outerText;
  
  // correct torrent name
  if (document.querySelector('.media')) {
    title = title.slice(
      title.indexOf('(')+1,
      title.lastIndexOf(')')
    );
  }
  
  // replace title by hyperlink
  link = document.createElement('a');
  link.href = indexer + title;
  link.innerHTML = title;
  element.replaceWith(link);
  
  list = document.querySelectorAll('td[title]').length;
  for (const item of document.querySelectorAll('.panel-heading')) {
    if (item.innerHTML == 'Files List') {
      item.innerHTML = `Listing ${list} Files`;
    }
  }
  
  // skim file items
  for (const item of document.querySelectorAll('td[title]')) {
    if (!i) { var i = 1 };
    //i = i + 1;
    link = document.createElement('a');
    title = item.innerHTML;
    link.href = indexer + title;
    link.innerHTML = title;
    //item.innerHTML = i + '. ';
    item.innerHTML = `${i++}. `;
    //item.parentNode.replaceChild(link, item);
    item.append(link);
  }
  
  info = document.querySelector('[colspan="2"]');
  info.innerHTML = message;

}

if (location.pathname.includes('peer')) {

  // Remove distracting labels and noninformative torrents
  for (const item of document.querySelectorAll('.danger, .label-danger, .label-info')) {
    item.remove();
  }

}

// Remove link "Follow Us"
document.querySelector('#footer').remove();