BT - show links instead of clickbait titles

try to take over the world!

  1. // ==UserScript==
  2. // @name BT - show links instead of clickbait titles
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description try to take over the world!
  6. // @author johnnie johansen
  7. // @match https://www.bt.dk/*/*
  8. // @grant none
  9. // @require http://code.jquery.com/jquery-3.4.1.min.js
  10. // ==/UserScript==
  11.  
  12. var $ = window.$;
  13.  
  14. $(document).ready(function(){
  15. run();
  16. function run(){
  17. var links = '';
  18.  
  19. $('article').each(function(){
  20. let href = $(this).find('a').attr('href');
  21. $(this).hide();
  22. let title = href.replace('https://', "")
  23. .replace('www.','')
  24. .replace('bt.dk/', '')
  25. .replace('/', ': ');
  26.  
  27. links = links + "<p style='display:block;width:100%;border-left:3px solid #f0f;background:#222;'>"
  28. + "<a style='font-size:22px;color:#FFF;display:block;padding:5px;' href=" + href + ">" + title + "</a>"
  29. + "<p>";
  30. });
  31. $('.aptoma-box').html(links);
  32. };
  33. });