隐藏outlook右侧google广告

隐藏outlook右侧显示的广告

  1. // ==UserScript==
  2. // @name Hide outlook google ad
  3. // @name:zh-CN 隐藏outlook右侧google广告
  4. // @namespace vince.outlook
  5. // @version 1.1
  6. // @description hide outlook google ad
  7. // @description:zh-CN 隐藏outlook右侧显示的广告
  8. // @author vince ding
  9. // @match https://outlook.live.com/*
  10. // ==/UserScript==
  11.  
  12. function closeAd(){
  13. var css = '._n_h,#app > div >div:last-child>div>div>div:last-child { display: none!important; }\r\n#primaryContainer>div:last-child{width:100%!important;}',
  14. head = document.head || document.getElementsByTagName('head')[0],
  15. style = document.createElement('style');
  16.  
  17. style.type = 'text/css';
  18. if (style.styleSheet){
  19. style.styleSheet.cssText = css;
  20. } else {
  21. style.appendChild(document.createTextNode(css));
  22. }
  23.  
  24. head.appendChild(style);
  25. }
  26.  
  27. closeAd();