From 992366246d79e2ee7e3a2c542c3c9bc288d9c659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Mon, 25 Aug 2014 12:20:58 +0200 Subject: [PATCH] Ignore hash when comparing PaperScript URLs. --- src/core/PaperScript.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/PaperScript.js b/src/core/PaperScript.js index e89d4112..5e87f3fb 100644 --- a/src/core/PaperScript.js +++ b/src/core/PaperScript.js @@ -272,7 +272,7 @@ Base.exports.PaperScript = (function() { || browser.webkit && version >= 537.76 // >= Safari 7.0.4 || browser.firefox && version >= 23) { var offset = 0; - if (url === window.location.href) { + if (window.location.href.indexOf(url) === 0) { // If the code stems from the actual html page, determine the // offset of inlined code. var html = document.getElementsByTagName('html')[0].innerHTML;