Wouldn't it be nice if documentation were written for both right AND left handers?
Ideally, no extra markup would be required. A user of this plugin would simply chain .handedness()
onto the containing element of their choice. i.e.
$('.content').handedness();
- write default mouse button orientation to cookie or localStorage (righthanded).
- when ready, search for instances of ' click ' or 'left-click' and/or other strings that make sense. (note: ... this is harder than I expected.)
- wrap those matches with '' and ''.
- then search for instances of 'right-click' (+others).
- wrap those matches with '' and ''.
- then, add two buttons near top of document
- button1 = Lefty
- button2 = Righty
- if reader clicks Righty, that orientation is already set, do nothing.
- if reader clicks Lefty, change the internal text of all instances of span.mb-primary to 'right-click'. Also change the internal text of all instances of span.mb-secondary to 'left-click'.
- possibly, add svg/iconfont via css :before to display a small icon next to each span?