// Add the mouse listeners for the above functions
function linkHover() {
	window.onmouseover = function(event) {
		if (event.target.matches('a')) {
			window.webkit.messageHandlers.mouseDidEnter.postMessage(event.target.href);
		}
	}
	window.onmouseout = function(event) {
		if (event.target.matches('a')) {
			window.webkit.messageHandlers.mouseDidExit.postMessage(event.target.href);
		}
	}
}

function postRenderProcessing() {
	linkHover()
}

@@ -101,36 +101,52 @@
 tion(event) %7B%0A%09%09
-if (
+var closestAnchor = 
 event.target.mat
@@ -138,36 +138,56 @@
 vent.target.
-match
+clos
 es
+t
 ('a')
+%0A%09%09if (closestAnchor
 ) %7B%0A%09%09%09windo
@@ -233,36 +233,37 @@
 postMessage(
-event.target
+closestAnchor
 .href);%0A%09%09%7D%0A
@@ -306,20 +306,36 @@
 nt) %7B%0A%09%09
-if (
+var closestAnchor = 
 event.ta
@@ -343,20 +343,40 @@
 get.
-match
+clos
 es
+t
 ('a')
+%0A%09%09if (closestAnchor
 ) %7B%0A
@@ -433,28 +433,29 @@
 Message(
-event.target
+closestAnchor
 .href);%0A

Make mouseover/mouseout work with anchors that nest