Git Product home page Git Product logo

too-wide's People

Contributors

dependabot[bot] avatar manngo avatar tretum avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

too-wide's Issues

I made a similar Greasemonkey custom script

Thank you for making an awesome Too Wide!. It has eased my eyes countless times.
There were some features that I hoped to have such as persistence (now it does have), but I was shy to contribute to your work.
While I was inspired by your previous version, I've made a Grease monkey custom script for myself.
https://gist.github.com/foriequal0/12794f45f5ef60249e8ba36f978dfaa4
I'm wondering whether you might be interested in some experimental approaches that mine has.

  1. It travels the DOM and make a heuristic decision based on getClientRects and text lengths. (although it has some false positive such as a lenovo website)
  2. It iteratively clamps the root document to match the target width for complex and poorly responsive documents.
  3. The target width is calculated with relative to the text size (in my script, it is 50em), not fixed pixel width.
  4. It applies following css to the document
:root {
  max-width: ${width}px;
  position: absolute;
  left: calc(50% - ${width}px / 2);
  transform: translate(calc(${width}px / 2 - 50%));
}`

It makes some difference on some elements that have position: fixed.
position: absolute & left & transform
image
Too wide!
image
Page: https://ko.wikipedia.org/wiki/%EA%B7%80%EC%9D%B8_%EC%9D%B4%EB%A1%A0

Always sets page width to 960px regardless of settings

On Firefox 111.0.1, the addon always sets the page width to 960px regardless of what is set in the addon button. I suspect fix-width.js is failing to access result[hostName].selectedPageWidth since a browser update?

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.