2014-08-09 18:01:17 +00:00
|
|
|
'use strict';
|
|
|
|
|
2014-09-20 11:51:23 +00:00
|
|
|
TABS.landing = {};
|
|
|
|
TABS.landing.initialize = function (callback) {
|
2014-10-01 10:58:09 +00:00
|
|
|
var self = this;
|
|
|
|
|
2014-10-01 11:16:22 +00:00
|
|
|
if (GUI.active_tab != 'landing') {
|
|
|
|
GUI.active_tab = 'landing';
|
|
|
|
}
|
2014-03-08 05:25:15 +00:00
|
|
|
|
2014-09-20 11:51:23 +00:00
|
|
|
$('#content').load("./tabs/landing.html", function () {
|
2014-05-06 14:45:26 +00:00
|
|
|
// translate to user-selected language
|
|
|
|
localize();
|
|
|
|
|
2013-10-30 16:42:04 +00:00
|
|
|
// load changelog content
|
2015-11-11 12:21:35 +00:00
|
|
|
$('#changelog .log').load('./changelog.html');
|
2014-03-08 05:25:15 +00:00
|
|
|
|
2015-11-11 12:21:35 +00:00
|
|
|
/** changelog trigger **/
|
|
|
|
$("#changelog_toggle").on('click', function() {
|
|
|
|
var state = $(this).data('state2');
|
|
|
|
if (state) {
|
|
|
|
$("#changelog").animate({right: -245}, 200, function () {
|
|
|
|
$("#content").removeClass('log_open');
|
|
|
|
});
|
|
|
|
state = false;
|
|
|
|
} else {
|
|
|
|
$("#changelog").animate({right: 0}, 200);
|
|
|
|
$("#content").addClass('log_open');
|
|
|
|
state = true;
|
|
|
|
}
|
2017-12-28 10:34:34 +00:00
|
|
|
$(this).text(state ? chrome.i18n.getMessage('close') : chrome.i18n.getMessage('defaultChangelogAction'));
|
2015-11-11 12:21:35 +00:00
|
|
|
$(this).data('state2', state);
|
|
|
|
});
|
2014-07-10 16:14:17 +00:00
|
|
|
|
2015-11-11 21:01:22 +00:00
|
|
|
GUI.content_ready(callback);
|
2013-10-30 16:42:04 +00:00
|
|
|
});
|
2015-11-11 12:21:35 +00:00
|
|
|
|
2014-07-10 16:14:17 +00:00
|
|
|
};
|
|
|
|
|
2014-09-20 11:51:23 +00:00
|
|
|
TABS.landing.cleanup = function (callback) {
|
2014-07-10 16:14:17 +00:00
|
|
|
if (callback) callback();
|
2015-11-11 12:21:35 +00:00
|
|
|
};
|