mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 17:41:40 -05:00
Add zoom command
This commit is contained in:
parent
a8320c33a7
commit
fc9b34d08c
2 changed files with 12 additions and 0 deletions
|
@ -182,6 +182,13 @@ export function clicknext(dir = "next"){
|
|||
// Stops us from having to hardcode in RPS and reddit, for example.
|
||||
window.location.href = nextlinks.slice(-1)[0].href
|
||||
}
|
||||
|
||||
//#background
|
||||
export function zoom(level=0){
|
||||
level = level > 3 ? level / 100 : level
|
||||
browser.tabs.setZoom(level)
|
||||
}
|
||||
|
||||
// }}}
|
||||
|
||||
// {{{ TABS
|
||||
|
|
5
src/tridactyl.d.ts
vendored
5
src/tridactyl.d.ts
vendored
|
@ -20,3 +20,8 @@ interface Window {
|
|||
declare namespace browser.find {
|
||||
function find(query, object): any
|
||||
}
|
||||
|
||||
// setZoom has an optional first argument of tabId. Unclear how first argument can be optional.
|
||||
declare namespace browser.tabs {
|
||||
function setZoom(number): any
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue