mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
This commit is contained in:
commit
2b3f6cf6a9
@ -36,6 +36,9 @@ def pre_format_html_hook(url, html):
|
|||||||
if re.search("cygwin\.com", url):
|
if re.search("cygwin\.com", url):
|
||||||
html2 = re.sub("<body bgcolor=\"#000000\" color=\"#000000\"", "<body bgcolor=\"#ffffff\" color=\"#000000\"", html)
|
html2 = re.sub("<body bgcolor=\"#000000\" color=\"#000000\"", "<body bgcolor=\"#ffffff\" color=\"#000000\"", html)
|
||||||
return html2
|
return html2
|
||||||
|
if re.search("https://www.mbank.com.pl/ib_navibar_3.asp", url):
|
||||||
|
html2 = re.sub("<td valign=\"top\"><img", "<tr><td valign=\"top\"><img", html)
|
||||||
|
return html2
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def proxy_for_hook(url):
|
def proxy_for_hook(url):
|
||||||
|
@ -723,7 +723,16 @@ static struct option_info config_options_info[] = {
|
|||||||
|
|
||||||
INIT_OPT_TREE("document", N_("URI passing"),
|
INIT_OPT_TREE("document", N_("URI passing"),
|
||||||
"uri_passing", OPT_SORT | OPT_AUTOCREATE,
|
"uri_passing", OPT_SORT | OPT_AUTOCREATE,
|
||||||
N_("Rules for passing URIs to external commands.")),
|
N_("Rules for passing URIs to external commands. When one rule\n"
|
||||||
|
"is defined the link and tab menu will have a menu item that\n"
|
||||||
|
"makes it possible to pass the the link, frame or tab URI to\n"
|
||||||
|
"an external command. If several rules are defined the link and\n"
|
||||||
|
"tab menu will have a submenu of items for each rule. Note, this\n"
|
||||||
|
"is mostly useful for launching graphical viewers, since there\n"
|
||||||
|
"is not support for releasing the terminal while the command runs.\n"
|
||||||
|
"The action and submenus are also available by binding keys to\n"
|
||||||
|
"the frame-external-command, the link-external-command, and\n"
|
||||||
|
"the tab-external-command actions.")),
|
||||||
|
|
||||||
INIT_OPT_STRING("document.uri_passing", NULL,
|
INIT_OPT_STRING("document.uri_passing", NULL,
|
||||||
"_template_", 0, "",
|
"_template_", 0, "",
|
||||||
|
@ -1021,7 +1021,7 @@ void
|
|||||||
move_download(struct download *old, struct download *new,
|
move_download(struct download *old, struct download *new,
|
||||||
enum connection_priority newpri)
|
enum connection_priority newpri)
|
||||||
{
|
{
|
||||||
struct connection *conn = old->conn;
|
struct connection *conn;
|
||||||
|
|
||||||
assert(old);
|
assert(old);
|
||||||
|
|
||||||
@ -1029,7 +1029,9 @@ move_download(struct download *old, struct download *new,
|
|||||||
* example the file protocol loads it's object immediately. This is
|
* example the file protocol loads it's object immediately. This is
|
||||||
* catched by the result state check below. */
|
* catched by the result state check below. */
|
||||||
|
|
||||||
new->conn = old->conn;
|
conn = old->conn;
|
||||||
|
|
||||||
|
new->conn = conn;
|
||||||
new->cached = old->cached;
|
new->cached = old->cached;
|
||||||
new->prev_error = old->prev_error;
|
new->prev_error = old->prev_error;
|
||||||
new->progress = old->progress;
|
new->progress = old->progress;
|
||||||
@ -1037,8 +1039,12 @@ move_download(struct download *old, struct download *new,
|
|||||||
new->pri = newpri;
|
new->pri = newpri;
|
||||||
|
|
||||||
if (is_in_result_state(old->state)) {
|
if (is_in_result_state(old->state)) {
|
||||||
if (new->callback)
|
/* Ensure that new->conn is always "valid", that is NULL if the
|
||||||
|
* connection has been detached and non-NULL otherwise. */
|
||||||
|
if (new->callback) {
|
||||||
|
new->conn = NULL;
|
||||||
new->callback(new, new->data);
|
new->callback(new, new->data);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -967,10 +967,7 @@ tp_display(struct type_query *type_query)
|
|||||||
new->callback = (download_callback_T *) doc_loading_callback;
|
new->callback = (download_callback_T *) doc_loading_callback;
|
||||||
new->data = ses;
|
new->data = ses;
|
||||||
|
|
||||||
if (is_in_progress_state(old->state))
|
|
||||||
move_download(old, new, PRI_MAIN);
|
move_download(old, new, PRI_MAIN);
|
||||||
else
|
|
||||||
new->state = old->state;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
display_timer(ses);
|
display_timer(ses);
|
||||||
|
@ -604,10 +604,18 @@ doc_loading_callback(struct download *download, struct session *ses)
|
|||||||
print_screen_status(ses);
|
print_screen_status(ses);
|
||||||
|
|
||||||
#ifdef CONFIG_GLOBHIST
|
#ifdef CONFIG_GLOBHIST
|
||||||
if (download->conn && download->pri != PRI_CSS) {
|
if (download->pri != PRI_CSS) {
|
||||||
unsigned char *title = ses->doc_view->document->title;
|
unsigned char *title = ses->doc_view->document->title;
|
||||||
struct uri *uri = download->conn->proxied_uri;
|
struct uri *uri;
|
||||||
|
|
||||||
|
if (download->conn)
|
||||||
|
uri = download->conn->proxied_uri;
|
||||||
|
else if (download->cached)
|
||||||
|
uri = download->cached->uri;
|
||||||
|
else
|
||||||
|
uri = NULL;
|
||||||
|
|
||||||
|
if (uri)
|
||||||
add_global_history_item(struri(uri), title, time(NULL));
|
add_global_history_item(struri(uri), title, time(NULL));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user