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

Delta Between Two Patch Sets: safari/ext/content.js

Issue 5092502491103232: Deal with preloadded pages in Safari 7.0 (Closed)
Left Patch Set: Created Jan. 23, 2014, 2:03 p.m.
Right Patch Set: Created Jan. 23, 2014, 3:21 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/ext/common.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
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 }; 48 };
49 49
50 50
51 /* Background page proxy */ 51 /* Background page proxy */
52 var proxy = { 52 var proxy = {
53 objects: [], 53 objects: [],
54 callbacks: [], 54 callbacks: [],
55 55
56 send: function(message) 56 send: function(message)
57 { 57 {
58 evt = document.createEvent("Event"); 58 var evt = document.createEvent("Event");
59 evt.initEvent("beforeload"); 59 evt.initEvent("beforeload");
60 return safari.self.tab.canLoad(evt, {type: "proxy", payload: message}); 60 return safari.self.tab.canLoad(evt, {type: "proxy", payload: message});
61 }, 61 },
62 checkResult: function(result) 62 checkResult: function(result)
63 { 63 {
64 if (!result.succeed) 64 if (!result.succeed)
65 throw result.error; 65 throw result.error;
66 }, 66 },
67 deserializeResult: function(result) 67 deserializeResult: function(result)
68 { 68 {
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 // so we need to add it to the event's user info. 444 // so we need to add it to the event's user info.
445 document.addEventListener("contextmenu", function(event) 445 document.addEventListener("contextmenu", function(event)
446 { 446 {
447 var element = event.srcElement; 447 var element = event.srcElement;
448 safari.self.tab.setContextMenuEventUserInfo(event, { 448 safari.self.tab.setContextMenuEventUserInfo(event, {
449 srcUrl: ("src" in element) ? element.src : null, 449 srcUrl: ("src" in element) ? element.src : null,
450 tagName: element.localName 450 tagName: element.localName
451 }); 451 });
452 }, false); 452 }, false);
453 })(); 453 })();
LEFTRIGHT

Powered by Google App Engine
This is Rietveld