Replacing Collusion to Lightbeam

This commit is contained in:
Leonardo Balter 2013-11-15 19:29:02 -02:00
Родитель b1cc9773c6
Коммит 92e8367bfd
13 изменённых файлов: 105 добавлений и 105 удалений

Просмотреть файл

@ -31,9 +31,9 @@ self.port.on('update-blocklist-all', function(domains){
}
});
self.port.on('init', function(collusionToken){
self.port.on('init', function(lightbeamToken){
// console.error('content-script::init()');
localStorage.collusionToken = collusionToken;
localStorage.lightbeamToken = lightbeamToken;
if (unsafeWindow && unsafeWindow.aggregate){
unsafeWindow.allConnections = getAllConnections();

Просмотреть файл

@ -207,7 +207,7 @@ function askForDataSharingConfirmationDialog(callback){
// Lightbeam Privacy Policy ends
'<br />' +
'<p>By clicking OK, you are agreeing to the data practices in our privacy notice.</p>',
"imageUrl": "image/collusion_popup_warningsharing.png"
"imageUrl": "image/lightbeam_popup_warningsharing.png"
},
callback);
}
@ -218,7 +218,7 @@ function stopSharingDialog(callback){
"message":
'<p>You are about to stop sharing data with the Lightbeam server.</p>' +
'<p>By clicking OK you will no longer be uploading data.</p>',
"imageUrl": "image/collusion_popup_stopsharing2.png"
"imageUrl": "image/lightbeam_popup_stopsharing2.png"
},
function(confirmed){
if ( confirmed ){
@ -242,7 +242,7 @@ function informUserOfUnsafeWindowsDialog(){
"message": "<p>You have one or more private browsing windows open.</p>" +
"<p>Connections made in private browsing windows will be visualized in Lightbeam but that data is neither stored locally nor will it ever be shared, even if sharing is enabled. </p>" +
"<p> Information gathered in private browsing mode will be deleted whenever Lightbeam is restarted, and is not collected at all when Lightbeam is not open..</p>",
"imageUrl": "image/collusion_popup_privacy.png"
"imageUrl": "image/lightbeam_popup_privacy.png"
},
function(confirmed){}
);
@ -277,7 +277,7 @@ function confirmBlockSitesDialog(callback){
"message": "<p><b>Warning:</b></p> " +
"<p>Blocking sites will prevent any and all content from being loaded from selected domains, for example: [example.com, example.net] and all of their subdomains [mail.example.com, news.example.net etc.]. </p>" +
"<p>This can prevent some sites from working and degrade your internet experience. Please use this feature carefully. </p>",
"imageUrl": "image/collusion_popup_blocked.png"
"imageUrl": "image/lightbeam_popup_blocked.png"
},
callback
);
@ -290,7 +290,7 @@ function confirmHideSitesDialog(callback){
"title": "Hide Sites",
"message": "<p>These sites will not be shown in Lightbeam visualizations, including List View, unless you specifically toggle them back on with the Show Hidden Sites button.</p>" +
"<p>You can use this to ignore trusted sites from the data.</p>",
"imageUrl": "image/collusion_popup_hidden.png"
"imageUrl": "image/lightbeam_popup_hidden.png"
},
callback
);
@ -302,7 +302,7 @@ function confirmResetDataDialog(callback){
"title": "Reset Data",
"message": "<p>Pressing OK will delete all Lightbeam information including connection history, user preferences, block sites list etc.</p>" +
"<p>Your browser will be returned to the state of a fresh install of Lightbeam.</p>",
"imageUrl": "image/collusion_popup_warningreset.png"
"imageUrl": "image/lightbeam_popup_warningreset.png"
},callback
);
}
@ -315,7 +315,7 @@ function showPromptToShareDialog(callback){
"message": "<p>As a user of Lightbeam, you can help contribute to build our data ecosystem.</p>" +
"<p>By sharing your data you can help us and others to understand third-party relationships on the web and promote further research in the field of online tracking and privacy.</p> "+
"<p>Do you want to upload your data to the <a href='http://mozilla.org/en-US/lightbeam/database/'>public database</a> now?</p>",
"imageUrl": "image/collusion_popup_startsharing.png"
"imageUrl": "image/lightbeam_popup_startsharing.png"
},
callback
);

Просмотреть файл

@ -19,29 +19,29 @@
<div class="btn_group visualization" role="menu">
<div data-list class="dropdown_options">
<a data-value="Graph" role="menuitem" tabIndex="1" aria-label="Graph Visualization">
<img src="image/collusion_icon_graph.png" />graph
<img src="image/lightbeam_icon_graph.png" />graph
</a>
<a data-value="Clock" role="menuitem" tabIndex="2" aria-label="Clock Visualization">
<img src="image/collusion_icon_clock.png" />clock
<img src="image/lightbeam_icon_clock.png" />clock
</a>
<a data-value="List" role="menuitem" tabIndex="3" aria-label="List. Display data in tabular format.">
<img src="image/collusion_icon_list.png" />list
<img src="image/lightbeam_icon_list.png" />list
</a>
</div>
</div>
<div class="section-header all-cap-header">DATA</div>
<div class="btn">
<a class="download">
<img src="image/collusion_icon_download2.png" />Save Data
<img src="image/lightbeam_icon_download2.png" />Save Data
</a>
</div>
<div class="btn">
<a class="reset-data">
<img src="image/collusion_icon_reset.png" />Reset Data
<img src="image/lightbeam_icon_reset.png" />Reset Data
</a>
</div>
<div class="links">
<img src="image/collusion_icon_feedback.png"> <a href="https://docs.google.com/a/mozillafoundation.org/forms/d/1QeVKe8xDwmaJMqiWDBs1eCR8kpDGaUDdanUWIn-xn1Q/viewform" target="_blank">Give Us Feedback</a><br />
<img src="image/lightbeam_icon_feedback.png"> <a href="https://docs.google.com/a/mozillafoundation.org/forms/d/1QeVKe8xDwmaJMqiWDBs1eCR8kpDGaUDdanUWIn-xn1Q/viewform" target="_blank">Give Us Feedback</a><br />
<a href="http://www.mozilla.org/lightbeam" target="_blank">mozilla.org/lightbeam</a>
</div>
</aside>
@ -110,7 +110,7 @@
<div class="help-content">
<!-- Graph View Help -->
<div class="graph-view-help hidden">
<header class="large-header"><img src="image/collusion_icon_help.png" /> Visualization Help</header>
<header class="large-header"><img src="image/lightbeam_icon_help.png" /> Visualization Help</header>
<div>
<div class="grey-label all-cap-header">Visualization</div> Graph View<br />
<div class="grey-label all-cap-header">Best for</div> Seeing site relationships<br />
@ -146,8 +146,8 @@
</ul><br/>
When you set your site preferences:
<ul>
<li><img src="icons/collusion_icon_block.png" /><span class="block-text">Block</span> means they are blocked from connecting to your browser.</li>
<li><img src="icons/collusion_icon_watch.png" /><span class="watch-text">Watch</span> means they are highlighted.</li>
<li><img src="icons/lightbeam_icon_block.png" /><span class="block-text">Block</span> means they are blocked from connecting to your browser.</li>
<li><img src="icons/lightbeam_icon_watch.png" /><span class="watch-text">Watch</span> means they are highlighted.</li>
</ul>
These preferences can be set in the List Visualization.
</p>
@ -155,7 +155,7 @@
</div>
<!-- Clock View Help -->
<div class="clock-view-help hidden">
<header class="large-header"><img src="image/collusion_icon_help.png" /> Visualization Help</header>
<header class="large-header"><img src="image/lightbeam_icon_help.png" /> Visualization Help</header>
<div>
<div class="grey-label all-cap-header">Visualization</div> Clock View<br />
<div class="grey-label all-cap-header">Best for</div> Seeing site patterns with time<br />
@ -186,8 +186,8 @@
<p>
When you set your site preferences:
<ul>
<li><img src="icons/collusion_icon_block.png" /><span class="block-text">Block</span> means they are blocked from connecting to your browser.</li>
<li><img src="icons/collusion_icon_watch.png" /><span class="watch-text">Watch</span> means they are highlighted.</li>
<li><img src="icons/lightbeam_icon_block.png" /><span class="block-text">Block</span> means they are blocked from connecting to your browser.</li>
<li><img src="icons/lightbeam_icon_watch.png" /><span class="watch-text">Watch</span> means they are highlighted.</li>
</ul>
These preferences can be set in the List Visualization.
</p>
@ -195,7 +195,7 @@
</div>
<!-- List View Help -->
<div class="list-view-help hidden">
<header class="large-header"><img src="image/collusion_icon_help.png" /> Visualization Help</header>
<header class="large-header"><img src="image/lightbeam_icon_help.png" /> Visualization Help</header>
<div>
<div class="grey-label all-cap-header">Visualization</div> List View<br />
<div class="grey-label all-cap-header">Best for</div> Seeing a text database<br />
@ -209,8 +209,8 @@
<section>
<div class="blue-text all-cap-header">Features</div>
<div>
<div><span class="feature-name"><img src="image/collusion_icon_checkbox.png" /> Checkboxes</span> - click + apply site preference</div>
<div><span class="feature-name"><img src="image/collusion_icon_sortby.png" /> Sort By</span> - click column heading to sort by Type, Preference, Website(A-Z), Date, Sites Connected</div>
<div><span class="feature-name"><img src="image/lightbeam_icon_checkbox.png" /> Checkboxes</span> - click + apply site preference</div>
<div><span class="feature-name"><img src="image/lightbeam_icon_sortby.png" /> Sort By</span> - click column heading to sort by Type, Preference, Website(A-Z), Date, Sites Connected</div>
</div>
</section>
<section>
@ -221,9 +221,9 @@
<p>
When you set your site preferences:
<ul>
<li><img src="icons/collusion_icon_block.png" /><span class="block-text">Block</span> means sites are blocked from connecting to your browser.</li>
<li><img src="icons/collusion_icon_hide.png" /><span class="hide-text">Hide</span> means sites are not seen in the visualization.</li>
<li><img src="icons/collusion_icon_watch.png" /><span class="watch-text">Watch</span> means sites are highlighted.</li>
<li><img src="icons/lightbeam_icon_block.png" /><span class="block-text">Block</span> means sites are blocked from connecting to your browser.</li>
<li><img src="icons/lightbeam_icon_hide.png" /><span class="hide-text">Hide</span> means sites are not seen in the visualization.</li>
<li><img src="icons/lightbeam_icon_watch.png" /><span class="watch-text">Watch</span> means sites are highlighted.</li>
</ul>
</p>
</section>
@ -233,7 +233,7 @@
<!-- About Section starts ================================= -->
<div class="about-content">
<div class="graph-view-help">
<header class="large-header"><img src="image/collusion_icon_about.png" /> About Lightbeam</header>
<header class="large-header"><img src="image/lightbeam_icon_about.png" /> About Lightbeam</header>
<div>
<div class="grey-label all-cap-header">Version</div> 1.0<br />
<div class="grey-label all-cap-header">By</div> Mozilla Foundation<br />
@ -352,9 +352,9 @@
</aside>
<div class="info-panel-controls">
<ul>
<li class="toggle-site-profile disabled"><img src="image/collusion_icon_website.png" /><i class="icon-chevron-right hidden"></i></li>
<li class="toggle-help"><a class="help"><img src="image/collusion_icon_help.png" /><i class="icon-chevron-right hidden"></i></a></li>
<li class="toggle-about"><a class="about"><img src="image/collusion_icon_about.png" /></a><i class="icon-chevron-right hidden"></i></li>
<li class="toggle-site-profile disabled"><img src="image/lightbeam_icon_website.png" /><i class="icon-chevron-right hidden"></i></li>
<li class="toggle-help"><a class="help"><img src="image/lightbeam_icon_help.png" /><i class="icon-chevron-right hidden"></i></a></li>
<li class="toggle-about"><a class="about"><img src="image/lightbeam_icon_about.png" /></a><i class="icon-chevron-right hidden"></i></li>
</ul>
</div>
<div class="stage-stack" role="main">
@ -509,19 +509,19 @@
<input id="block-pref" type="radio" name="pref-options" value="" >
<label for="block-pref" class="btn disabled">
<div class="radio-dot"></div>
<img src="icons/collusion_icon_block.png" />
<img src="icons/lightbeam_icon_block.png" />
Block Site
</label>
<input id="hide-pref" type="radio" name="pref-options" value="">
<label for="hide-pref" class="btn disabled">
<div class="radio-dot"></div>
<img src="icons/collusion_icon_hide.png" />
<img src="icons/lightbeam_icon_hide.png" />
Hide Site
</label>
<input id="watch-pref" type="radio" name="pref-options" value="">
<label for="watch-pref" class="btn disabled">
<div class="radio-dot"></div>
<img src="icons/collusion_icon_watch.png" />
<img src="icons/lightbeam_icon_watch.png" />
Watch Site
</label>
<input id="no-pref" type="radio" name="pref-options" value="">
@ -548,7 +548,7 @@
<script src="d3.v3.min.js"></script>
<script src="events.js" type="application/javascript;version=1.8"></script>
<script src="infobar.js" type="application/javascript;version=1.8"></script>
<script src="collusion.js" type="application/javascript;version=1.8"></script>
<script src="lightbeam.js" type="application/javascript;version=1.8"></script>
<script src="svgdataset.js" type="application/javascript;version=1.8"></script>
<script src="aggregate.js" type="application/javascript;version=1.8"></script>
<!-- from https://github.com/Nycto/PicoModal -->

Просмотреть файл

@ -131,7 +131,7 @@ function showSitePref(nodeName){
var prefTag = document.querySelector(".pref-tag");
var sitePref = userSettings[nodeName];
if ( sitePref ){
prefTag.querySelector("img").src = "icons/collusion_icon_"+sitePref+".png";
prefTag.querySelector("img").src = "icons/lightbeam_icon_"+sitePref+".png";
prefTag.querySelector("span").className = "";
prefTag.querySelector("span").classList.add(sitePref + "-text");
prefTag.querySelector("span").textContent = (sitePref=="hide") ? "hidden" : sitePref + "ed";

Просмотреть файл

@ -98,7 +98,7 @@ window.addEventListener('load', function(evt){
if ( localStorage.userHasOptedIntoSharing && localStorage.userHasOptedIntoSharing === 'true' ){
startUploadTimer();
}
saveTimer = setInterval(function(){saveConnections();}, 5 * 60 * 1000); // save to localStorage every 5 minutes console.log('collusion load() ended');
saveTimer = setInterval(function(){saveConnections();}, 5 * 60 * 1000); // save to localStorage every 5 minutes console.log('lightbeam load() ended');
});

Просмотреть файл

@ -258,7 +258,7 @@ function getNodes(filter){
function nodeToRow(node){
var settings = userSettings[node.name] || (node.nodeType == 'blocked' ? 'block' : '');
var iconUrl = node.nodeType === 'blocked'? 'icons/collusion_icon_empty_list.png' : 'icons/collusion_icon_list.png';
var iconUrl = node.nodeType === 'blocked'? 'icons/lightbeam_icon_empty_list.png' : 'icons/lightbeam_icon_list.png';
var listIcon = elem('img', {'src': iconUrl, 'class': node.nodeType === 'blocked'? 'no-update' :'update-table', 'role': 'gridcell'});
var row = elem('tr', {
'class': 'node ' + node.nodeType,
@ -283,7 +283,7 @@ function nodeToRow(node){
listIcon.addEventListener("mouseenter",tooltip.addTooltip);
listIcon.addEventListener("mouseleave",tooltip.hide);
row.addEventListener("mouseenter",function(){
row.childNodes[3].firstChild.setAttribute("src", "image/collusion_icon_list_blue.png");
row.childNodes[3].firstChild.setAttribute("src", "image/lightbeam_icon_list_blue.png");
});
row.addEventListener("mouseleave",function(){
row.childNodes[3].firstChild.setAttribute("src", iconUrl);

Просмотреть файл

@ -968,7 +968,7 @@ text {
}
[data-pref=watch] .preferences{
background-image: url(icons/collusion_icon_watch.png);
background-image: url(icons/lightbeam_icon_watch.png);
}
[data-pref=block]{
@ -976,7 +976,7 @@ text {
}
[data-pref=block] .preferences{
background-image: url(icons/collusion_icon_block.png);
background-image: url(icons/lightbeam_icon_block.png);
}
[data-pref=hide]{
@ -984,7 +984,7 @@ text {
}
[data-pref=hide] .preferences{
background-image: url(icons/collusion_icon_hide.png);
background-image: url(icons/lightbeam_icon_hide.png);
}
.hide-hidden-rows [data-pref=hide]{
@ -1257,7 +1257,7 @@ text {
.list-footer input[name=pref-options] + label .radio-dot{
width: 15px;
height: 15px;
background-image: url(image/Collusion_radio_off.png);
background-image: url(image/Lightbeam_radio_off.png);
background-repeat: no-repeat;
background-size: 15px 15px;
display: inline-block;
@ -1268,7 +1268,7 @@ text {
}
.list-footer input[name=pref-options]:checked + label .radio-dot{
background-image: url(image/Collusion_radio_on.png);
background-image: url(image/Lightbeam_radio_on.png);
}
tr.refresh {

Просмотреть файл

@ -19,7 +19,7 @@ document.addEventListener("keypress", function(event){
}
});
/* Collusion Logo Click handler ====================== */
/* Lightbeam Logo Click handler ====================== */
document.querySelector(".main header").addEventListener("click",function(){
location.reload();
});
@ -145,7 +145,7 @@ function downloadAsJson(data, defaultFilename){
document.querySelector(".download").addEventListener('click', function(evt) {
// console.log('received export data');
downloadAsJson([exportFormat(allConnections)], 'collusionData.json');
downloadAsJson([exportFormat(allConnections)], 'lightbeamData.json');
evt.preventDefault();
// window.open('data:application/json,' + exportFormat(allConnections));
});
@ -352,7 +352,7 @@ function exportFormat(connections, roundOff){
tempConnections = roundOffTimestamp(tempConnections);
}
var exportSet = {
format: 'Collusion Save File',
format: 'Lightbeam Save File',
version: '1.1',
connections: tempConnections
}
@ -591,4 +591,4 @@ function colourHighlightNodes(highlight){
blockedSites[i].classList.remove("blockedSites");
}
}
}
}

Просмотреть файл

@ -1,6 +1,6 @@
# File Formats in Collusion
# File Formats in Lightbeam for Firefox
As we have gained experience with Collusion and built more visualization, talked with folks in the security arena, etc., we've identified more information that would be useful to track than what was included in Format 1.0. This documents the new format, paying special attention to the extensions.
As we have gained experience with Lightbeam for Firefox and built more visualization, talked with folks in the security arena, etc., we've identified more information that would be useful to track than what was included in Format 1.0. This documents the new format, paying special attention to the extensions.
Version 1.1 is an extension of 1.0 and 1.0 files should still be processable with 1.1. The only change to existing data is that source and target will now be only the top-level domain, with the subdomain path moved to sourceSub and targetSub. New in Version 1.1: sourceSub, targetSub, method, status, cacheable.
@ -10,7 +10,7 @@ This format has the following structure:
A root object whose keys are `format`, `version`, `connections`.
The `format` value is the string "Collusion Save File" and is for documentation and identification of JSON files which are Collusion-specific.
The `format` value is the string "Lightbeam Save File" and is for documentation and identification of JSON files which are Lightbeam for Firefox-specific.
The `version` value is the string "1.1" and identifies the specific format documented here. A missing `version` key is the same as a `version` value of "0" and should be parsed and interpreted as specified for Format 0 above.
@ -18,9 +18,9 @@ The `connections` value makes up the bulk of the file. It is an array of connect
The `source` value is a URL containing domain and subdomain information for the requested site, but stripped of protocol, path, query, and fragment. See notes for "target" for changes from 0.0 and 1.0 formats.
The `target` value is a URL containing domain and subdomain information for a resource loaded from a third-party site, and like the source the target is stripped of protocol, path, query, and fragment. Connections which differ only by subdomain are not considered third-party content, which means that if you visit example.com and it loads content from ads.example.com, those connections will not be tracked by Collusion. This is changed from both 0.0 and 1.0. In 0.0 we did not track subdomain information at all, and in 1.0 we kept subdomains in the "source" and "target" attributes. Now we have reverted to the 0.0 form of stripping subdomains from "source" and "target", but we store the subdomain information in the "sourceSub" and "targetSub" attributes (which will be empty if there is no subdomain).
The `target` value is a URL containing domain and subdomain information for a resource loaded from a third-party site, and like the source the target is stripped of protocol, path, query, and fragment. Connections which differ only by subdomain are not considered third-party content, which means that if you visit example.com and it loads content from ads.example.com, those connections will not be tracked by Lightbeam for Firefox. This is changed from both 0.0 and 1.0. In 0.0 we did not track subdomain information at all, and in 1.0 we kept subdomains in the "source" and "target" attributes. Now we have reverted to the 0.0 form of stripping subdomains from "source" and "target", but we store the subdomain information in the "sourceSub" and "targetSub" attributes (which will be empty if there is no subdomain).
The `timestamp` is an integer number of milliseconds since the Unix epoch (January 1, 1970) as normally used for Javascript Date objects. The granularity of the timestamp is intentionally reduced when this data is shared, by rounding timestamps down to the last 5 minutes to prevent trackers from comparing our data with theirs to re-associate our data with individual users. Note, this is a change from the earlier (version 0) data format which only stored timestamps relative to the time Collusion was started, and couldn't be used to restore actual session dates or times.
The `timestamp` is an integer number of milliseconds since the Unix epoch (January 1, 1970) as normally used for Javascript Date objects. The granularity of the timestamp is intentionally reduced when this data is shared, by rounding timestamps down to the last 5 minutes to prevent trackers from comparing our data with theirs to re-associate our data with individual users. Note, this is a change from the earlier (version 0) data format which only stored timestamps relative to the time Lightbeam for Firefox was started, and couldn't be used to restore actual session dates or times.
The `contentType` value is the string reported by the target in the `Content-Type` header, although we MAY also compare with the actual type returned to improve the accuracy of this value. If there is no Content-Type header we WILL attempt to determine the type of the content. If all attempts fail, a default content type of "text/plain" (the standard default content type) will be used, but the value WILL NOT be null.
@ -28,7 +28,7 @@ The `cookie` value is either `true` or `false` representing the existence of one
The `sourceVisited` value is either `true` or `false`, indicating whether or not the source was loaded by the user in a page or tab. While it is expected that this value will generally be true, it may be false for sources in iframes.
The `secure` value will be `true` for content loaded via the `HTTPS` protocol, `false` for content loaded via `HTTP` protocol. No other protocols are currently tracked by Collusion as connections.
The `secure` value will be `true` for content loaded via the `HTTPS` protocol, `false` for content loaded via `HTTP` protocol. No other protocols are currently tracked by Lightbeam for Firefox as connections.
The `sourcePathDepth` is a metric of how many path elements there were in the source URL before it was sanitized. The URL http://example.com/ has a depth of 0, while the URL http://example.com/blog/post/2012/12/21 has a depth of 5.

Просмотреть файл

@ -6,7 +6,7 @@
<head>
<meta charset="utf-8">
<title>Collusion</title>
<title>Lightbeam for Firefox</title>
<link href="website/branding/css/tabzilla.css" rel="stylesheet">
@ -19,7 +19,7 @@
<link rel="shortcut icon" type="image/png" href="/media/img/favicon.png">
</head>
<body id="collusion" class="html-ltr home">
<body id="lightbeam" class="html-ltr home">
<div id="outer-wrapper">
<div id="wrapper">
@ -41,14 +41,14 @@
</header>
<h1 id="main-feature" class="large">Introducing Collusion</h1>
<h1 id="main-feature" class="large">Introducing Lightbeam for Firefox</h1>
<section id="primary" class="container box">
<h2>Discover who's tracking you online</h2>
<img src="website/branding/img/nodes.png" alt="" />
<p>Collusion is an experimental add-on for Firefox and allows you, for the first time, to see all the third parties that are tracking your movements across the Web. It will show, in real time, how that data creates a spider-web of interaction between companies and other trackers.</p>
<p>Lightbeam for Firefox is an experimental add-on for Firefox and allows you, for the first time, to see all the third parties that are tracking your movements across the Web. It will show, in real time, how that data creates a spider-web of interaction between companies and other trackers.</p>
<a class="button" href="demo/">View our demo - see how you're being tracked</a>
<a class="button" href="https://addons.mozilla.org/en-US/firefox/addon/collusion/">Download the Collusion add-on for Firefox</a>
<a class="button" href="https://addons.mozilla.org/en-US/firefox/addon/lightbeam/">Download the Lightbeam add-on for Firefox</a>
</section>
<section id="secondary" class="container">
@ -58,13 +58,13 @@
<h2>Take control of your data</h2>
<p>We recognize the importance of transparency and our mission is all about empowering users — both with tools and with information. The Ford Foundation and Mozilla have teamed up to develop Collusion into a fully functioning feature for Firefox - that will enable users to not only see who is tracking them across the Web, but also to turn that tracking off when they want to.</p>
<p>We recognize the importance of transparency and our mission is all about empowering users — both with tools and with information. The Ford Foundation and Mozilla have teamed up to develop Lightbeam for Firefox into a fully functioning feature for Firefox - that will enable users to not only see who is tracking them across the Web, but also to turn that tracking off when they want to.</p>
<h2>Telling the global tracking story</h2>
<p>Your data can be part of the larger story. When we launch the full version of Collusion, it will allow you to opt-in to sharing your de-identified data in a global database of web tracker data. Well combine all that information and make it available to help researchers, journalists, and others analyze and explain how data is tracked on the web.</p>
<p>Your data can be part of the larger story. When we launch the full version of Lightbeam for Firefox, it will allow you to opt-in to sharing your de-identified data in a global database of web tracker data. Well combine all that information and make it available to help researchers, journalists, and others analyze and explain how data is tracked on the web.</p>
<h2>Building user awareness</h2>
@ -72,9 +72,9 @@
<h2>Collusion is about choice</h2>
<h2>Lightbeam for Firefox is about choice</h2>
<p>Not all tracking is bad. Many services rely on user data to provide relevant content and enhance your online experience. But most tracking happens without users consent and without their knowledge. Thats not okay. It should be you who decides when, how and if you want to be tracked. Collusion will be a powerful tool to help you do that.</p>
<p>Not all tracking is bad. Many services rely on user data to provide relevant content and enhance your online experience. But most tracking happens without users consent and without their knowledge. Thats not okay. It should be you who decides when, how and if you want to be tracked. Lightbeam for Firefox will be a powerful tool to help you do that.</p>

Просмотреть файл

@ -40,7 +40,7 @@ PageMod({
include: ui.mainPage,
contentScriptWhen: 'ready',
contentScriptFile: ui.contentScript,
onAttach: ui.attachToCollusionPage
onAttach: ui.attachToLightbeamPage
});

Просмотреть файл

@ -21,7 +21,7 @@ let tempConnections = [];
exports.mainPage = mainPage;
exports.contentScript = contentScript;
exports.attachToCollusionPage = attachToCollusionPage;
exports.attachToLightbeamPage = attachToLightbeamPage;
exports.on = function(eventname, handler){
if (uiworker){
uiworker.port.on(eventname, handler);
@ -41,37 +41,37 @@ exports.emit = function(eventname, arg1, arg2, arg3){
// FIXME: Move tab handlers into a tab component
// And specify what we're trying to do with it
function collusionTabOpened(tab){
//console.error('collusionTabOpened: ', tab);
function lightbeamTabOpened(tab){
//console.error('lightbeamTabOpened: ', tab);
menuitem.label = "Close Lightbeam";
widget.tooltip = "Close Lightbeam";
}
function collusionTabClosed(tab){
//console.error('collusionTabClosed: ', tab);
function lightbeamTabClosed(tab){
//console.error('lightbeamTabClosed: ', tab);
menuitem.label = "Show Lightbeam";
widget.tooltip = "Show Lightbeam";
// Stop all Collusion processes, close worker(s)
// Stop all Lightbeam processes, close worker(s)
}
function collusionTabReady(tab){
//console.error('collusionTabReady: ', tab);
function lightbeamTabReady(tab){
//console.error('lightbeamTabReady: ', tab);
menuitem.label = "Close Lightbeam";
widget.tooltip = "Close Lightbeam";
// add-on page should be ready to go, attach scripts
// var worker = attachToExistingCollusionPages(tab);
// worker.port.emit('log', 'collusionTabReady');
// var worker = attachToExistingLightbeamPages(tab);
// worker.port.emit('log', 'lightbeamTabReady');
}
function collusionTabActivate(tab){
//console.error('collusionTabActivate: ', tab);
function lightbeamTabActivate(tab){
//console.error('lightbeamTabActivate: ', tab);
menuitem.label = "Close Lightbeam";
widget.tooltip = "Close Lightbeam";
// restart any paused processing, send data through that has changed since pause
}
function collusionTabDeactivate(tab){
//console.error('collusionTabDeactivate: ', tab);
function lightbeamTabDeactivate(tab){
//console.error('lightbeamTabDeactivate: ', tab);
menuitem.label = "Switch to Lightbeam Tab";
widget.tooltip = "Switch to Lightbeam Tab";
// pause processing, queue data to be processed on reactivate
@ -95,7 +95,7 @@ ContentPolicy({
var topLevelDomain = Connection.getDomain(location.host);
}
catch(e) {
// See Issue 374: https://github.com/mozilla/collusion/issues/374
// See Issue 374: https://github.com/mozilla/lightbeam/issues/374
// if there is no host, like in about:what, then the host getter throws
return true;
}
@ -129,7 +129,7 @@ ContentPolicy({
// }
// }
// // if there is a private window opened while the collusion tab is open,
// // if there is a private window opened while the lightbeam tab is open,
// // then alert the user about it.
// browserWindows.on('open', handlePrivateWindow);
@ -143,7 +143,7 @@ function handlePrivateWindow(window) {
}
}
// if there is a private window opened while the collusion tab is open,
// if there is a private window opened while the lightbeam tab is open,
// then alert the user about it.
browserWindows.on('open', handlePrivateWindow);
@ -157,16 +157,16 @@ function hasPrivateWindow() {
}
}
function attachToCollusionPage(worker) {
function attachToLightbeamPage(worker) {
/* Set up channel of communication between this add-on and the script (content-script.js)
* that we attached to the web page running the Collusion UI. */
* that we attached to the web page running the Lightbeam UI. */
// FIXME, this is drawn directly from old Collusion
// worker.port.emit('log', 'attaching worker');
uiworker = worker;
var onRestored = function(){
ss.storage.collusionToken = ss.storage.collusionToken ? ss.storage.collusionToken : require('sdk/util/uuid').uuid().toString();
ss.storage.lightbeamToken = ss.storage.lightbeamToken ? ss.storage.lightbeamToken : require('sdk/util/uuid').uuid().toString();
if (ss.storage.graph){
// handle old data format
worker.port.emit('promptToSaveOldData', ss.storage.graph);
@ -181,7 +181,7 @@ function attachToCollusionPage(worker) {
}
Connection.emit("toggleStore", false);
worker.port.emit('log', 'Connection received restored');
worker.port.emit('init', ss.storage.collusionToken);
worker.port.emit('init', ss.storage.lightbeamToken);
};
var onTempConnections = function(tempConn){
@ -240,7 +240,7 @@ function attachToCollusionPage(worker) {
Connection.on('log', log);
function onWorkerDetach(){
// console.error('detaching collusion view');
// console.error('detaching lightbeam view');
Connection.off('restored', onRestored);
Connection.off('connection', onConnection);
Connection.off('tempConnections', onTempConnections);
@ -269,14 +269,14 @@ function attachToCollusionPage(worker) {
}
function getCollusionTab() {
function getLightbeamTab() {
for each (let tab in tabs) {
if (tab.url.slice(0,mainPage.length) === mainPage){
return tab;
}
}
}
exports.getCollusionTab = getCollusionTab;
exports.getLightbeamTab = getLightbeamTab;
// Set up the menu item to open the main UI page:
var menuitem = require("shared/menuitems").Menuitem({
@ -291,25 +291,25 @@ var menuitem = require("shared/menuitems").Menuitem({
});
function openOrSwitchToOrClose(){
// is there a tab open for Collusion?
var tab = getCollusionTab();
// is there a tab open for Lightbeam?
var tab = getLightbeamTab();
// if not, open one
if (!tab){
return tabs.open({
url: mainPage,
onOpen: collusionTabOpened,
onClose: collusionTabClosed,
onReady: collusionTabReady,
onActivate: collusionTabActivate,
onDeactivate: collusionTabDeactivate
onOpen: lightbeamTabOpened,
onClose: lightbeamTabClosed,
onReady: lightbeamTabReady,
onActivate: lightbeamTabActivate,
onDeactivate: lightbeamTabDeactivate
});
}
// if we're on the collusion tab, close it
// if we're on the lightbeam tab, close it
if (tab === tabs.activeTab){
tab.close();
}else{
// otherwise, switch to this tab
// bring Collusion window/tab to the front
// bring Lightbeam window/tab to the front
tab.activate();
tab.window.activate();
}

Просмотреть файл

@ -2,13 +2,13 @@
const tabs = require('sdk/tabs');
const { getCollusionTab, mainPage, openOrSwitchToOrClose } = require('ui');
const { getLightbeamTab, mainPage, openOrSwitchToOrClose } = require('ui');
exports.testGetCollusionTab = function(assert, done) {
exports.testGetLightbeamTab = function(assert, done) {
tabs.open({
url: mainPage,
onReady: function(tab) {
assert.equal(getCollusionTab(), tab, 'getCollusionTab found the correct tab');
assert.equal(getLightbeamTab(), tab, 'getLightbeamTab found the correct tab');
tab.close(done);
}
});
@ -23,28 +23,28 @@ exports.testOpenOrSwitchToOrClose = function(assert, done) {
}
tabs.removeListener('ready', onOpen);
assert.pass('the collusion tab was opened');
assert.pass('the lightbeam tab was opened');
tabs.on('activate', function onActivate(tab) {
if (tab.url != mainPage) {
// re-activate the collusion tab
// re-activate the lightbeam tab
openOrSwitchToOrClose();
return;
}
tabs.removeListener('activate', onActivate);
assert.pass('the collusion tab was re-activated');
assert.pass('the lightbeam tab was re-activated');
tab.once('close', done);
// finally close the collusion tab
// finally close the lightbeam tab
openOrSwitchToOrClose();
});
currentTab.activate();
});
// open collusion tab
// open lightbeam tab
openOrSwitchToOrClose();
}