Decoupling is always preferred. :) settings.js is in an awkward state because we are refactoring settings app. Eventually this file will be removed (in v1.4 there were nearly a thousand lines in this file :( ) and so are the 'init' method and the 'currentPanel' setter.

To implement it in a decoupled way I would suggest to register an event handler on `panelready`. The event is dispatched to the window object when a panel is navigated. As `settings.js` is going to be removed, let's register the handler in `main.js` before calling to `Settings.init`.

Note that there is a bug that `panelready` is not fired for the first panel, please add `_sendPanelReady(oldPanel && '#' + oldPanel.id, '#' + newPanel.id);` after this line https://github.com/mozilla-b2g/gaia/blob/master/apps/settings/js/modules/page_transitions.js#L32.