Skip to content
This repository has been archived by the owner on Oct 2, 2018. It is now read-only.

Commit

Permalink
Merge pull request #247 from twiss/chrome-sourceurl
Browse files Browse the repository at this point in the history
Add sourceURL to module scripts for Chrome DevTools
  • Loading branch information
ferndot committed Dec 7, 2014
2 parents 61f177b + 53daa52 commit ef87c33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if (!app) {
var scriptText = this.response;
scriptText = scriptText.replace(/\[ORIGIN_OF_MAIN_DOCUMENT\]/g, window.location.origin ? window.location.origin : window.location.protocol + "//" + window.location.host);
inlineScript.type = "text/javascript";
inlineScript.src = "data:text/javascript;base64," + btoa(scriptText);
inlineScript.src = "data:text/javascript;base64," + btoa(scriptText + '\n//# sourceURL=' + scriptURL);
scripts[scriptURL][0].parentNode.replaceChild(inlineScript, scripts[scriptURL][0]);
for (var i = 1; i < scripts[scriptURL].length; i++) {
scripts[scriptURL][i].parentNode.removeChild(scripts[scriptURL][i]);
Expand Down

0 comments on commit ef87c33

Please sign in to comment.