richtr / NoSleep.js

Prevent display sleep and enable wake lock in any Android or iOS web browser.
MIT License
2.19k stars 379 forks source link

Newbie question #127

Open zdocument opened 3 years ago

zdocument commented 3 years ago

So, forgive me for asking this as I am far from an expert at Javascript, and I really just need this thing to work without spending 100 hours learning things I may or may not end up using.

So, I copied the working example/demo of No Sleep, but I noticed it's inside a folder and calls things that are in other folders that are at the same hierarchical level (ie, not nested) by using the "../dist/NoSleep.min.js" nomenclature, for example. My question is, if I want to apply No Sleep to my top-level index.html file (which I don't want to have in a folder), what do I need to change to make everything work?

toxicantidote commented 1 year ago

You will need to adjust the hierarchal level to suit your folder structure. It would appear that you are unfamiliar with relative file paths, please check out this Wikipedia page to gain a better understanding.

As a final note: Please refrain from posting issues with titles that don't actually describe the question (e.g. "Newbie question", "Quick question" or "Pls help"). These offer no information to help triage questions or help others that may have the same issue in the future. The creator of PuTTY has a helpful guide on how to effectively report bugs here that may help you.

MasterInQuestion commented 1 year ago

    [ Quote zdocument @ CE 2021-06-16 23:10:31 UTC: https://github.com/richtr/NoSleep.js/issues/127#issue-923200437     what do I need to change to make everything work? ] <^>    Learn everything, seriously.

    Some related implementation details: https://github.com/richtr/NoSleep.js/issues/68#issuecomment-1510390259