/* XOWA: the XOWA Offline Wiki Application Copyright (C) 2012-2017 gnosygnu@gmail.com XOWA is licensed under the terms of the General Public License (GPL) Version 3, or alternatively under the terms of the Apache License Version 2.0. You may use XOWA according to either of these licenses as is most appropriate for your project on a case-by-case basis. The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ package gplx.xowa.specials.xowa.default_tab; import gplx.*; import gplx.xowa.*; import gplx.xowa.specials.*; import gplx.xowa.specials.xowa.*; public class Default_tab_page implements Xow_special_page { public Xow_special_meta Special__meta() {return Xow_special_meta_.Itm__default_tab;} public void Special__gen(Xow_wiki wiki, Xoa_page pagei, Xoa_url url, Xoa_ttl ttl) { Xoae_page page = (Xoae_page)pagei; page.Db().Text().Text_bry_(Bry_.Empty); boolean nightmode_enabled = ((Xoae_app)wiki.App()).Gui_mgr().Nightmode_mgr().Enabled(); page.Html_data().Custom_html_(nightmode_enabled ? DEFAULT_HTML_NIGHT : DEFAULT_HTML_DAY); page.Html_data().Custom_tab_name_(Tab_name_bry); } public static final byte[] Tab_name_bry = Bry_.new_a7("New Tab"); public Xow_special_page Special__clone() {return this;} public static final byte[] DEFAULT_HTML_DAY = Bry_.new_a7("<html><body style='background-color:white'></body></html>") , DEFAULT_HTML_NIGHT = Bry_.new_a7("<html><body style='background-color:black'></body></html>") ; }