mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v1.7.2.1
This commit is contained in:
@@ -144,6 +144,7 @@ public class Xog_bnd_mgr {
|
||||
Init_itm(Xog_cmd_itm_.Key_gui_browser_url_exec , Xog_bnd_box_.Tid_browser_url , "key.enter");
|
||||
Init_itm(Xog_cmd_itm_.Key_gui_browser_url_exec_new_tab_by_paste , Xog_bnd_box_.Tid_browser_url , "mod.c+key.enter");
|
||||
Init_itm(Xog_cmd_itm_.Key_gui_browser_url_exec_by_paste , Xog_bnd_box_.Tid_browser_url , "mouse.middle", "mod.a+key.enter");
|
||||
Init_itm(Xog_cmd_itm_.Key_gui_browser_url_restore , Xog_bnd_box_.Tid_browser_url , "mod.c+key.u");
|
||||
Init_itm(Xog_cmd_itm_.Key_gui_browser_search_focus , Xog_bnd_box_.Tid_browser , "mod.ca+key.s");
|
||||
Init_itm(Xog_cmd_itm_.Key_gui_browser_search_exec , Xog_bnd_box_.Tid_browser_search , "key.enter");
|
||||
Init_itm(Xog_cmd_itm_.Key_gui_browser_tabs_new_dflt__at_dflt__focus_y , Xog_bnd_box_.Tid_browser , "mod.c+key.t");
|
||||
|
||||
@@ -76,6 +76,7 @@ public class Xog_cmd_itm_ {
|
||||
, Key_gui_browser_url_exec = new_dflt_(Xog_ctg_itm_.Tid_browser , "xowa.gui.browser.url.exec")
|
||||
, Key_gui_browser_url_exec_by_paste = new_dflt_(Xog_ctg_itm_.Tid_browser , "xowa.gui.browser.url.exec_by_paste")
|
||||
, Key_gui_browser_url_exec_new_tab_by_paste = new_dflt_(Xog_ctg_itm_.Tid_browser , "xowa.gui.browser.url.exec_new_tab_by_paste")
|
||||
, Key_gui_browser_url_restore = new_dflt_(Xog_ctg_itm_.Tid_browser , "xowa.gui.browser.url.restore")
|
||||
, Key_gui_browser_search_focus = new_dflt_(Xog_ctg_itm_.Tid_browser , "xowa.gui.browser.search.focus")
|
||||
, Key_gui_browser_search_exec = new_dflt_(Xog_ctg_itm_.Tid_browser , "xowa.gui.browser.search.exec")
|
||||
, Key_gui_browser_tabs_new_dflt__at_dflt__focus_y = new_dflt_(Xog_ctg_itm_.Tid_tabs , "xowa.gui.browser.tabs.new_dflt__at_dflt__focus_y")
|
||||
|
||||
@@ -76,8 +76,7 @@ class Xog_history_stack_fxt {
|
||||
Xoa_page page = Xoa_page.test_(wiki, ttl);
|
||||
byte[] url_bry = ttl_bry;
|
||||
if (arg_str != null) url_bry = Bry_.Add(url_bry, Bry_.new_utf8_(arg_str));
|
||||
Xoa_url url = new Xoa_url();
|
||||
url_parser.Parse(url, url_bry);
|
||||
Xoa_url url = url_parser.Parse(url_bry);
|
||||
page.Url_(url); // set url b/c history_mgr.Add uses url
|
||||
stack.Add(page);
|
||||
return this;
|
||||
|
||||
@@ -24,7 +24,10 @@ public class Xog_mnu_grp extends Xog_mnu_base {
|
||||
this.Ctor(gui_mgr);
|
||||
} private Xoa_app app;
|
||||
public String Key() {return key;} private String key; private boolean mnu_is_popup;
|
||||
public Gfui_mnu_grp Under_mnu() {return under_mnu;} private Gfui_mnu_grp under_mnu;
|
||||
public Gfui_mnu_grp Under_mnu() {
|
||||
if (under_mnu.Disposed()) Build(); // NOTE: menu may be disposed when calling .dispose on Swt_html; rebuild if needed; DATE:2014-07-09
|
||||
return under_mnu;
|
||||
} private Gfui_mnu_grp under_mnu;
|
||||
@Override public boolean Tid_is_app_menu_grp() {return !mnu_is_popup;}
|
||||
public boolean Enabled() {return enabled;} private boolean enabled = true;
|
||||
public void Enabled_(boolean v) {
|
||||
|
||||
@@ -91,9 +91,8 @@ public class Xog_url_wkr {
|
||||
return Rslt_handled;
|
||||
}
|
||||
private Xoa_url Exec_url_page(Xoa_app app, Xoa_page page, Xog_win_itm win, byte[] href_bry) { // EX: "Page"; "/wiki/Page"; // rewritten; DATE:2014-01-19
|
||||
Xoa_url rv = new Xoa_url();
|
||||
Xow_wiki wiki = page.Wiki();
|
||||
app.Url_parser().Parse(rv, href_bry); // needed for query_args
|
||||
Xoa_url rv = app.Url_parser().Parse(href_bry); // needed for query_args
|
||||
byte[] anchor_bry = href.Anchor();
|
||||
byte[] page_bry = rv.Page_bry();
|
||||
byte[][] segs_ary = rv.Segs_ary();
|
||||
|
||||
@@ -16,11 +16,12 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.gui.urls.url_macros; import gplx.*; import gplx.xowa.*; import gplx.xowa.gui.*; import gplx.xowa.gui.urls.*;
|
||||
import gplx.core.btries.*;
|
||||
public class Xog_url_macro_grp implements GfoInvkAble {
|
||||
public ByteTrieMgr_slim Trie() {return trie;} private ByteTrieMgr_slim trie = ByteTrieMgr_slim.cs_();
|
||||
public Btrie_slim_mgr Trie() {return trie;} private Btrie_slim_mgr trie = Btrie_slim_mgr.cs_();
|
||||
public void Del(byte[] abrv) {trie.Del(abrv);}
|
||||
public void Set(String abrv, String fmt) {Set(Bry_.new_utf8_(abrv), Bry_.new_utf8_(fmt));}
|
||||
public void Set(byte[] abrv, byte[] fmt) {trie.Add(abrv, new Xog_url_macro_itm(abrv, fmt));}
|
||||
public void Set(byte[] abrv, byte[] fmt) {trie.Add_obj(abrv, new Xog_url_macro_itm(abrv, fmt));}
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||
if (ctx.Match(k, Invk_clear)) trie.Clear();
|
||||
else if (ctx.Match(k, Invk_set)) Set(m.ReadBry("abrv"), m.ReadBry("fmt"));
|
||||
|
||||
@@ -43,9 +43,9 @@ public class Xog_url_macro_mgr {
|
||||
boolean dot_missing = dot_pos == -1;
|
||||
int type_bgn = dot_pos + 1, type_end = colon_pos; // +1 to start type after dot;
|
||||
if (dot_missing) type_bgn = 0;
|
||||
Object custom_obj = custom_mgr.Trie().MatchAtCurExact(raw, 0, type_end); // match entire prefix
|
||||
Object custom_obj = custom_mgr.Trie().Match_exact(raw, 0, type_end); // match entire prefix
|
||||
if (custom_obj == null) {
|
||||
Object type_obj = types_mgr.Trie().MatchAtCurExact(raw, type_bgn, type_end);
|
||||
Object type_obj = types_mgr.Trie().Match_exact(raw, type_bgn, type_end);
|
||||
if (type_obj == null) return Unhandled; // type abrv is not known; exit; EX: "en.unknown:Page"; "Page"
|
||||
byte[] lang_bry = dot_missing ? lang_default : Bry_.Mid(raw, 0, dot_pos);
|
||||
Xog_url_macro_itm type_itm = (Xog_url_macro_itm)type_obj;
|
||||
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.gui.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.gui.*;
|
||||
import gplx.gfui.*; import gplx.html.*; import gplx.xowa.gui.menus.*; import gplx.xowa.gui.menus.dom.*;
|
||||
import gplx.core.btries.*; import gplx.gfui.*; import gplx.html.*; import gplx.xowa.gui.menus.*; import gplx.xowa.gui.menus.dom.*;
|
||||
public class Xog_html_itm implements GfoInvkAble, GfoEvObj {
|
||||
private Xoa_app app;
|
||||
public Xog_html_itm(Xog_tab_itm owner_tab) {
|
||||
@@ -61,8 +61,18 @@ public class Xog_html_itm implements GfoInvkAble, GfoEvObj {
|
||||
page.Root().Data_htm_(html_src);
|
||||
}
|
||||
}
|
||||
private void Html_src_(Xoa_page page, byte[] html_src) {
|
||||
html_box.Html_doc_html_(String_.new_utf8_(html_src));
|
||||
private void Html_src_(Xoa_page page, byte[] html_bry) {
|
||||
String html_str = String_.new_utf8_(html_bry);
|
||||
if (owner_tab.Tab_mgr().Html_load_tid__url()) {
|
||||
Io_url html_url = app.User().Fsys_mgr().App_temp_html_dir().GenSubFil_ary(owner_tab.Tab_key(), ".html");
|
||||
try {html_box.Html_doc_html_load_by_url(html_url.Xto_api(), html_str);}
|
||||
catch (Exception e) {
|
||||
app.Usr_dlg().Warn_many("", "", "failed to write html to file; writing directly by memory: page=~{0} file=~{1} err=~{2}", page.Url().Xto_full_str_safe(), html_url.Raw(), Err_.Message_gplx(e));
|
||||
html_box.Html_doc_html_load_by_mem(html_str);
|
||||
}
|
||||
}
|
||||
else
|
||||
html_box.Html_doc_html_load_by_mem(html_str);
|
||||
}
|
||||
public void Html_swap(Xog_html_itm trg_itm) {
|
||||
Xog_html_itm src_itm = this;
|
||||
@@ -180,7 +190,7 @@ class Xog_html_itm__href_extractor {
|
||||
private static final byte Href_tid_wiki = 1, Href_tid_site = 2, Href_tid_anchor = 3;
|
||||
private static final byte[] File_protocol_bry = Bry_.new_ascii_("file://");
|
||||
private static final int File_protocol_len = File_protocol_bry.length;
|
||||
private static final ByteTrieMgr_slim href_trie = ByteTrieMgr_slim.cs_()
|
||||
private static final Btrie_slim_mgr href_trie = Btrie_slim_mgr.cs_()
|
||||
.Add_str_byte("/site/" , Href_tid_site)
|
||||
.Add_str_byte("/wiki/" , Href_tid_wiki)
|
||||
.Add_str_byte("#" , Href_tid_anchor)
|
||||
@@ -199,7 +209,7 @@ class Xog_html_itm__href_extractor {
|
||||
if (Bry_.HasAtBgn(text_bry, File_protocol_bry, 2, text_len)) {
|
||||
href_bgn += File_protocol_len; // skip "file://"
|
||||
}
|
||||
Byte_obj_val href_tid = (Byte_obj_val)href_trie.MatchAtCur(text_bry, href_bgn, text_len);
|
||||
Byte_obj_val href_tid = (Byte_obj_val)href_trie.Match_bgn(text_bry, href_bgn, text_len);
|
||||
if (href_tid != null) {
|
||||
switch (href_tid.Val()) {
|
||||
case Href_tid_wiki: return site + String_.new_utf8_(text_bry, href_bgn, text_len);
|
||||
|
||||
@@ -35,7 +35,7 @@ public class Xog_tab_itm implements GfoInvkAble {
|
||||
html_box.Html_invk_src_(win);
|
||||
html_itm.Html_box_(html_box);
|
||||
if (app.Mode() == Xoa_app_.Mode_gui) { // NOTE: only run for gui; will cause firefox addon to fail; DATE:2014-05-03
|
||||
html_box.Html_doc_html_(""); // NOTE: must set source, else control will be empty, and key events will not be raised; DATE:2014-04-30
|
||||
html_box.Html_doc_html_load_by_mem(""); // NOTE: must set source, else control will be empty, and key events will not be raised; DATE:2014-04-30
|
||||
IptBnd_.ipt_to_(IptCfg_.Null, html_box, this, "popup", IptEventType_.MouseDown, IptMouseBtn_.Right);
|
||||
GfoEvMgr_.SubSame(html_box, GfuiElemKeys.Evt_menu_detected, html_itm);
|
||||
gui_mgr.Bnd_mgr().Bind(Xog_bnd_box_.Tid_browser_html, html_box);
|
||||
@@ -76,7 +76,7 @@ public class Xog_tab_itm implements GfoInvkAble {
|
||||
this.page = page;
|
||||
if (update_ui) {
|
||||
this.Tab_name_();
|
||||
tab_box.Tab_tip_text_(String_.new_utf8_(page.Url().X_to_full()));
|
||||
tab_box.Tab_tip_text_(page.Url().Xto_full_str());
|
||||
}
|
||||
} private Xoa_page page;
|
||||
public void Tab_name_() {
|
||||
@@ -113,7 +113,8 @@ public class Xog_tab_itm implements GfoInvkAble {
|
||||
Xoa_ttl ttl = Xoa_ttl.parse_(wiki, url.Page_bry());
|
||||
if (ttl == null) {usr_dlg.Prog_one("", "", "title is invalid: ~{0}", String_.new_utf8_(url.Raw())); return;}
|
||||
usr_dlg.Prog_one("", "", "loading: ~{0}", String_.new_utf8_(ttl.Raw()));
|
||||
this.Html_box().Html_js_eval_script("xowa_popups_hide_all();");
|
||||
if (app.Api_root().Html().Modules().Popups().Enabled())
|
||||
this.Html_box().Html_js_eval_script("if (window.xowa_popups_hide_all != null) window.xowa_popups_hide_all();"); // should be more configurable; DATE:2014-07-09
|
||||
app.Thread_mgr().Page_load_mgr().Add_at_end(new Load_page_wkr(this, wiki, url, ttl)).Run();
|
||||
}
|
||||
public void Show_url_loaded(Xoa_page page) {
|
||||
@@ -129,8 +130,8 @@ public class Xog_tab_itm implements GfoInvkAble {
|
||||
Xog_tab_itm_read_mgr.Show_page(this, page, false);
|
||||
}
|
||||
else {
|
||||
if (page.Redirect_list().Count() > 0)
|
||||
usr_dlg.Prog_many("", "", "could not find: ~{0} (redirected from ~{1})", String_.new_utf8_(page.Url().Page_bry()), String_.new_utf8_((byte[])page.Redirect_list().FetchAt(0)));
|
||||
if (page.Redirected_ttls().Count() > 0)
|
||||
usr_dlg.Prog_many("", "", "could not find: ~{0} (redirected from ~{1})", String_.new_utf8_(page.Url().Page_bry()), String_.new_utf8_((byte[])page.Redirected_ttls().FetchAt(0)));
|
||||
else {
|
||||
if (ttl.Ns().Id_file())
|
||||
usr_dlg.Prog_one("", "", "commons.wikimedia.org must be installed in order to view the file. See [[Help:Wikis/Commons]]: ~{0}", String_.new_utf8_(url.Raw()));
|
||||
@@ -165,7 +166,7 @@ public class Xog_tab_itm implements GfoInvkAble {
|
||||
public void Async() {
|
||||
if (page == null) return; // TEST: occurs during Xog_win_mgr_tst
|
||||
Xow_wiki wiki = page.Wiki(); Xoa_app app = wiki.App(); Xog_win_itm win_itm = tab_mgr.Win(); Gfo_usr_dlg usr_dlg = win_itm.Usr_dlg();
|
||||
app.Usr_dlg().Log_many("", "", "page.async: url=~{0}", page.Url().X_to_full_str_safe());
|
||||
app.Usr_dlg().Log_many("", "", "page.async: url=~{0}", page.Url().Xto_full_str_safe());
|
||||
if (page.Url().Anchor_str() != null) html_itm.Scroll_page_by_id_gui(page.Url().Anchor_str());
|
||||
if (usr_dlg.Canceled()) {usr_dlg.Prog_none("", "", ""); app.Log_wtr().Queue_enabled_(false); return;}
|
||||
int xfer_len = 0;
|
||||
@@ -226,7 +227,7 @@ class Load_page_wkr implements Gfo_thread_wkr {
|
||||
public void Exec() {
|
||||
try {
|
||||
Xoa_app app = wiki.App();
|
||||
app.Usr_dlg().Log_many("", "", "page.load: url=~{0}", url.X_to_full_str_safe());
|
||||
app.Usr_dlg().Log_many("", "", "page.load: url=~{0}", url.Xto_full_str_safe());
|
||||
if (Env_.System_memory_free() < app.Sys_cfg().Free_mem_when()) // check if low in memory
|
||||
app.Free_mem(false); // clear caches (which will clear bry_bfr_mk)
|
||||
else // not low in memory
|
||||
@@ -248,7 +249,7 @@ class Load_files_wkr implements Gfo_thread_wkr {
|
||||
public void Exec() {
|
||||
try {tab.Async();}
|
||||
catch (Exception e) {
|
||||
tab.Tab_mgr().Win().App().Usr_dlg().Warn_many("error while running file wkr; page=~{0} err=~{1}", tab.Page().Url().X_to_full_str(), Err_.Message_gplx_brief(e));
|
||||
tab.Tab_mgr().Win().App().Usr_dlg().Warn_many("error while running file wkr; page=~{0} err=~{1}", tab.Page().Url().Xto_full_str(), Err_.Message_gplx_brief(e));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class Xog_tab_itm_read_mgr {
|
||||
try {tab.Html_itm().Show(new_page);}
|
||||
catch (Exception e) {
|
||||
if (show_is_err) { // trying to show error page, but failed; don't show again, else recursion until out of memory; TODO:always load error page; no reason it should fail; WHEN:html_skin; DATE:2014-06-08
|
||||
String new_page_url = new_page.Url().X_to_full_str_safe();
|
||||
String new_page_url = new_page.Url().Xto_full_str_safe();
|
||||
String err_msg = "fatal error trying to load error page; page=" + new_page_url;
|
||||
app.Usr_dlg().Warn_many("", "", err_msg);
|
||||
app.Gui_mgr().Kit().Ask_ok("", "", err_msg);
|
||||
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.gui.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.gui.*;
|
||||
import gplx.gfui.*; import gplx.xowa.cfgs2.*;
|
||||
import gplx.gfui.*; import gplx.xowa.cfgs2.*; import gplx.xowa.apis.xowa.gui.browsers.*;
|
||||
public class Xog_tab_mgr implements GfoEvObj {
|
||||
private OrderedHash tab_regy = OrderedHash_.new_(); private int tab_uid = 0;
|
||||
public Xog_tab_mgr(Xog_win_itm win) {
|
||||
@@ -26,6 +26,8 @@ public class Xog_tab_mgr implements GfoEvObj {
|
||||
public GfoEvMgr EvMgr() {return ev_mgr;} private GfoEvMgr ev_mgr;
|
||||
public Xog_win_itm Win() {return win;} private Xog_win_itm win;
|
||||
public Gfui_tab_mgr Tab_mgr() {return tab_mgr;} private Gfui_tab_mgr tab_mgr;
|
||||
public byte Html_load_tid() {return html_load_tid;} private byte html_load_tid;
|
||||
public boolean Html_load_tid__url() {return html_load_tid == Gxw_html_load_tid_.Tid_url;}
|
||||
public void Init_by_kit(Gfui_kit kit) {
|
||||
tab_mgr = kit.New_tab_mgr("xowa.tab_mgr", win.Win_box());
|
||||
active_tab = Xog_tab_itm_.Null;
|
||||
@@ -44,6 +46,10 @@ public class Xog_tab_mgr implements GfoEvObj {
|
||||
, Xocfg_tab_btn_mgr.Evt_text_min_chars_changed, Xocfg_tab_btn_mgr.Evt_text_max_chars_changed
|
||||
, Xocfg_tab_btn_mgr.Evt_hide_if_one_changed
|
||||
);
|
||||
html_load_tid = win.App().Api_root().Gui().Browser().Html().Load_tid();
|
||||
GfoEvMgr_.SubSame_many(win.App().Api_root().Gui().Browser().Html(), this
|
||||
, Xoapi_html_box.Evt_load_tid_changed
|
||||
);
|
||||
}
|
||||
public Xog_tab_itm Active_tab() {return active_tab;} private Xog_tab_itm active_tab;
|
||||
public Xog_tab_itm Active_tab_assert() {
|
||||
@@ -99,7 +105,7 @@ public class Xog_tab_mgr implements GfoEvObj {
|
||||
}
|
||||
public void Tabs_new_dupe(boolean focus) {
|
||||
if (this.Active_tab_is_null()) return;
|
||||
String url = active_tab.Page().Url().X_to_full_str();
|
||||
String url = active_tab.Page().Url().Xto_full_str();
|
||||
Tabs_new_dflt(focus);
|
||||
win.Page__navigate_by_url_bar(url);
|
||||
}
|
||||
@@ -120,6 +126,8 @@ public class Xog_tab_mgr implements GfoEvObj {
|
||||
public void Tabs_close_cur() {
|
||||
if (this.Active_tab_is_null()) return;
|
||||
tab_mgr.Tabs_close_by_idx(active_tab.Tab_idx());
|
||||
Xog_tab_itm cur_tab = this.Active_tab();
|
||||
if (cur_tab != null) cur_tab.Html_box().Focus(); // NOTE: needed to focus tab box else tab button will be focused; DATE:2014-07-13
|
||||
}
|
||||
public void Tabs_close_others() {this.Tabs_close_to_bgn(); this.Tabs_close_to_end();}
|
||||
public void Tabs_close_to_bgn() {if (Active_tab_is_null()) return; Tabs_close_rng(0 , active_tab.Tab_idx());}
|
||||
@@ -137,7 +145,8 @@ public class Xog_tab_mgr implements GfoEvObj {
|
||||
private ListAdp closed_undo_list = ListAdp_.new_();
|
||||
private void Tabs_closed(String key) {
|
||||
Xog_tab_itm itm = Tabs_get_by_key_or_warn(key); if (itm == null) return;
|
||||
closed_undo_list.Add(itm.Page().Url().X_to_full_str());
|
||||
itm.Html_box().Html_dispose();
|
||||
closed_undo_list.Add(itm.Page().Url().Xto_full_str());
|
||||
tab_regy.Del(key);
|
||||
if (tab_regy.Count() == 0) {
|
||||
active_tab = Xog_tab_itm_.Null;
|
||||
@@ -233,6 +242,7 @@ public class Xog_tab_mgr implements GfoEvObj {
|
||||
else if (ctx.Match(k, Xocfg_tab_btn_mgr.Evt_unselected_close_visible_changed)) Btns_unselected_close_visible_(m.ReadBool("v"));
|
||||
else if (ctx.Match(k, Xocfg_tab_btn_mgr.Evt_text_min_chars_changed)) Btns_text_recalc();
|
||||
else if (ctx.Match(k, Xocfg_tab_btn_mgr.Evt_text_max_chars_changed)) Btns_text_recalc();
|
||||
else if (ctx.Match(k, Xoapi_html_box.Evt_load_tid_changed)) html_load_tid = m.ReadByte("v");
|
||||
else return GfoInvkAble_.Rv_unhandled;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ public class Xog_win_itm implements GfoInvkAble, GfoEvObj {
|
||||
page.Wiki().ParsePage_root(page, true); // NOTE: must reparse page if (a) Edit -> Read; or (b) "Options" save
|
||||
Xoa_url url = page.Url();
|
||||
if (url.Args_exists(Xoa_url_parser.Bry_arg_action, Xoa_url_parser.Bry_arg_action_edit)) // url has ?action=edit
|
||||
app.Url_parser().Parse(url, url.X_to_full()); // remove all query args; handle (1) s.w:Earth?action=edit; (2) click on Read; DATE:2014-03-06
|
||||
app.Url_parser().Parse(url, url.Xto_full_bry()); // remove all query args; handle (1) s.w:Earth?action=edit; (2) click on Read; DATE:2014-03-06
|
||||
}
|
||||
tab.View_mode_(new_mode_tid);
|
||||
if (page.Missing()) return;
|
||||
@@ -246,12 +246,12 @@ public class Xog_win_itm implements GfoInvkAble, GfoEvObj {
|
||||
public byte[] App__retrieve_by_url(String url_str, String output_str) {
|
||||
synchronized (App__retrieve__lock) {
|
||||
boolean output_html = String_.Eq(output_str, "html");
|
||||
Xoa_url url = new Xoa_url();
|
||||
byte[] url_bry = Bry_.new_utf8_(url_str);
|
||||
Xow_wiki home_wiki = app.User().Wiki();
|
||||
Xoa_ttl ttl = Xoa_ttl.parse_(home_wiki, Xoa_page_.Main_page_bry); // NOTE: must be Main_Page, not "" else Firefox Addon will fail; DATE:2014-03-13
|
||||
Xoa_page new_page = Xoa_page.new_(home_wiki, ttl);
|
||||
this.Active_page_(new_page);
|
||||
Xoa_url url = Xoa_url.blank_();
|
||||
url = Xoa_url_parser.Parse_url(url, app, new_page.Wiki(), url_bry, 0, url_bry.length, true);
|
||||
new_page.Url_(url);
|
||||
return App__retrieve_by_href(url, output_html);
|
||||
|
||||
Reference in New Issue
Block a user