Calculator Demo
A simple WebView calculator
Description
Uses HTML CSS JavaScript in a WebView to display a calculator.
- Works on ipad with no banner (add to dock for quick access).
- Very small shortcut size
- Works Offline, no internet required.
- Small size makes it lightweight and fast to open
Need to Fix: .1 + .2
⚠️Beware the following⚠️:
This is an eval calculator which means it uses JavaScript's eval function to evaluate the calculations.
This means that numbers with zero in the beginning will be evaluated as Octal due to the way JavaScript interprets numbers. For example:
010 + 1 = 9
Putting zeros in front of numbers cause them to be interpreted as octal numbers. The following regex string replace will fix the issue if negative lookbehind assertions are ever added to Safari.
(?<!\.)\b0+(?!\b)
I say if because it's been 5+ years. https://bugs.webkit.org/show_bug.cgi?id=174931
I guess if you were looking for an octal calculator this would be perfect for you haha😅
Remarks:
This was the calculator I worked on and used on Android. I can't remember the source I forked it from, since my phone broke but I had this code saved. I only changed a bit of CSS code to fix the button effect for safari browsers.
My CSS is not the best, but I made it somewhat responsive since on Android I could use it with resizable floating windows. As a result it scales up and works on ipad nicely👍
I'm currently working on a different WebView calculator with ios styling. It already has fixes for some of the problems this one has like preventing duplicate symbols (need to make exception for power "**" 🤔)
Latest Release Notes
1 - Oct. 2, 2022, 8:40 a.m.
First release