From 5c634441eac87afc239e15d207cbd3059ff628a5 Mon Sep 17 00:00:00 2001 From: moparisthebest Date: Wed, 15 Feb 2017 21:58:20 -0500 Subject: [PATCH] Add ability to link to a specific hash --- src/main/webapp/js/phonehash.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/js/phonehash.js b/src/main/webapp/js/phonehash.js index 7d691a5..ea4731b 100644 --- a/src/main/webapp/js/phonehash.js +++ b/src/main/webapp/js/phonehash.js @@ -15,7 +15,11 @@ function unhash() { } $(document).ready(function () { - //alert('bob'); + var anchor_hash = $(location).attr('hash').substr(1); + if(valid_sha1.test(anchor_hash)) { + $('#hash').val(anchor_hash); + unhash(); + } $('#hash').keypress(function (e) { if (e.which == 13) { // enter unhash();