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

Delta Between Two Patch Sets: safari/content.js

Issue 6369485355220992: Fixed reload issue in Chrome (Closed)
Left Patch Set: Created Nov. 15, 2013, 1:08 p.m.
Right Patch Set: Created Nov. 15, 2013, 1:44 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « safari/background.js ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 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
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 safari.self.tab.dispatchMessage("loading", document.location.href);
Felix Dahlke 2013/11/15 13:28:38 Why not move this into the IIFE?
Sebastian Noack 2013/11/15 13:45:29 As you wish. I didn't put it into the IIFE in the
Felix Dahlke 2013/11/15 13:48:49 Oh, I actually meant "under" the IIFE (whether it'
19
20 (function() 18 (function()
21 { 19 {
20 safari.self.tab.dispatchMessage("loading", document.location.href);
21
22
22 /* Background page proxy */ 23 /* Background page proxy */
23 var proxy = { 24 var proxy = {
24 objects: [], 25 objects: [],
25 callbacks: [], 26 callbacks: [],
26 27
27 send: function(message) 28 send: function(message)
28 { 29 {
29 var evt = document.createEvent("Event"); 30 var evt = document.createEvent("Event");
30 evt.initEvent("beforeload"); 31 evt.initEvent("beforeload");
31 return safari.self.tab.canLoad(evt, {type: "proxy", payload: message}); 32 return safari.self.tab.canLoad(evt, {type: "proxy", payload: message});
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 ext.backgroundPage = { 295 ext.backgroundPage = {
295 _eventTarget: safari.self, 296 _eventTarget: safari.self,
296 _messageDispatcher: safari.self.tab, 297 _messageDispatcher: safari.self.tab,
297 298
298 sendMessage: sendMessage, 299 sendMessage: sendMessage,
299 getWindow: function() { return proxy.getObject(0); } 300 getWindow: function() { return proxy.getObject(0); }
300 }; 301 };
301 302
302 ext.onMessage = new MessageEventTarget(safari.self); 303 ext.onMessage = new MessageEventTarget(safari.self);
303 })(); 304 })();
LEFTRIGHT

Powered by Google App Engine
This is Rietveld