Skip to content

pandaroux007/RepulsTime

Repository files navigation

GitHub

Limit time spent on repuls.io

GitHub Licence Firefox Commits Stars

Langages

JavaScript HTML CSS JSON

Licence

This extension is licensed under the MIT license (see LICENSE.txt file), for more information go to https://opensource.org/license/mit

State

Important

This extension is currently finished for version 1 but placed in beta for now - YOU CAN USE IT BUT DON'T BE SURPRISED IF YOU ENCOUNTER BUGS!

If you find any issues/bugs, report them in a GitHub issue. If you have an idea for improvement, suggest it in the comments on AMO on the extension page.

Development

currently being written...

Extension storage

  • timePlayedToday: The time (in seconds) that the user has played on the current day. This value is updated every second while the user is on repuls.io.
  • lastDate: A string representation of the last date the extension was active. This is used to reset the timePlayedToday counter when a new day starts. It's stored in the format returned by new Date().toDateString().
  • timeLimits: An object containing the daily time limits for each day of the week (they can be changed in the settings). The structure is as follows:
{
    "monday": 30,
    "tuesday": 30,
    "wednesday": 45,
    "thursday": 30,
    "friday": 45,
    "saturday": 45,
    "sunday": 0
}
  • timeRemaining: Used only by the popup (for display the remaining time) and updated in the startTimer function of background.js. Contains the remaining time so as not to have to define the calculateRemainingTime and getDailyTimeLimit functions twice. Probably not optimized and not reliable!
  • contentVisible : Variable containing the display state of unnecessary elements of the game's main page (suggestion of gameplay video on youtube and link group at the right bottom).

ToDo list

  • complete settings management (html, css, javascript...);
  • finish writing the doc (README.md file);