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

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

Issue 6236888415338496: Issue 1611 - Fixed inconsistent behavior with "Block element" context menu item (Closed)
Patch Set: Created Nov. 26, 2014, 11:28 a.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 | « safari/ext/background.js ('k') | no next file » | 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 }, true); 119 }, true);
120 120
121 121
122 /* Context menus */ 122 /* Context menus */
123 123
124 document.addEventListener("contextmenu", function(event) 124 document.addEventListener("contextmenu", function(event)
125 { 125 {
126 var element = event.srcElement; 126 var element = event.srcElement;
127 safari.self.tab.setContextMenuEventUserInfo(event, { 127 safari.self.tab.setContextMenuEventUserInfo(event, {
128 pageId: documentInfo.pageId, 128 pageId: documentInfo.pageId,
129 srcUrl: ("src" in element) ? element.src : null,
130 tagName: element.localName 129 tagName: element.localName
131 }); 130 });
132 }); 131 });
133 132
134 133
135 /* Background page */ 134 /* Background page */
136 135
137 var backgroundPageProxy = { 136 var backgroundPageProxy = {
138 objects: [], 137 objects: [],
139 callbacks: [], 138 callbacks: [],
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 messageProxy.handleResponse(event.message); 421 messageProxy.handleResponse(event.message);
423 break; 422 break;
424 case "proxyCallback": 423 case "proxyCallback":
425 backgroundPageProxy.handleCallback(event.message); 424 backgroundPageProxy.handleCallback(event.message);
426 break; 425 break;
427 } 426 }
428 } 427 }
429 } 428 }
430 }); 429 });
431 })(); 430 })();
OLDNEW
« no previous file with comments | « safari/ext/background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld