Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为什么要把浏览记录发送到服务器? #58

Closed
virusdefender opened this issue Jan 7, 2016 · 2 comments
Closed

为什么要把浏览记录发送到服务器? #58

virusdefender opened this issue Jan 7, 2016 · 2 comments

Comments

@virusdefender
Copy link

https://github.com/justjavac/ChromeSnifferPlus/blob/master/js/api.js#L22

var url = 'http://jjc.link/status/v2';

        if (localStorage.length === 0) {
            return;
        }

        var data = "ld=" + encodeURIComponent(JSON.stringify(localStorage));

        xhr('POST', url, data, function(data, status, response){
            callback();
        });
@justjavac
Copy link
Owner

下一版本增加类似 ABP 的自定义探测功能,以及服务器端探测和分析

@justjavac
Copy link
Owner

localStorage 里面记载了探测到的库信息

data = {
    "libs": JSON.stringify(thisTab['apps']), 
    "ip": thisTab['ip'], 
    "add_time": +new Date
};
localStorage.setItem(sender.tab.url, JSON.stringify(data));

if (localStorage.length > 50) {
    window.CollecUsage(function(){
        localStorage.clear();
    });
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants