google_http_warning2

Google検索結果でhttpは警告色で目立つようにする。(新デザイン用2020.1.15)

当前为 2020-01-16 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name google_http_warning2
  3. // @namespace https://catherine.v0cyc1pp.com/
  4. // @include https://www.google.co.jp/search?*
  5. // @include https://www.google.com/search?*
  6. // @author greg10
  7. // @run-at document-end
  8. // @license GPL 3.0
  9. // @version 0.3
  10. // @grant none
  11. // @description Google検索結果でhttpは警告色で目立つようにする。(新デザイン用2020.1.15)
  12. // ==/UserScript==
  13.  
  14. console.log("google_http_warning2 start");
  15.  
  16.  
  17. function sub() {
  18.  
  19. document.querySelectorAll(".r > a").forEach(function(elem) {
  20. var href = elem.href;
  21. if (href == "") return;
  22. var index = href.indexOf("https");
  23. if (index == 0) return;
  24. elem.style.color = "#dd0000";
  25. elem.style.backgroundColor = "#dddddd";
  26.  
  27. });
  28.  
  29.  
  30. document.querySelectorAll("cite").forEach(function(elem) {
  31. var parent = elem.parentNode;
  32. var img = parent.firstElementChild;
  33. var href = img.alt;
  34. if (href == "") return;
  35. var index = href.indexOf("https");
  36. if (index == 0) return;
  37. elem.style.color = "#dd0000";
  38. elem.style.backgroundColor = "#dddddd";
  39. });
  40.  
  41. }
  42.  
  43. function main() {
  44. sub();
  45. }
  46.  
  47.  
  48. main();
  49.  
  50.  

QingJ © 2025

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