Primewire Real Links

For PrimeWire, LetMeWatchThis, and OneChannel. If link text is missing, it will fill it so you can see which CDNs to click on. This will also strip out Promo / Sponsor hosts.

  1. // ==UserScript==
  2. // @name Primewire Real Links
  3. // @namespace nitrocode
  4. // @description For PrimeWire, LetMeWatchThis, and OneChannel. If link text is missing, it will fill it so you can see which CDNs to click on. This will also strip out Promo / Sponsor hosts.
  5. // @version 0.2
  6. // @include /^https?:\/\/(www\.)?primewire\.ag\/.*$/
  7. // @include /^https?:\/\/(www\.)?primewire\.is\/.*$/
  8. // @include /^https?:\/\/(www\.)?primewire\.org\/-.*$/
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. // Purposely did not use jquery because it didn't seem to work too well with FF
  13. // Only run script after the page has fully loaded
  14. window.addEventListener('load', function() {
  15. // grab all version_host class vars that hold the rocker script
  16. var links = document.querySelectorAll('.version_host');
  17. var link_text = "";
  18. var real_link_count = 0;
  19. for (var i=0; i<links.length; i++) {
  20. // cut up the string instead of eval'ing so it's safe
  21. link_text = links[i].innerHTML.substring(
  22. links[i].innerHTML.indexOf("'") + 1,
  23. links[i].innerHTML.lastIndexOf("'")
  24. );
  25. // Remove Promo Host and Sponsor Host
  26. if (!link_text.includes('Host')) {
  27. links[i].innerHTML = link_text;
  28. console.log('Found real link: ' + link_text);
  29. real_link_count++;
  30. } else {
  31. links[i].closest('table').remove();
  32. console.log('Removed: ' + link_text);
  33. }
  34. }
  35. console.log('Found ' + real_link_count + ' real links');
  36. }, false);