diff --git a/src/static/js/pad_editbar.js b/src/static/js/pad_editbar.js index 95d195058..29ec862e4 100644 --- a/src/static/js/pad_editbar.js +++ b/src/static/js/pad_editbar.js @@ -236,7 +236,7 @@ var padeditbar = (function() { if ($('#readonlyinput').is(':checked')) { - var basePath = document.location.href.substring(0, document.location.href.indexOf("/p/")); + var basePath = top.location.href.substring(0, top.location.href.indexOf("/p/")); var readonlyLink = basePath + "/ro/" + clientVars.readOnlyId; $('#embedinput').val("