summaryrefslogtreecommitdiffstats
path: root/emacs.d/nxhtml/tests/in/bug-311640-index.html
diff options
context:
space:
mode:
Diffstat (limited to 'emacs.d/nxhtml/tests/in/bug-311640-index.html')
-rw-r--r--emacs.d/nxhtml/tests/in/bug-311640-index.html24
1 files changed, 24 insertions, 0 deletions
diff --git a/emacs.d/nxhtml/tests/in/bug-311640-index.html b/emacs.d/nxhtml/tests/in/bug-311640-index.html
new file mode 100644
index 0000000..64bb09b
--- /dev/null
+++ b/emacs.d/nxhtml/tests/in/bug-311640-index.html
@@ -0,0 +1,24 @@
+<script type="text/javascript">
+ // Set this to the URL you used to fetch recommendations, whether you
+ // fetched them on the client or the server.
+ var request_url = '%(json_url)s';
+
+ // This function is used track click-throughs by fetching a web
+ // beacon.n
+ function trackClickThrough(elem) {
+ var img = new Image();
+ img.src = '%(beacon_url)s' +
+ '?request_url=' + escape(request_url) +
+ '&click_through_url=' + escape(elem.href);
+ return true;
+ }
+</script>
+
+<p>
+ <!--
+ Imagine this is one of the recommendations that was returned.
+ Just add an onclick handler that calls trackClickThrough.
+ -->
+ <a href="http://www.google.com"
+ onclick="return trackClickThrough(this);">Click me!</a>
+</p>