bookmarklet have fascinated me. I had created a virtual keyboard bookmarklet before. This time around the problem that I was trying to solve was to find out the
angle between two lines of a geometrical figure. You may ask why would one need
to know the angle between two lines of a geometrical image on a web page. Well I
had to go through this while trying to draw inspiration (actually plagiarise)
from various designs of furniture and interior decorations from the web. How do
I replicate the design? I need to know the lengths and angles. Right?
This bookmarklet works in a very simple way. Once you invoke it, it asks you to select the four points on the screen. The first two points denote the first line and the last two points denote the second line. You select the points by clicking with your mouse. Duh!! Once you have selected the four points, you get an alert with the angle formed by these two lines in degrees.
Below is a screenshot of the bookmarklet in action. The red ‘X’es indicate the four points that I had clicked.