Web Weixin Helper

make web weixin fullscreen

  1. // ==UserScript==
  2. // @name Web Weixin Helper
  3. // @namespace http://creamidea.github.io/
  4. // @version 0.0.1
  5. // @description make web weixin fullscreen
  6. // @author creamidea
  7. // @license MIT License (Expat)
  8. // @email creamidea@gmail.com
  9. // @match https://wx.qq.com/*
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function () {
  14. var timer
  15.  
  16. function resize() {
  17. $('.main').css({
  18. 'paddingTop': 0,
  19. 'height': '100%'
  20. }).find('.main_inner').css({
  21. 'maxWidth': $('body').width()
  22. })
  23. }
  24.  
  25. $(window).on('resize', resize)
  26.  
  27. resize()
  28. timer = setInterval(function () {
  29. if ( $('.main').css('paddingTop') === 0 ) {
  30. resize()
  31. clearInterval(timer)
  32. }
  33. }, 1000)
  34.  
  35. })()