Git Product home page Git Product logo

Comments (9)

tombh avatar tombh commented on May 26, 2024 2

I rarely have a need for this, so I agree it's low priority.

I think it'd be good if the magnifier also showed the original text as rendered by the browser, so you could quickly discern any discrepancies. And also it'd be good if mouse clicks where magnified too, so you could click on fiddly little UI buttons.

from browsh.

Yash-Singh1 avatar Yash-Singh1 commented on May 26, 2024 2

@tombh Check this StackOverFlow Answer out: https://stackoverflow.com/a/10464073/13514657
Maybe we can apply it in the Web Extension.

from browsh.

Yash-Singh1 avatar Yash-Singh1 commented on May 26, 2024 2

Never mind, I forgot that Browsh uses Firefox. The StackOverFlow answer only is for Chrome. To get it working on Firefox we need to apply the following CSS:

body {
	-moz-transform: scale(0.4);
	-moz-transform-origin: 0 0
}

The scale value on -moz-transform will have to be changed. Open up about:blank and type in the following in the console:

document.body.style['-moz-transform']=<scale>

Replace <scale> with your scale value. This works perfectly with Firefox. Whenever Ctrl + + is triggered then we need to send a zoom-in call to the WebExt which will run:

document.body.style['-moz-transform']+=0.1

Whenever Ctrl + - is triggered then we need to send a zoom-in call to the WebExt which will run:

document.body.style['-moz-transform']-=0.1

At the initialization of a tab, we need to run:

document.body.style['-moz-transform']=1.0

On that tab.

from browsh.

niutech avatar niutech commented on May 26, 2024 2

You no longer need to use -moz-transform, Firefox supports transform.

from browsh.

daniellandau avatar daniellandau commented on May 26, 2024 1

My use case for this would be to render QR codes in a way that they are scannable. The main website I'd like to do this on is web.whatsapp.com, but I imagine it'd be useful elsewhere too.

from browsh.

tombh avatar tombh commented on May 26, 2024 1

Yes! I have exactly the same issue! Imagine being able to use Whatsapp in the terminal :D

from browsh.

Mart-Bogdan avatar Mart-Bogdan commented on May 26, 2024 1

I'm just thinking that we could add a hotkey to force FF to render visible screen into jpg/png/pdf into the current directory, which could be fetched by ssh(sftp/scp) and viewed on the client machine. would be useful for captchas. And other use-cases are possible too,

from browsh.

tobimensch avatar tobimensch commented on May 26, 2024

Very low priority and not really necessary in my opinion.

Is the intention of this to zoom into images?

I think it would be more useful if the user had an easy way to get an image's URL. If he really wanted to view an image, he could also load it in a traditional browser

from browsh.

Yash-Singh1 avatar Yash-Singh1 commented on May 26, 2024

Hey there, I recently added in this feature inside a new project I created: zoom.js. Here is the link if you want to look at it. If you would like to preview the zooming inside firefox, go to the test link and run:

test();

Inside the console.
Also, the previous comment I put had some mistakes. We would need to run:

document.body.style['-moz-transform-origin'] = "0 0";
document.body.style['-moz-transform'] = "scale(1)";

At the initialization of each tab. Every time we zoom-in:

let newFloat = parseFloat(document.body.style["-moz-transform"].substring(6,document.body.style["-moz-transform"].length - 1))
newFloat += 1
document.body.style["-moz-transform"] = "scale(" + newFloat + ")";

Everytime we zoom-out:

let newFloat = parseFloat(document.body.style["-moz-transform"].substring(6,document.body.style["-moz-transform"].length - 1))
newFloat -= 1
document.body.style["-moz-transform"] = "scale(" + newFloat + ")";

from browsh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.