Git Product home page Git Product logo

hanzisize's Introduction

Hanzisize

What's new in version 0.2.7?

  • Small, Medium, and Large font size buttons

The font size slider has been replaced with three easier to use font size buttons and a custom font size input field

  • Hotkeys

Users can now resize page content using keyboard hotkeys, instead of having to click the extension icon every time. The default hotkeys are:

"Shift+Alt+Q" - Initiate resizing using the most recent language and fontsize settings

"Shift+Alt+W" - Open the Hanzisize menu

These default hotkeys can be changed to the key combination of your choice in your browser settings.

Donate

Hi there. I'm Ryan, the sole developer of Hanzisize. I've spent hundreds of hours working on Hanzisize while making it available for anyone to use for free. If you are able, please consider donating so I can continue to improve this tool for all of us. If you're not able to donate, please leave a review of this extension on the extension webstore of your choice so more people can find it. Thanks for your support! You can show your appreciation for Hanzisize by donating in the following ways:

  • Buy me a matcha latte!

buy me a coffee button

  • Donate Bitcoin!

bitcoin qr code

  • Paypal me!

  • Send a donation to @hanzisize on Venmo

  • Or check out my Redbubble store!

What is Hanzisize?

Hanzisize is a browser extension that allows selective resizing of text according to the language selected by the user.

Why do I need it?

The inspiration for this browser extension came from my own frustration trying to read very small Chinese script online. I wanted to enlarge the font-size of Chinese characters without changing the size of English text or any other elements on the page.

How does it work?

The current version of Hanzisize is able to selectively resize Arabic, Burmese, Chinese, English, Georgian, Korean, Hebrew, Hindi, Japanese, and Thai text. Other languages may be added later based on demand.

Hanzisize allows for easy increasing and decreasing font-size on the page, with a few limitations. For example, the font size of an element can never be smaller than it was when the page was first loaded. This prevents headers and other large font size elements from shrinking while small paragraph text is enlarged.

Privacy

Hanzisize does not collect or transmit any user data. The only information that is stored are the most recent language and font size settings for user convenience. This data is stored in the user's browser and is not transmitted externally or used for any other purpose.

Have a suggestion about how to improve Hanzisize?

You can email me at [email protected], or if you have a Github account you can create an "Issue" and let me know how you think Hanzisize can be improved!

How do I install it?

Production

Install on Google Chrome

Install on Mozilla Firefox

Install on Microsoft Edge

Development

Chrome

  1. Clone repository OR download and extract ZIP file from github.com/rjpeterson/Hanzisize
  2. Install Node Package Manager and run 'npm install' from the Hanzisize root directory you just extracted/cloned to
  3. Run 'npm run build' from the Hanzisize root directory
  4. Open Chrome and go to this address: chrome://extensions/ (or the applicable extensions page if using other Chrome-based browsers)
  5. Click 'Load Unpacked' and select the 'build' folder in the Hanzisize root directory

Firefox

  1. Clone repository OR download and extract ZIP file from github.com/rjpeterson/Hanzisize
  2. Install Node Package Manager and run 'npm install' from the Hanzisize root directory you just extracted/cloned to
  3. Run 'npm run build' from the Hanzisize root directory
  4. Open Firefox Developer Edition and navigate to about:debugging
  5. Click 'This Firefox', then click 'Load Temporary Add-on...'
  6. Navigate to 'Hanzisize/build/web-ext-artifacts', select the zip file and click 'Open'

hanzisize's People

Contributors

rjpeterson avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hanzisize's Issues

Firefox webstore issue

Firefox extensions aren't allowed to contain remote scripts.
create-react-app build process uses workbox to create a service worker and injects a remote script in the process

Needs visual overhaul

Update colors, simplify interface using slider for font size, change "more info" button, left/right arrow or typing for language changing, maybe hide language most of the time?

Upgrade to manifest v3

Chrome extension manifest v3 won't allow loading external scripts. Basically the same problem as the Firefox webstore version.

Add font change feature

suggestion from reddit:
'Sounds awesome! I cant look at it now but is there a possibility of forcing a specific font for the Chinese characters as well? I love Kai Ti (I think its called or something close to that)'

Cleanup code in background script

The background script that enables resizing via hotkey is currently just copy-pasted code from other parts of the extension with unneeded parts commented out. It should be cleaned up and unneeded code removed.

Merge Chinese & Japanese functions

(or at least make them do the same thing with separate selectbox entries)

Resizing Japanese skips over any element nodes that are only Kanji with no katakana or hiragana. This is bad because Kanji are the most complex and the most necessary to resize.

Add more languages

  • Hangul (Korean)
  • Thai
  • Arabic
  • Hebrew
  • Hindi
  • Latin-based(relabel English)
  • Georgian
  • Burmese

Hebrew regex incomplete

From /r/hebrew

זײַט אַזוי גוט קאָריגיר מיך
etalasi
2 minutes ago
I don't have a Github account to report an issue, but your regex expression for the Hebrew script in line 19 of contentScript.js covers only the Unicode block named "Hebrew" from U-0590 to U-05FF
ְֱֲֳִֵֶַָֹֺֻּֽ֑֖֛֢֣֤֥֦֧֪֚֭֮֒֓֔֕֗֘֙֜֝֞֟֠֡֨֩֫֬֯־ֿ׀ׁׂ׃ׅׄ׆ׇאבגדהוזחטיךכלםמןנסעףפץצקרשתׯװױײ׳״
and doesn't include the Hebrew letters in Alphabetic Presentation Forms (PDF) from U-FB1D to U-FB4F.
יִﬞײַﬠﬡﬢﬣﬤﬥﬦﬧﬨ﬩שׁשׂשּׁשּׂאַאָאּבּגּדּהּוּזּטּיּךּכּלּמּנּסּףּפּצּקּרּשּתּוֹבֿכֿפֿﭏ
I generated the strings of characters from each Unicode block with https://r12a.github.io/uniview, in case that helps you for testing.

Text that is preceded by a link within a span does not change size

In the following code, text inside the tag gets resized while the text between and does not.

<span><a class="notranslate text-elem English-elem" href="/steapd_tea/" tabindex="0" style="--data-original-font-size:14px; font-size: 21px !important; line-height: normal !important;">@steapd_tea</a> hmm that's fascinating! 🙏might have to try some now😁</span>

DOM scanning is too slow

  • find and remove unnecessary async calls
  • reorganize function calling to optimize speed
  • implement html element indexing so 2nd, 3rd, 4th resizings are faster
  • scan dom on popup and language change, tag elements to change, change on newfontsize (removes repeated regex)

Using extension on google search results gives error

Error content: Unchecked runtime.lastError: This page cannot be scripted due to an ExtensionsSettings policy.

Can be solved by checking "Allow access to search page results" in extension settings.
This needs to be communicated through the popup notification div.

Popup should initialize to default interface, then change if error

Current popup function is to initialize to "loading..." and then load interface after response is received from injected content script.

This works OK but results in significant delay when content script injects slowly like on Edge browser.

Instead, we should load basic interface first and allow user to input values immediately even if content script is not injected yet.
If script injects successfully, send content object. If not, display error.

Create Github Pages documentation site

Currently the only "website" for Hanzisize is the Chrome and Firefox webstores. So, we should create a basic Github Pages website to provide new users information on how to use the extension, new features & releases, etc. This also will help with promotion of the extension.

Auto-increment version numbering

Manually changing version numbers in package.json as well as in manifest.json is annoying and error-prone. I would like it to be automated to increment on every "git push"

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.