зеркало из https://github.com/mozilla/lightbeam.git
switch to new domain for data
This commit is contained in:
Родитель
ac94ca7a2d
Коммит
a18b964949
|
@ -479,13 +479,37 @@ function switchFilter(name){
|
|||
|
||||
aggregate.switchFilter = switchFilter;
|
||||
|
||||
aggregate.update = function update(){
|
||||
// Underscore debounce function
|
||||
//
|
||||
// Returns a function, that, as long as it continues to be invoked, will not
|
||||
// be triggered. The function will be called after it stops being called for
|
||||
// N milliseconds. If `immediate` is passed, trigger the function on the
|
||||
// leading edge, instead of the trailing.
|
||||
var debounce = function debounce(func, wait, immediate) {
|
||||
var timeout;
|
||||
return function() {
|
||||
var context = this, args = arguments;
|
||||
var later = function() {
|
||||
timeout = null;
|
||||
if (!immediate) func.apply(context, args);
|
||||
};
|
||||
var callNow = immediate && !timeout;
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(later, wait);
|
||||
if (callNow) func.apply(context, args);
|
||||
};
|
||||
};
|
||||
|
||||
aggregate.update = debounce(function update(){
|
||||
// FIXME: Don't do this for clock view, maybe not for list view
|
||||
if (currentVisualization.name !== 'graph'){
|
||||
console.log('do not update aggregate for %s view', currentVisualization.name);
|
||||
}
|
||||
if (aggregate.initialized){
|
||||
global.filteredAggregate = currentFilter();
|
||||
aggregate.emit('update');
|
||||
}
|
||||
updateStatsBar();
|
||||
}
|
||||
});
|
||||
|
||||
})(this);
|
||||
|
|
|
@ -154,6 +154,9 @@ function addDialogEventHandlers(modal,options,callback){
|
|||
|
||||
function addToDoNotShowAgainList(dialogName){
|
||||
var dnsPref = localStorage.dnsDialogs || "[]";
|
||||
if (dnsPref === 'undefined'){
|
||||
dnsPref = "[]";
|
||||
}
|
||||
dnsPref = JSON.parse(dnsPref);
|
||||
dnsPref.push(dialogName);
|
||||
localStorage.dnsDialogs = JSON.stringify(dnsPref);
|
||||
|
|
|
@ -11,9 +11,7 @@ try{
|
|||
}catch(e){
|
||||
userSettings = {};
|
||||
}
|
||||
// FIXME: Read this from config file
|
||||
//var uploadServer = 'http://collusiondb.mofostaging.net/shareData';
|
||||
var uploadServer = 'http://collusiondb.mofoprod.net/shareData';
|
||||
var uploadServer = 'https://lightbeamdb.org/shareData';
|
||||
var isRobot = false; // Used for spidering the web only
|
||||
var uploadTimer;
|
||||
var saveTimer;
|
||||
|
@ -90,7 +88,7 @@ function elem(name, attributes, children){
|
|||
};
|
||||
|
||||
window.addEventListener('load', function(evt){
|
||||
localStorage.numLaunch = parseInt(localStorage.numLaunch)+1 || 1;
|
||||
localStorage.numLaunch = parseInt(localStorage.numLaunch, 10)+1 || 1;
|
||||
// Wire up events
|
||||
document.querySelector('[data-value=' + (localStorage.visualization || 'Graph') + ']').setAttribute("data-selected", true);
|
||||
var visualization = localStorage.visualization ? ( localStorage.visualization.toLowerCase() ) : "graph";
|
||||
|
|
|
@ -527,7 +527,7 @@ function showPromptToShareDialog(){
|
|||
today = formattedDate(Date.now());
|
||||
shownToday = showTimes.indexOf(today) > -1;
|
||||
belowLimit = showTimes.length < promptToShareDialogShowLimit;
|
||||
if ( localStorage.numLaunch > 1 && !doNotShowDialog(dialogNames.promptToShare) && !shownToday && belowLimit){
|
||||
if ( Number(localStorage.numLaunch) > 1 && !doNotShowDialog(dialogNames.promptToShare) && !shownToday && belowLimit){
|
||||
showTimes.push(today);
|
||||
localStorage.promptToShareDialogShowTimes = JSON.stringify(showTimes);
|
||||
showPromptToShareDialog(function(confirmed){
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"description": "Lightbeam is a Firefox add-on that allows you to see the third parties that are collecting information about your browsing activity, with and without your consent. Using interactive visualizations, Lightbeam shows you the relationships between these third parties and the sites you visit.",
|
||||
"author": "Mozilla Foundation",
|
||||
"license": "MPL 2.0",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"id": "jid1-F9UJ2thwoAm5gQ",
|
||||
"permissions": {
|
||||
"private-browsing": true
|
||||
|
|
Загрузка…
Ссылка в новой задаче