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

Unified Diff: chrome/content/ui/firstRun.js

Issue 11089006: Be more selective for the sharing fallback (Closed)
Patch Set: Created July 8, 2013, 11:12 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« chrome/content/ui/firstRun.html ('K') | « chrome/content/ui/firstRun.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/ui/firstRun.js
===================================================================
--- a/chrome/content/ui/firstRun.js
+++ b/chrome/content/ui/firstRun.js
@@ -207,17 +207,18 @@
{
var link = E("share-" + network);
link.addEventListener("click", onSocialLinkClick, false);
});
}
function onSocialLinkClick(event)
{
- var filter = defaultMatcher.matchesAny("https://platform.twitter.com/widgets.js", "SCRIPT", "adblockplus.org", true);
+ // Don't open the share page if the sharing script would be blocked
+ var filter = defaultMatcher.matchesAny(event.target.getAttribute("_script"), "SCRIPT", "adblockplus.org", true);
Thomas Greiner 2013/07/08 13:46:47 _script is not a standard attribute for anchor tag
if (!(filter instanceof BlockingFilter))
{
event.preventDefault();
openSharePopup(Utils.getDocLink(event.target.id));
}
}
function setLinks(id)
« chrome/content/ui/firstRun.html ('K') | « chrome/content/ui/firstRun.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld