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

Delta Between Two Patch Sets: background.js

Issue 5203617959116800: Fixed regression: Context menu clickhide broken (Closed)
Left Patch Set: Created Nov. 28, 2013, 3:08 p.m.
Right Patch Set: Created Dec. 9, 2013, 4:29 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 | « no previous file | chrome/background.js » ('j') | 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 notifyUser(); 257 notifyUser();
258 } 258 }
259 259
260 // Set up context menu for user selection of elements to block 260 // Set up context menu for user selection of elements to block
261 function showContextMenu() 261 function showContextMenu()
262 { 262 {
263 ext.contextMenus.removeAll(function() 263 ext.contextMenus.removeAll(function()
264 { 264 {
265 if(typeof localStorage["shouldShowBlockElementMenu"] == "string" && localSto rage["shouldShowBlockElementMenu"] == "true") 265 if(typeof localStorage["shouldShowBlockElementMenu"] == "string" && localSto rage["shouldShowBlockElementMenu"] == "true")
266 { 266 {
267 ext.contextMenus.create(ext.i18n.getMessage("block_element"), ["image", "v ideo", "audio"], function(info, tab) 267 ext.contextMenus.create(ext.i18n.getMessage("block_element"), ["image", "v ideo", "audio"], function(srcUrl, tab)
268 { 268 {
269 if(info.srcUrl) 269 if (srcUrl)
270 tab.sendMessage({type: "clickhide-new-filter", filter: info.srcUrl}); 270 tab.sendMessage({type: "clickhide-new-filter", filter: srcUrl});
271 }); 271 });
272 } 272 }
273 }); 273 });
274 } 274 }
275 275
276 /** 276 /**
277 * Opens options tab or focuses an existing one, within the last focused window . 277 * Opens options tab or focuses an existing one, within the last focused window .
278 * @param {Function} callback function to be called with the 278 * @param {Function} callback function to be called with the
279 Tab object of the options tab 279 Tab object of the options tab
280 */ 280 */
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 tab.sendMessage({type: "clickhide-deactivate"}); 456 tab.sendMessage({type: "clickhide-deactivate"});
457 refreshIconAndContextMenu(tab); 457 refreshIconAndContextMenu(tab);
458 }); 458 });
459 459
460 setTimeout(function() 460 setTimeout(function()
461 { 461 {
462 var notificationToShow = Notification.getNextToShow(); 462 var notificationToShow = Notification.getNextToShow();
463 if (notificationToShow) 463 if (notificationToShow)
464 showNotification(notificationToShow); 464 showNotification(notificationToShow);
465 }, 3 * 60 * 1000); 465 }, 3 * 60 * 1000);
LEFTRIGHT

Powered by Google App Engine
This is Rietveld