Difference between revisions of "QuitFirefoxAtTime"

From ProgClub
Jump to: navigation, search
(→‎TODO: version update)
m (→‎Doing a release: rewriting history... :P)
 
(58 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
= Status =
 
= Status =
  
Under way. Not released yet, there's stuff [[#TODO|TODO]].
+
Version 0.1.4 released! With nothing [[#TODO|TODO]].
  
 
= Motivation =
 
= Motivation =
  
This software allows you to have a browser tab closed automatically after a timeout. It was particularly created so you could set up a YouTube play-list and go to bed knowing it wouldn't play all night.
+
This software allows you to have a browser tab closed automatically after a timeout (in Firefox). It was particularly created so you could set up a YouTube play-list and go to bed knowing it wouldn't play all night.
  
 
= Administration =
 
= Administration =
Line 15: Line 15:
 
Members who have contributed to this project. Newest on top.
 
Members who have contributed to this project. Newest on top.
  
* [[User:John|John Elliot V]]
+
* [[User:John|John Elliot V]] (Project Manager)
* [[User:Jevan|Jevan]]
+
* [[User:Jevan|Jevan]] (Lead Developer)
  
 
All contributors have agreed to the terms of the [[ProgClub:Copyrights#ProgClub_projects|Contributor License Agreement]]. This excludes any upstream contributors who tend to have different administrative frameworks.
 
All contributors have agreed to the terms of the [[ProgClub:Copyrights#ProgClub_projects|Contributor License Agreement]]. This excludes any upstream contributors who tend to have different administrative frameworks.
Line 27: Line 27:
  
 
Licensed under the [[MIT license]].
 
Licensed under the [[MIT license]].
 +
 +
== Components ==
 +
 +
We use [https://www.iconfinder.com/icons/928437/alarm_clock_minute_time_timer_watch_icon#size=64 a timer icon by Nut Chanut]. Thanks [https://www.iconfinder.com/Chanut-is Nut]!
  
 
= Resources =
 
= Resources =
Line 32: Line 36:
 
== Downloads ==
 
== Downloads ==
  
Download [https://www.progclub.org/svn/pcrepo/quit-firefox-at-time/branches/0.1/src/@quitfirefoxattime-0.0.1.xpi quitfirefoxattime-0.0.1.xpi].
+
You can download the latest installer here: [https://www.progclub.org/svn/pcrepo/quit-firefox-at-time/branches/0.1/src/@quitfirefoxattime-0.1.4.xpi quitfirefoxattime-0.1.4.xpi].
  
 
== Source code ==
 
== Source code ==
Line 40: Line 44:
 
  https://www.progclub.org/pcrepo/quit-firefox-at-time/branches/0.1
 
  https://www.progclub.org/pcrepo/quit-firefox-at-time/branches/0.1
  
The latest stable released version of the code is available from:
+
The latest stable released version of the code will be available from:
  
 
  https://www.progclub.org/svn/pcrepo/quit-firefox-at-time/tags/latest/0.1
 
  https://www.progclub.org/svn/pcrepo/quit-firefox-at-time/tags/latest/0.1
Line 50: Line 54:
 
== Links ==
 
== Links ==
  
N/A
+
* [https://support.mozilla.org/en-US/kb/add-on-signing-in-firefox?as=u Add-on signing in Firefox]
 +
* [https://bugzilla.mozilla.org/show_bug.cgi?id=1153017#c5 Bugzilla report of the window close bug]
  
 
= Specifications =
 
= Specifications =
Line 58: Line 63:
 
The functional specification describes what the project does.
 
The functional specification describes what the project does.
  
TODO.
+
The project is a Firefox extension that allows you to automatically close the current tab after a number of minutes.
 +
 
 +
When the Firefox extension (XPI) is installed there is a timer button added to the toolbar.
 +
 
 +
Clicking the timer button brings up the dialog box that controls our extension. When clicked a dialog appears with:
 +
 
 +
# An input box for the number of minutes to wait before closing the current tab
 +
# A Start Timer button, to start the count-down
 +
# A Stop Timer button, to stop the count-down
 +
# A Hide button, to hide the dialog
 +
# A status message showing the time remaining for the count-down
 +
 
 +
If the tab to be closed is closed while a count-down is running the count-down is canceled.
  
 
== Technical specification ==
 
== Technical specification ==
Line 64: Line 81:
 
The technical specification describes how the project works.
 
The technical specification describes how the project works.
  
TODO.
+
The main code for the extension is in [https://www.progclub.org/pcrepo/quit-firefox-at-time/branches/0.1/src/index.js index.js]. In index.js a panel is created which responds to the following messages: show, hide, startTimer, stopTimer. The panel HTML is defined in [https://www.progclub.org/pcrepo/quit-firefox-at-time/branches/0.1/src/data/text-entry.html data/text-entry.html] and the panel script is defined in [https://www.progclub.org/pcrepo/quit-firefox-at-time/branches/0.1/src/data/get-text.js data/get-text.js].
 +
 
 +
When the timer is started (startTimer occurs), a timer interval is defined which triggers a function every second to send a message from index.js called "updateMilliseconds" to the panel's internal javascript in get-text.js which updates the timer countdown display. The triggered function also checks if the millisecondsRemaining is less than or equal to zero and if it is then it closes the initial tab whose object was remembered when the timer start occurred. If the tab is closed, it triggers a function to clear the timer interval so that the timer will no longer countdown or trigger. Clicking "Start Timer" (which can also be used to reset the timer) will re-enable the countdown again and set the "initialTab" variable to remember the current tab as the one to be closed.
 +
 
 +
There is some CSS in text-entry.html which prevents the UI from displaying an up/down button for the number of minutes, which can have a decimal point such as "1.3" or "0.2" minutes.
 +
 
 +
The XPI file is created by [https://developer.mozilla.org/en-US/Add-ons/SDK/Tools/jpm jpm] which is installed by [https://www.npmjs.com/ npm]. See [https://www.progclub.org/pcrepo/quit-firefox-at-time/branches/0.1/src/README.md README.md] for details.
  
 
= Notes =
 
= Notes =
Line 72: Line 95:
 
If you are interested in incorporating this software into your project, here's what you need to know:
 
If you are interested in incorporating this software into your project, here's what you need to know:
  
TODO.
+
Copy and paste your way to victory! See [[#Notes_for_developers|notes for developers]] for packaging instructions.
 +
 
 +
Installation instructions are in the [https://www.progclub.org/svn/pcrepo/quit-firefox-at-time/branches/0.1/src/README.md README] file.
  
 
== Notes for developers ==
 
== Notes for developers ==
Line 78: Line 103:
 
If you're looking to set up a development environment for this project here's what you need to know:
 
If you're looking to set up a development environment for this project here's what you need to know:
  
TODO.
+
svn co https://www.progclub.org/svn/pcrepo/quit-firefox-at-time/branches/0.1/ \
 +
  quit-firefox-at-time-0.1
 +
 
 +
See the [https://www.progclub.org/pcrepo/quit-firefox-at-time/branches/0.1/src/README.md README.md] file for instructions for packaging/testing on Linux and/or Windows.
 +
 
 +
=== Doing a release ===
 +
 
 +
Note: version numbers are in the format MAJOR.MINOR.REVISION. Odd revision numbers are development revisions, they do not get released; even revision numbers are release revisions, which do. When doing a release you bump the revision number when you start, from an odd revision to an even revision, then you do your release, then you start the next development revision by bumping the revision number from even to odd.
 +
 
 +
To do a release:
 +
 
 +
# Edit [https://www.progclub.org/pcrepo/quit-firefox-at-time/branches/0.1/src/package.json package.json] and bump the version revision number from an odd development revision to an even release revision
 +
#* e.g. "0.1.3" to "0.1.4".
 +
# Generate the new xpi:
 +
#* $ jpm xpi
 +
# svn rm the previous xpi, e.g.:
 +
#* $ svn rm @quitfirefoxattime-0.1.2.xpi@
 +
#* (note the extra @ symbol at the end of the file name, this is required by svn)
 +
# svn add the new xpi, e.g.:
 +
#* $ svn add @quitfirefoxattime-0.1.4.xpi@
 +
#* (again the extra @ character at the end of the file name)
 +
# svn commit:
 +
#* $ svn ci -m 'Preparing for 0.1.4 release...'
 +
# Release:
 +
#* $ pcrepo-branch-release quit-firefox-at-time 0.1 4
 +
#* i.e. pcrepo-branch-release PROJECT MAJOR.MINOR REVISION
 +
# Edit [https://www.progclub.org/pcrepo/quit-firefox-at-time/branches/0.1/src/package.json package.json] and bump the version revision number (again) from an even revision number to the next (odd) development revision
 +
#* e.g. "0.1.4" to "0.1.5".
 +
# Edit [[QuitFirefoxAtTime#|this page]] to refer to the latest released version
  
 
= Tasks =
 
= Tasks =
Line 86: Line 139:
 
Things to do, in rough order of priority:
 
Things to do, in rough order of priority:
  
* Change version to 0.1.2
+
N/A. This project is done! If you have any ideas for features we should add come over and tell us on the [[Mailing_lists#ProgClub_list|mailing list]]!
* Enter minutes instead of date
 
* Make input box smaller
 
* Close current tab rather than all windows
 
  
[[Category:TODO]]
+
[[Category:Done]]
  
 
== Done ==
 
== Done ==
Line 97: Line 147:
 
Stuff that's done. Latest stuff on top.
 
Stuff that's done. Latest stuff on top.
  
 +
* [[User:Jevan|JP]] 2016-04-09: released version 0.1.4
 +
* [[User:Jevan|JP]] 2016-04-09: negative time numbers countdown display after countdown finished replaced with text message
 +
* [[User:John|JE]] 2016-04-08: released version 0.1.3
 +
* [[User:John|JE]] 2016-04-08: workaround for [https://bugzilla.mozilla.org/show_bug.cgi?id=1153017#c5 blank dialog after first close bug]
 +
* [[User:John|JE]] 2016-04-08: updated the [[#Technical_specification|technical specification]] (how it works)
 +
* [[User:Jevan|JP]] 2016-04-08: closes tab that was active when the start timer button was pressed
 +
* [[User:Jevan|JP]] 2016-04-08: got rid of up/down buttons on minutes input
 +
* [[User:Jevan|JP]] 2016-04-08: allow decimal minutes, e.g. 0.1 minutes is 6 seconds
 +
* [[User:Jevan|JP]] 2016-04-08: if tab is closed timer is canceled
 +
* [[User:John|JE]] 2016-04-08: explain [[#Notes_for_developers|how to update/package the xpi file]]
 +
* [[User:Jevan|JP]] 2016-04-08: stop timer button next to start timer
 +
* [[User:Jevan|JP]] 2016-04-08: show countdown in hours:minutes:seconds
 +
* [[User:Jevan|JP]] 2016-04-08: closes current tab rather than all windows
 +
* [[User:Jevan|JP]] 2016-04-08: made input box smaller
 +
* [[User:Jevan|JP]] 2016-04-08: enter minutes instead of date
 +
* [[User:Jevan|JP]] 2016-04-08: changed version to 0.1.2
 +
* [[User:John|JE]] 2016-04-03: added [[#Notes_for_implementers|notes for implementers]]
 
* [[User:John|JE]] 2016-04-03: created project page
 
* [[User:John|JE]] 2016-04-03: created project page
 +
* [[User:Jevan|JP]] 2016-04-02: version 0.0.1

Latest revision as of 01:52, 9 April 2016

QuitFirefoxAtTime is the ProgClub Firefox extension which will close your current tab after a timeout. For other projects see projects.

Status

Version 0.1.4 released! With nothing TODO.

Motivation

This software allows you to have a browser tab closed automatically after a timeout (in Firefox). It was particularly created so you could set up a YouTube play-list and go to bed knowing it wouldn't play all night.

Administration

Contributors

Members who have contributed to this project. Newest on top.

All contributors have agreed to the terms of the Contributor License Agreement. This excludes any upstream contributors who tend to have different administrative frameworks.

Copyright

Copyright 2016, Contributors.

License

Licensed under the MIT license.

Components

We use a timer icon by Nut Chanut. Thanks Nut!

Resources

Downloads

You can download the latest installer here: quitfirefoxattime-0.1.4.xpi.

Source code

The repository can be browsed online:

https://www.progclub.org/pcrepo/quit-firefox-at-time/branches/0.1

The latest stable released version of the code will be available from:

https://www.progclub.org/svn/pcrepo/quit-firefox-at-time/tags/latest/0.1

Or if you want the latest version for development purposes:

https://www.progclub.org/svn/pcrepo/quit-firefox-at-time/branches/0.1

Links

Specifications

Functional specification

The functional specification describes what the project does.

The project is a Firefox extension that allows you to automatically close the current tab after a number of minutes.

When the Firefox extension (XPI) is installed there is a timer button added to the toolbar.

Clicking the timer button brings up the dialog box that controls our extension. When clicked a dialog appears with:

  1. An input box for the number of minutes to wait before closing the current tab
  2. A Start Timer button, to start the count-down
  3. A Stop Timer button, to stop the count-down
  4. A Hide button, to hide the dialog
  5. A status message showing the time remaining for the count-down

If the tab to be closed is closed while a count-down is running the count-down is canceled.

Technical specification

The technical specification describes how the project works.

The main code for the extension is in index.js. In index.js a panel is created which responds to the following messages: show, hide, startTimer, stopTimer. The panel HTML is defined in data/text-entry.html and the panel script is defined in data/get-text.js.

When the timer is started (startTimer occurs), a timer interval is defined which triggers a function every second to send a message from index.js called "updateMilliseconds" to the panel's internal javascript in get-text.js which updates the timer countdown display. The triggered function also checks if the millisecondsRemaining is less than or equal to zero and if it is then it closes the initial tab whose object was remembered when the timer start occurred. If the tab is closed, it triggers a function to clear the timer interval so that the timer will no longer countdown or trigger. Clicking "Start Timer" (which can also be used to reset the timer) will re-enable the countdown again and set the "initialTab" variable to remember the current tab as the one to be closed.

There is some CSS in text-entry.html which prevents the UI from displaying an up/down button for the number of minutes, which can have a decimal point such as "1.3" or "0.2" minutes.

The XPI file is created by jpm which is installed by npm. See README.md for details.

Notes

Notes for implementers

If you are interested in incorporating this software into your project, here's what you need to know:

Copy and paste your way to victory! See notes for developers for packaging instructions.

Installation instructions are in the README file.

Notes for developers

If you're looking to set up a development environment for this project here's what you need to know:

svn co https://www.progclub.org/svn/pcrepo/quit-firefox-at-time/branches/0.1/ \
  quit-firefox-at-time-0.1

See the README.md file for instructions for packaging/testing on Linux and/or Windows.

Doing a release

Note: version numbers are in the format MAJOR.MINOR.REVISION. Odd revision numbers are development revisions, they do not get released; even revision numbers are release revisions, which do. When doing a release you bump the revision number when you start, from an odd revision to an even revision, then you do your release, then you start the next development revision by bumping the revision number from even to odd.

To do a release:

  1. Edit package.json and bump the version revision number from an odd development revision to an even release revision
    • e.g. "0.1.3" to "0.1.4".
  2. Generate the new xpi:
    • $ jpm xpi
  3. svn rm the previous xpi, e.g.:
    • $ svn rm @quitfirefoxattime-0.1.2.xpi@
    • (note the extra @ symbol at the end of the file name, this is required by svn)
  4. svn add the new xpi, e.g.:
    • $ svn add @quitfirefoxattime-0.1.4.xpi@
    • (again the extra @ character at the end of the file name)
  5. svn commit:
    • $ svn ci -m 'Preparing for 0.1.4 release...'
  6. Release:
    • $ pcrepo-branch-release quit-firefox-at-time 0.1 4
    • i.e. pcrepo-branch-release PROJECT MAJOR.MINOR REVISION
  7. Edit package.json and bump the version revision number (again) from an even revision number to the next (odd) development revision
    • e.g. "0.1.4" to "0.1.5".
  8. Edit this page to refer to the latest released version

Tasks

TODO

Things to do, in rough order of priority:

N/A. This project is done! If you have any ideas for features we should add come over and tell us on the mailing list!

Done

Stuff that's done. Latest stuff on top.

  • JP 2016-04-09: released version 0.1.4
  • JP 2016-04-09: negative time numbers countdown display after countdown finished replaced with text message
  • JE 2016-04-08: released version 0.1.3
  • JE 2016-04-08: workaround for blank dialog after first close bug
  • JE 2016-04-08: updated the technical specification (how it works)
  • JP 2016-04-08: closes tab that was active when the start timer button was pressed
  • JP 2016-04-08: got rid of up/down buttons on minutes input
  • JP 2016-04-08: allow decimal minutes, e.g. 0.1 minutes is 6 seconds
  • JP 2016-04-08: if tab is closed timer is canceled
  • JE 2016-04-08: explain how to update/package the xpi file
  • JP 2016-04-08: stop timer button next to start timer
  • JP 2016-04-08: show countdown in hours:minutes:seconds
  • JP 2016-04-08: closes current tab rather than all windows
  • JP 2016-04-08: made input box smaller
  • JP 2016-04-08: enter minutes instead of date
  • JP 2016-04-08: changed version to 0.1.2
  • JE 2016-04-03: added notes for implementers
  • JE 2016-04-03: created project page
  • JP 2016-04-02: version 0.0.1