MCPcopy
hub / github.com/ollm/OpenComic / hideMouseInFullscreen

Function hideMouseInFullscreen

scripts/reading.js:4920–4965  ·  view source on GitHub ↗
(event = false, hide = false)

Source from the content-addressed store, hash-verified

4918};
4919
4920function hideMouseInFullscreen(event = false, hide = false)
4921{
4922 const status = hideMouseInFullscreenStatus;
4923 event = event || status.event;
4924 status.event = event;
4925
4926 if(hide)
4927 {
4928 const contentRight = template._contentRight();
4929 const element = event ? document.elementFromPoint(event.clientX, event.clientY) : false;
4930
4931 if(!event || contentRight.contains(element || event.target))
4932 {
4933 if(!status.hidden)
4934 {
4935 const app = document.querySelector('.app');
4936 app.classList.add('hide-mouse');
4937 }
4938
4939 status.hidden = true;
4940 }
4941
4942 status.st = false;
4943 }
4944 else
4945 {
4946 if(status.hidden)
4947 {
4948 const app = document.querySelector('.app');
4949 app.classList.remove('hide-mouse');
4950 }
4951
4952 clearTimeout(status.st);
4953
4954 if(!isFullScreen || !onReading)
4955 return;
4956
4957 status.st = setTimeout(function() {
4958
4959 hideMouseInFullscreen(event, true);
4960
4961 }, 2000);
4962
4963 status.hidden = false;
4964 }
4965}
4966
4967function hideContentLeftAndHeader()
4968{

Callers 3

resizedFunction · 0.85
pointermoveFunction · 0.85
readFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected