I recommend using a web server to collect data. You can configure a domain or IP to send data. For starters, you can even run on a local host if you need to.
The advantage is that after creation, the same architecture can be used from different PCs, so that any computer on which you run the script can share the results.
Update:
, GM_xmlhttpRequest. , , GM_xmlhttpRequest: Speakeasy.js. ActiveResource , - RESTful. Greasemonkey script, - . .
, :
error = D$.error;
log = D$.log;
D$.debug(false);
Speakeasy
.generateResource('result')
.configure({
baseUrl: 'http://localhost:3000/'
})
;
var href = window.location.href;
currentUrl = href.substring(href.indexOf('://') + 3);
log(currentUrl);
var result1 = 'something';
var result2 = 'something else';
Speakeasy.result.create({
data: {
url: currentUrl,
result1: result1,
result2: result2
}
});
Rails , .