diff --git a/themes/bootstrap3/js/record.js b/themes/bootstrap3/js/record.js
index 6d51bc0476f1b5c54f0e16975e8cc12301a39f56..0d986575859f9d9c03d6613a648170dda5f8cfb8 100644
--- a/themes/bootstrap3/js/record.js
+++ b/themes/bootstrap3/js/record.js
@@ -152,6 +152,15 @@ function registerTabEvents() {
   VuFind.lightbox.bind('.tab-pane.active');
 }
 
+function removeHashFromLocation() {
+  if (window.history.replaceState) {
+    var href = window.location.href.split('#');
+    window.history.replaceState({}, document.title, href[0]);
+  } else {
+    window.location.hash = '#';
+  }
+}
+
 function ajaxLoadTab($newTab, tabid, setHash) {
   // Parse out the base URL for the current record:
   var urlParts = document.URL.split(/[?#]/);
@@ -266,15 +275,6 @@ function applyRecordTabHash() {
   }
 }
 
-function removeHashFromLocation() {
-  if (window.history.replaceState) {
-    var href = window.location.href.split('#');
-    window.history.replaceState({}, document.title, href[0]);  
-  } else {
-    window.location.hash = '#';  
-  }
-}
-
 $(window).on('hashchange', applyRecordTabHash);
 
 function recordDocReady() {