DailyWTF HTML comments shower

Shows the HTML comments in the article body

  1. // ==UserScript==
  2. // @name DailyWTF HTML comments shower
  3. // @description Shows the HTML comments in the article body
  4. // @include https://thedailywtf.com/Articles/*
  5. // @include http://thedailywtf.com/Articles/*
  6. // @version 1.4
  7. // @namespace https://gf.qytechs.cn/users/6282
  8. // ==/UserScript==
  9.  
  10. // 1.1 @namespace http://www.pathofexile.com/passive-skill-tree/
  11. // 1.1 https://gf.qytechs.cn/en/scripts/5238-dailywtf-html-comments-shower
  12.  
  13. // 1.0 http://thedailywtf.com/Articles/Connected-to-the-Connector-to-the-Connection-to-the-System.aspx
  14.  
  15. // 0.3 @namespace niet.us
  16. // 0.3 @Author Daan <daan@niet.us>
  17. // 0.3 Cornify Highlights
  18. // 0.3 http://userscripts-mirror.org/scripts/show/142086
  19.  
  20. // Select main area
  21. var b = document.querySelector('#articlePage,#article-page');
  22.  
  23. // Show comments in red
  24. b.innerHTML=b.innerHTML.replace(/<!--/g,'<span style="color:red;">').replace(/-->/g,'</span>');
  25.  
  26. // Highlight cornification spans
  27. var spans = b.getElementsByTagName('span');
  28. if (spans.length > 0)
  29. {
  30. for (var i = 0; i < spans.length; i++)
  31. {
  32. if (spans[i].title == 'click me!')
  33. {
  34. spans[i].style.color = '#FFFFFF';
  35. spans[i].style.backgroundColor = '#E01B6A';
  36. spans[i].style.outline = '1px dotted #E01B6A';
  37. }
  38. }
  39. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址