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

Side by Side Diff: chrome/content/ui/sendReport.js

Issue 29322658: Issue 701 - Don`t handle middle- and right-clicks on report link (Closed)
Patch Set: Created July 20, 2015, 12:34 p.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 | « no previous file | 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 <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 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 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 this.data.parentNode.removeChild(this.data); 726 this.data.parentNode.removeChild(this.data);
727 } 727 }
728 }; 728 };
729 729
730 let subscriptionUpdateDataSource = 730 let subscriptionUpdateDataSource =
731 { 731 {
732 contentWnd: null, 732 contentWnd: null,
733 type: null, 733 type: null,
734 outdated: null, 734 outdated: null,
735 needUpdate: null, 735 needUpdate: null,
736 736
737 subscriptionFilter: function(s) 737 subscriptionFilter: function(s)
738 { 738 {
739 if (s instanceof DownloadableSubscription) 739 if (s instanceof DownloadableSubscription)
740 return subscriptionsDataSource.subscriptionFilter(s); 740 return subscriptionsDataSource.subscriptionFilter(s);
741 else 741 else
742 return false; 742 return false;
743 }, 743 },
744 744
745 collectData: function(wnd, windowURI, callback) 745 collectData: function(wnd, windowURI, callback)
746 { 746 {
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
1550 E("copyLinkBox").hidden = false; 1550 E("copyLinkBox").hidden = false;
1551 1551
1552 document.documentElement.getButton("finish").disabled = false; 1552 document.documentElement.getButton("finish").disabled = false;
1553 document.documentElement.getButton("cancel").disabled = true; 1553 document.documentElement.getButton("cancel").disabled = true;
1554 E("progressBar").activeItemComplete = true; 1554 E("progressBar").activeItemComplete = true;
1555 } 1555 }
1556 } 1556 }
1557 1557
1558 function processLinkClick(event) 1558 function processLinkClick(event)
1559 { 1559 {
1560 if (event.button != 0)
1561 return;
1562
1560 event.preventDefault(); 1563 event.preventDefault();
1561 1564
1562 let link = event.target; 1565 let link = event.target;
1563 while (link && !(link instanceof HTMLAnchorElement)) 1566 while (link && !(link instanceof HTMLAnchorElement))
1564 link = link.parentNode; 1567 link = link.parentNode;
1565 1568
1566 if (link && (link.protocol == "http:" || link.protocol == "https:")) 1569 if (link && (link.protocol == "http:" || link.protocol == "https:"))
1567 UI.loadInBrowser(link.href); 1570 UI.loadInBrowser(link.href);
1568 } 1571 }
1569 1572
1570 function copyLink(url) 1573 function copyLink(url)
1571 { 1574 {
1572 Utils.clipboardHelper.copyString(url); 1575 Utils.clipboardHelper.copyString(url);
1573 } 1576 }
1574 1577
1575 function censorURL(url) 1578 function censorURL(url)
1576 { 1579 {
1577 return url.replace(/([?;&\/#][^?;&\/#]+?=)[^?;&\/#]+/g, "$1*"); 1580 return url.replace(/([?;&\/#][^?;&\/#]+?=)[^?;&\/#]+/g, "$1*");
1578 } 1581 }
1579 1582
1580 function encodeHTML(str) 1583 function encodeHTML(str)
1581 { 1584 {
1582 return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"). replace(/"/g, "&quot;"); 1585 return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"). replace(/"/g, "&quot;");
1583 } 1586 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld