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

Side by Side Diff: safari/ext/content.js

Issue 5193308200501248: Issue 1287 - Use window.location instead document.location (Closed)
Patch Set: Created Aug. 29, 2014, 3:33 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include.preload.js ('k') | safari/ext/popup.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 17 matching lines...) Expand all
28 var beforeLoadEvent = document.createEvent("Event"); 28 var beforeLoadEvent = document.createEvent("Event");
29 beforeLoadEvent.initEvent("beforeload"); 29 beforeLoadEvent.initEvent("beforeload");
30 30
31 var isTopLevel = window == window.top; 31 var isTopLevel = window == window.top;
32 var isPrerendered = document.visibilityState == "prerender"; 32 var isPrerendered = document.visibilityState == "prerender";
33 33
34 var documentInfo = safari.self.tab.canLoad( 34 var documentInfo = safari.self.tab.canLoad(
35 beforeLoadEvent, 35 beforeLoadEvent,
36 { 36 {
37 category: "loading", 37 category: "loading",
38 url: document.location.href, 38 url: location.href,
39 referrer: document.referrer, 39 referrer: document.referrer,
40 isTopLevel: isTopLevel, 40 isTopLevel: isTopLevel,
41 isPrerendered: isPrerendered 41 isPrerendered: isPrerendered
42 } 42 }
43 ); 43 );
44 44
45 if (isTopLevel && isPrerendered) 45 if (isTopLevel && isPrerendered)
46 { 46 {
47 var onVisibilitychange = function() 47 var onVisibilitychange = function()
48 { 48 {
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 messageProxy.handleResponse(event.message); 428 messageProxy.handleResponse(event.message);
429 break; 429 break;
430 case "proxyCallback": 430 case "proxyCallback":
431 backgroundPageProxy.handleCallback(event.message); 431 backgroundPageProxy.handleCallback(event.message);
432 break; 432 break;
433 } 433 }
434 } 434 }
435 } 435 }
436 }); 436 });
437 })(); 437 })();
OLDNEW
« no previous file with comments | « include.preload.js ('k') | safari/ext/popup.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld