lizhiweike

荔枝微课浏览器全屏

  1. // ==UserScript==
  2. // @name lizhiweike
  3. // @namespace https://github.com/alanwhy
  4. // @version 0.0.1
  5. // @description 荔枝微课浏览器全屏
  6. // @author wuhaoyuan
  7. // @match *://*.lizhiweike.com/*
  8. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16.  
  17. setTimeout(()=>{
  18. var btn = document.createElement('div')
  19.  
  20. btn.innerText = "浏览器内全屏"
  21. btn.id = 'lizhi-why'
  22. btn.style.position = 'fixed'
  23. btn.style.top = '10px'
  24. btn.style.left = '10px'
  25. btn.style.zIndex = "999999"
  26. btn.style.background = "#fff"
  27. btn.style.padding = "5px 10px"
  28. btn.style.borderRadius = "5px"
  29. btn.style.border = "1px solid #999"
  30.  
  31. document.body.appendChild(btn)
  32.  
  33. btn.addEventListener('mouseenter',()=>{
  34. btn.style.background = "#ccc"
  35. btn.style.cursor = "pointer"
  36. })
  37.  
  38. btn.addEventListener('mouseleave',()=>{
  39. btn.style.background = "#fff"
  40. })
  41.  
  42. btn.onclick = function(){
  43. document.getElementById('App').style.maxWidth = "100%"
  44. document.getElementsByClassName('HeaderVideo-container')[0].style.height = "100vh"
  45. document.getElementsByClassName('CommentInput-container')[0].style.display = "none"
  46. document.getElementsByClassName('FloatingWindow-box-more')[0].style.display = "none"
  47.  
  48. btn.style.display = 'none'
  49. }
  50. },500)
  51. })();