'use strict' function mouseButtons(ev) { if(typeof ev === 'object') { if('buttons' in ev) { return ev.buttons } else if('which' in ev) { var b = ev.which if(b === 2) { return 4 } else if(b === 3) { return 2 } else if(b > 0) { return 1<<(b-1) } } else if('button' in ev) { var b = ev.button if(b === 1) { return 4 } else if(b === 2) { return 2 } else if(b >= 0) { return 1<