yahoomailjp_url_security2

YahooJPメールでURLリンクと表示URLが異なる場合にフィッシング詐欺の可能性があるため色を警告色に変更します。

  1. // ==UserScript==
  2. // @name yahoomailjp_url_security2
  3. // @namespace http://catherine.v0cyc1pp.com/yahoomailjp_url_security2.user.js
  4. // @include http://*.mail.yahoo.co.jp/*
  5. // @include https://*.mail.yahoo.co.jp/*
  6. // @version 1.0
  7. // @author greg10
  8. // @license GPL 3.0
  9. // @require http://code.jquery.com/jquery-3.1.1.min.js
  10. // @grant none
  11. // @description YahooJPメールでURLリンクと表示URLが異なる場合にフィッシング詐欺の可能性があるため色を警告色に変更します。
  12. // ==/UserScript==
  13.  
  14.  
  15. function main(){
  16. $(".msg-body").find("a").each( function() {
  17. var strtext = $(this).text();
  18. var strhref = $(this).attr('href');
  19. if ( strtext.indexOf(".") !== -1 ) {
  20. if ( strhref.indexOf(strtext) === -1 ) {
  21. $(this).attr("style", "color: black; background-color:red;");
  22. }
  23. }
  24. });
  25.  
  26. }
  27.  
  28. main();
  29.  
  30.  
  31. var observer = new MutationObserver(function(mutations) {
  32. observer.disconnect();
  33. main();
  34. observer.observe( document, config);
  35. });
  36.  
  37. var config = { attributes: true, childList: true, characterData: true, subtree:true };
  38.  
  39. observer.observe( document, config);