Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: include.preload.js

Issue 5193308200501248: Issue 1287 - Use window.location instead document.location (Closed)
Patch Set: Created Aug. 29, 2014, 3:33 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | safari/ext/content.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include.preload.js
===================================================================
--- a/include.preload.js
+++ b/include.preload.js
@@ -100,9 +100,9 @@
if (url[0] == '/')
{
if (url[1] == '/')
- return document.location.protocol + url;
+ return location.protocol + url;
else
- return document.location.protocol + "//" + document.location.host + url;
+ return location.protocol + "//" + location.host + url;
}
// Remove filename and add relative URL to it
« no previous file with comments | « no previous file | safari/ext/content.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld