This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
collaborate [2016/09/27 10:47] liz [Motion detect] |
collaborate [2017/03/23 15:00] (current) liz [Motion detect] |
||
|---|---|---|---|
| Line 15: | Line 15: | ||
| </code> | </code> | ||
| - | ===== Motion detect ===== | + | ===== Languages ===== |
| - | See [https://cornertime.herokuapp.com/] - would be good for someone to find a a way to develop motion detection based on the current webcam javascript in task.php. Maybe have the following additional commands?: | + | Currently languages are catered for by phrase files that simple swap english words for those in a selected language. Please update or improve any files as needed. |
| + | * [[lang:de|]] - German | ||
| + | * [[lang:fr|]] - French | ||
| + | * [[lang:it|]] - Italian | ||
| + | * [[lang:nl|]] - Dutch | ||
| - | ^ Command ^ Parameter ^ Description ^ | + | You can also add a new language if you like using the same format. Changes made will merge into the system within 24 hours. |
| - | | **setupdiff** | //Not used// |Set up first image to compare with | | + | |
| - | | **camdiff** | //Not used// |compare previous image with current webcam and save % change to var TEMP1 | | + | |
| - | + | ||
| - | This may take a bit of work and involve a lot of javascript so may be better to PM Liz in felife instead of putting the new functions below? But the above functions would allow for a cornertime task to contain a loop checking differences say every 5 seconds and assigning punishments for movement above a threshold. | + | |
| - | <code> | + | |
| - | </code> | + | |
| + | We aim to also use your selected language for the options page so expect a new batch of words to be added for translation in the next week. | ||
| ===== beforeunload event to the task page ===== | ===== beforeunload event to the task page ===== | ||
| Guess to do this will need a change to the body html: | Guess to do this will need a change to the body html: | ||
| Line 36: | Line 35: | ||
| <code> | <code> | ||
| <script> | <script> | ||
| + | var ended = false; | ||
| function exittask() { | function exittask() { | ||
| + | if (ended == false) { | ||
| return "Are you sure you want to leave - if task not finished, Jennifers mood will drop!"; | return "Are you sure you want to leave - if task not finished, Jennifers mood will drop!"; | ||
| + | } | ||
| } | } | ||
| </script> | </script> | ||