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

Side by Side Diff: include.postload.js

Issue 5589897452716032: Implemented ext.contextMenus for Safari (Closed)
Patch Set: Created Jan. 18, 2014, 10:29 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
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-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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 clickHide_mouseClick(lastRightClickEvent); 555 clickHide_mouseClick(lastRightClickEvent);
556 } 556 }
557 else 557 else
558 console.log("clickhide-new-filter: URLs don't match. Couldn't find tha t element.", request.filter, url, lastRightClickEvent.target.src); 558 console.log("clickhide-new-filter: URLs don't match. Couldn't find tha t element.", request.filter, url, lastRightClickEvent.target.src);
559 break; 559 break;
560 case "clickhide-init": 560 case "clickhide-init":
561 if (clickHideFiltersDialog) 561 if (clickHideFiltersDialog)
562 { 562 {
563 sendResponse({filters: clickHide_filters}); 563 sendResponse({filters: clickHide_filters});
564 564
565 clickHideFiltersDialog.style.width = (msg.width + 5) + "px"; 565 clickHideFiltersDialog.style.width = msg.width + "px";
566 clickHideFiltersDialog.style.height = (msg.height + 5) + "px"; 566 clickHideFiltersDialog.style.height = msg.height + "px";
567 clickHideFiltersDialog.style.visibility = "visible"; 567 clickHideFiltersDialog.style.visibility = "visible";
568 } 568 }
569 break; 569 break;
570 case "clickhide-move": 570 case "clickhide-move":
571 if (clickHideFiltersDialog) 571 if (clickHideFiltersDialog)
572 { 572 {
573 clickHideFiltersDialog.style.left = (parseInt(clickHideFiltersDialog.s tyle.left, 10) + request.x) + "px"; 573 clickHideFiltersDialog.style.left = (parseInt(clickHideFiltersDialog.s tyle.left, 10) + request.x) + "px";
574 clickHideFiltersDialog.style.top = (parseInt(clickHideFiltersDialog.st yle.top, 10) + request.y) + "px"; 574 clickHideFiltersDialog.style.top = (parseInt(clickHideFiltersDialog.st yle.top, 10) + request.y) + "px";
575 } 575 }
576 break; 576 break;
577 case "clickhide-close": 577 case "clickhide-close":
578 if (clickHideFiltersDialog) 578 if (clickHideFiltersDialog)
579 { 579 {
580 // Explicitly get rid of currentElement 580 // Explicitly get rid of currentElement
581 if (msg.remove && currentElement && currentElement.parentNode) 581 if (msg.remove && currentElement && currentElement.parentNode)
582 currentElement.parentNode.removeChild(currentElement); 582 currentElement.parentNode.removeChild(currentElement);
583 583
584 clickHide_deactivate(); 584 clickHide_deactivate();
585 } 585 }
586 break; 586 break;
587 default: 587 default:
588 sendResponse({}); 588 sendResponse({});
589 break; 589 break;
590 } 590 }
591 }); 591 });
592 } 592 }
OLDNEW
« no previous file with comments | « chrome/background.js ('k') | lib/prefs.js » ('j') | safari/background.js » ('J')

Powered by Google App Engine
This is Rietveld