Comments (11)
I'm having this same problem. Really annoying. But, after some investigation, I've realized the problem doesn't show up because of using the zoom, but more specifically, because of having an initial default zoom.
I mean, if you, as I, use the typical trick to set an initial zoom level (a user stylesheet, as described here), then you get the wrong behaviour.
But, if you remove the user stylesheet, then this extension behaves well, even if you use zoom once the page has loaded. Below is a screenshot of the same page above, with two zoom-in levels applied.
So, that doesn't fix the problem yet, if you (like me) want to have a default zoom level. But, while a fix is available, it's perhaps worth knowing you can just disable your user stylesheet to have vimari working well.
Because you also have a user stylesheet, don't you? ;-)
from vimari.
Yeah, I did realize that I could disable the stylesheet, I'm actually using ZoomBySite which is probably interfering with it. It would definitely be a nice limitation to overcome. Google Chrome's built in zooming remembers your zoom level per site, but Safari doesn't which is kind of a pain since you have to re-zoom-in each time you go to the same site.
from vimari.
I've been browsing the source and am pretty sure this could have an easy solution just if it were possible to find out the initial zoom level by means of javascript.
In injected.js, line 23, you can read:
currentZoomLevel = 100
That's a global var that never gets touched again.
I've modified it locally to 150, which is the zoom level my user stylesheet sets, and it works perfectly.
So, the ideal thing should be to be able to, at that point in code, dynamically determine current zoom level through javascript, and setting that var to the proper value.
Unfortunately, I've been looking for a way to do that, and it seems currently it's impossible. There seems to be no javascript API to access that.
I've opened a question in the Safari developer forum: https://devforums.apple.com/thread/213645?tstart=0
Let's see if somebody answers. It seems a very slow forum.
from vimari.
Setting the zoom level in injected.js will work for a page with a set zoom level, but not if you change the zoom level once the page is loaded. A better place to check would be
which is where the link hints are actually rendered.
Actually detecting the zoom... so far google is not showing up much :(
from vimari.
Well, yes, what you (@guyht) say was what seemed logical to me at first: to adjust the zoom factor when rendering link hints.
But, for reasons I don't understand quite well right now, it works ok for me if the initial zoom level is correctly set.
It seems that changing zoom after page load (through Cmd+,Cmd-,Cmd0) doesn't affect what can be seen through javascript, nor rendering calculations.
It's as if.... javascript was operating in one coordinate system, and the zoom level changed by Cmd keys operated in another, completely orthogonal/independent from the first one. Which would be the reason why you can't access the current zoom level through javascript.
Really weird. That's why I opened that question at the dev forum. To see if somebody knows if there are two different, non related, zoom mechanisms, which, to me, would be the only logical explanation to this all.
Anyhow, I'm a bit confused now. I will recheck what I've said to see if it really holds.
from vimari.
@eliseomarmol I think what you said initially was correct, I was just mentioning that if we want it to keep up with zoom changes post page load we will need to update it in linkHints.js
from vimari.
I know that he ZoomBySite extension uses the javascript zoom level because it intercepts the cmd + and cmd - to adjust the zoom level. I can't say the same for a user defined style sheet though which probably initially uses the javascript zoom level and then afterwards changes are made using safari's zoom.
from vimari.
I've had no luck by now.
This StackOverflow question was the best info I got. I tried several things mentioned there:
document.width / document.body.clientWidth
did the trick for some sites, but not all (failed for those with no doctype, for example).- I tried using this code, with no luck either.
In fact, this project seems like authoritative to this respect, and there, it says that recent browser changes make this endeavour nearly impossible. I think we should perhaps contact tombigel, to get high-quality and updated info regarding this incredibly confusing but apparently simple matter. Maybe it's impossible for all browsers in general, but we only need webkit here...
from vimari.
How do people generally use the zoom level? Is it set per site, or is it constant across all sites? If the latter then we could add an option to vimari to manually set the zoom level,
from vimari.
I tend to set different zoom levels across different sites depending on how the site is laid out (some sites don't allow a lot of flexibility this way). Chrome remembers zoom levels for each domain, but Safari doesn't seem to do this unfortunately, hence the ZoomBySite extension.
from vimari.
Is this still an issue? I'm not totally clear on what the issue is, and what the prerequisites are to trigger it.
It looks like Safari 12/13's zoom does work per-site. I can see that the link hints don't line up if you have them open before zooming, but cancelling and then pressing f
again make them show up aligned.
We might be able to detect zoom events and make the links re-display, but I'm not sure if that's the issue being described here?
from vimari.
Related Issues (20)
- Remove delay with J/K scrolling HOT 4
- Unusually Slow Tab Closing HOT 1
- Click not working on gmail delete icon
- Scroll using "j" and "k" not working in gmail and opened pdfs
- URL bar still selected after loading page
- Arrow key scrolling goes too far
- Switch to Tab 1, 2, 3...9 with number key
- Distinguish between things that are links and things that are buttons with actions
- Issue with the excludedUrls parameter
- Is this
- What's the status of this project? HOT 3
- Implement link-hint filtering ala Vimium
- app is not in India market HOT 4
- PROJECT ABANDONED HOT 1
- On Sonoma j/k scrolling the page, but arrow-up/arrow-down not HOT 1
- Support for PDF files
- On new mac, when pressing `j` or `k` key to move up/down, it goes down a bit, then 2 second pause, then goes again.. HOT 1
- Custom keybindings don't work
- Getting `TypeError: undefined is not an object (evaluating 'combination.replace')` error in console on every page HOT 3
- Vimari does not work on Jira web page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vimari.