User:Elominius/diff arrow keys without CTRL.js

// diff arrow keys: navigate revisions conveniently with ← and →.

var prev_diff_link=document.getElementById("differences-prevlink"); var next_diff_link=document.getElementById("differences-nextlink");

window.addEventListener("keydown", function(key_bind) { key_bind = key_bind || window.event;  if (key_bind.type=="keydown" && key_bind.which == 37 ) { if (prev_diff_link) { document.location.href=prev_diff_link.href; return false; } }  if (key_bind.type=="keydown" && key_bind.which == 39 ) { if (next_diff_link) { document.location.href=next_diff_link.href; return false; } }  return true;	} );