add gotop and gobottom functions
This commit is contained in:
parent
88efc15704
commit
38dae3a9d3
4
config.h
4
config.h
|
@ -29,5 +29,7 @@ KEYBINDS {
|
||||||
{ MODKEY, GDK_KEY_r, reload },
|
{ MODKEY, GDK_KEY_r, reload },
|
||||||
{ MODSFT, GDK_KEY_R, reloadforce },
|
{ MODSFT, GDK_KEY_R, reloadforce },
|
||||||
{ NOMODK, GDK_KEY_F11, fullscreen },
|
{ NOMODK, GDK_KEY_F11, fullscreen },
|
||||||
{ MODSFT, GDK_KEY_H, history }
|
{ MODSFT, GDK_KEY_H, history },
|
||||||
|
{ MODKEY, GDK_KEY_g, gotop },
|
||||||
|
{ MODSFT, GDK_KEY_G, gobottom }
|
||||||
};
|
};
|
||||||
|
|
|
@ -46,5 +46,7 @@ enum {
|
||||||
up,
|
up,
|
||||||
reload,
|
reload,
|
||||||
reloadforce,
|
reloadforce,
|
||||||
history
|
history,
|
||||||
|
gotop,
|
||||||
|
gobottom
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# FIXME: Sometimes when new bookmark added cant open it
|
||||||
|
|
||||||
BOOKMARKS_PATH=~/.cache/rose/bookmarks
|
BOOKMARKS_PATH=~/.cache/rose/bookmarks
|
||||||
|
|
||||||
search()
|
search()
|
||||||
|
|
10
window.c
10
window.c
|
@ -181,6 +181,16 @@ static gboolean key_press_callback(RoseWindow *window,
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
case gotop: {
|
||||||
|
webkit_web_view_run_javascript(window->webview, "window.scrollTo(0,0);", NULL, NULL, NULL);
|
||||||
|
} break;
|
||||||
|
|
||||||
|
case gobottom: {
|
||||||
|
webkit_web_view_run_javascript(
|
||||||
|
window->webview,
|
||||||
|
"window.scrollTo(0, document.body.scrollHeight);",
|
||||||
|
NULL, NULL, NULL);
|
||||||
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user