Skip to content

Commit

Permalink
populate the index page when visited directly
Browse files Browse the repository at this point in the history
When indexURL is opened manually (from a bookmark or set as homepage),
populate the otherwise blank page with a listing of all grenaded tabs.

This allows users to bookmark the index page and/or set it as homepage.

See also sergi#19
  • Loading branch information
sunaku committed Jun 4, 2015
1 parent eca41b1 commit d8eddf6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,13 @@ exports.main = function(options) {
}
};

/**
* When indexURL is opened manually (from a bookmark or set as the homepage),
* populate the otherwise blank web page with a listing of all grenaded tabs.
*/
require('sdk/page-mod').PageMod({
include: indexURL,
onAttach: function(worker) {
runScript(worker.tab);
}
});

0 comments on commit d8eddf6

Please sign in to comment.