From c0326ad7d99623dee7d84d3bb3ab52a8a8491e9a Mon Sep 17 00:00:00 2001 From: Ashley Blewer Date: Sun, 3 Dec 2017 12:14:33 -0500 Subject: [PATCH] links to website permalink even when loading locally --- js/js.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/js.js b/js/js.js index 81eaa63..2b3b208 100644 --- a/js/js.js +++ b/js/js.js @@ -3,10 +3,11 @@ $(document).ready(function() { // open recipe window if a hash is found in URL if(window.location.hash) { id = window.location.hash + console.log(id.substring(1)) document.getElementById(id.substring(1)).checked = true; $('html, body').animate({ scrollTop: $(id).offset().top}, 1000); $(id).closest('div').find('.link').empty(); - $(id).closest('div').find('.link').append("Link to this command: "+window.location.href+""); + $(id).closest('div').find('.link').append("Link to this command: https://amiaopensource.github.io/ffmprovisr/index.html"+window.location.hash+""); } // add hash URL when recipe is opened @@ -14,7 +15,7 @@ $(document).ready(function() { id = $(this).attr("for"); window.location.hash = ('#' + id) $('#' + id).closest('div').find('.link').empty(); - $('#' + id).closest('div').find('.link').append("Link to this command: "+window.location.href+""); + $('#' + id).closest('div').find('.link').append("Link to this command: https://amiaopensource.github.io/ffmprovisr/index.html"+window.location.hash+""); }); });