To learn more faster and efficiently
当前为
This script is designed for use with Tampermonkey and is intended to automatically play videos on https://iedu.foxconn.com/*. It ensures that the video stays in focus and replays if paused, aiding in learning more efficiently.
The script includes functionality to keep the window always in focus. This is achieved by:
window.onblur to null to prevent loss of focus.window.blurred flag to false.document.hasFocus to always return true.hidden, mozHidden, msHidden, webkitHidden) to always report the document as visible.document.visibilityState and document.webkitVisibilityState to return "visible".document.onvisibilitychange to undefined.The script prevents specific events from triggering their default behavior, specifically for blur, mouseleave, and mouseout events, except when they are on input, anchor, or span elements.
updateVideoProgress Function: Checks if the video is playing every 30 seconds. If not, it starts playing the video.setupVideoCheck Function: Sets an interval to check video playback status.isVideoPlaying Function: Checks if the video element (with id 'realvideo_html5_api') is playing.startPlayingVideo Function: Starts playing the video if it is found and is not currently playing.To use this script, it needs to be added to Tampermonkey or a similar userscript manager. The script will run automatically on pages matching https://iedu.foxconn.com/*.
startPlayingVideo function to log any issues encountered during video playback.QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址