User:Elominius/common.js

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

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

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