mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
Html: Add option to hide xowa-alt in html db
This commit is contained in:
@@ -37,5 +37,6 @@ public class Xoh_head_itm_ {
|
||||
, Key__server = Bry_.new_a7("server")
|
||||
, Key__tabber = Bry_.new_a7("tabber")
|
||||
, Key__xo_elem = Bry_.new_a7("xo.elem")
|
||||
, Key__page_cfg = Bry_.new_a7("page_cfg")
|
||||
;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
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.htmls.heads; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*;
|
||||
import gplx.xowa.guis.*;
|
||||
public class Xoh_head_itm__page_cfg extends Xoh_head_itm__base {
|
||||
@Override public byte[] Key() {return Xoh_head_itm_.Key__page_cfg;}
|
||||
@Override public int Flags() {return Flag__css_text;}
|
||||
@Override public void Write_css_text(Xoae_app app, Xowe_wiki wiki, Xoae_page page, Xoh_head_wtr wtr) {
|
||||
wtr.Write_css_style_itm(Css_alt_text_display_none);
|
||||
}
|
||||
private static final byte[] Css_alt_text_display_none = Bry_.new_u8(String_.Concat_lines_nl
|
||||
( ".xowa_alt_text {"
|
||||
, " display:none;"
|
||||
, "}"
|
||||
));
|
||||
}
|
||||
@@ -31,7 +31,7 @@ public class Xoh_head_mgr implements gplx.core.brys.Bfr_arg {
|
||||
public Xoh_head_mgr() {
|
||||
Itms_add(itm__css, itm__globals, itm__xo_elem, itm__server, itm__popups, itm__toc, itm__collapsible, itm__navframe, itm__gallery, itm__gallery_styles
|
||||
, itm__mathjax, itm__graph, itm__hiero, itm__top_icon, itm__title_rewrite, itm__search_suggest, itm__timeline
|
||||
, itm__dbui, itm__pgbnr, itm__tabber
|
||||
, itm__dbui, itm__pgbnr, itm__tabber, itm__page_cfg
|
||||
);
|
||||
}
|
||||
public Xoh_head_itm__css Itm__css() {return itm__css;} private final Xoh_head_itm__css itm__css = new Xoh_head_itm__css();
|
||||
@@ -54,6 +54,7 @@ public class Xoh_head_mgr implements gplx.core.brys.Bfr_arg {
|
||||
public Xoh_head_itm__dbui Itm__dbui() {return itm__dbui;} private final Xoh_head_itm__dbui itm__dbui = new Xoh_head_itm__dbui();
|
||||
public Xoh_head_itm__pgbnr Itm__pgbnr() {return itm__pgbnr;} private final Xoh_head_itm__pgbnr itm__pgbnr = new Xoh_head_itm__pgbnr();
|
||||
public Xoh_head_itm__tabber Itm__tabber() {return itm__tabber;} private final Xoh_head_itm__tabber itm__tabber = new Xoh_head_itm__tabber();
|
||||
public Xoh_head_itm__page_cfg Itm__page_cfg() {return itm__page_cfg;} private final Xoh_head_itm__page_cfg itm__page_cfg = new Xoh_head_itm__page_cfg();
|
||||
public Xoh_head_mgr Init(Xoae_app app, Xowe_wiki wiki, Xoae_page page) {
|
||||
this.app = app; this.wiki = wiki; this.page = page;
|
||||
return this;
|
||||
@@ -63,6 +64,7 @@ public class Xoh_head_mgr implements gplx.core.brys.Bfr_arg {
|
||||
if (wiki.Html_mgr().Head_mgr().Itm__top_icon().Enabled_y()) itm__top_icon.Enabled_y_();
|
||||
if (wiki.Html_mgr().Head_mgr().Itm__title_rewrite().Enabled_y()) itm__title_rewrite.Enabled_y_();
|
||||
if (app.Addon_mgr().Itms__search__htmlbar().Enabled()) itm__search_suggest.Enabled_y_();
|
||||
if (!wiki.Html_mgr().Html_wtr().Lnki_wtr().File_wtr().File_wtr().Alt_show_in_html()) itm__page_cfg.Enabled_y_();
|
||||
itm__css.Enabled_y_();
|
||||
itm__globals.Enabled_y_(); // for now, always mark this and rest as exists; DATE:2014-06-09
|
||||
itm__xo_elem.Enabled_y_();
|
||||
|
||||
Reference in New Issue
Block a user