Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I recommend using a webserver to gather the data. You can set up a domain or IP to send the data to. Just for starting out you could even run on localhost if you need to.</p> <p>The advantage is that, once created, the same architecture can be used from different PCs, so that any computer you run the script from can share the results.</p> <p><strong>Update:</strong> To communicate with your server you will need to use <a href="http://diveintogreasemonkey.org/api/gm_xmlhttprequest.html" rel="nofollow noreferrer">GM_xmlhttpRequest</a>. I know of one library that adds an abstraction layer to make using GM_xmlhttpRequest easier: Speakeasy.js. It is a relatively unknown lightweight ActiveResource like interface for sending and retrieving data from a RESTful webserver. <a href="http://userscripts.org/scripts/show/42544" rel="nofollow noreferrer">Here's an example</a> of a Greasemonkey script that communicates with a webserver on every page load. It loads annotations and displays them on the page.</p> <p>Here's an adapted version close to your needs:</p> <pre><code>// ==UserScript== // @name Demo Script // @namespace http://example.com // @description Sample // @include * // // @require http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js // @require http://strd6.googlecode.com/svn/trunk/gm_util/d_money.js // @require http://strd6.googlecode.com/svn/trunk/gm_util/speakeasy.js // // ==/UserScript== error = D$.error; log = D$.log; D$.debug(false); Speakeasy .generateResource('result') .configure({ baseUrl: 'http://localhost:3000/' }) ; // Attach all annotations for this page from remote server var href = window.location.href; currentUrl = href.substring(href.indexOf('://') + 3); log(currentUrl); var result1 = 'something'; // Insert your function to get your result data var result2 = 'something else'; // Insert your function to get your result data Speakeasy.result.create({ data: { url: currentUrl, result1: result1, result2: result2 } }); </code></pre> <p>You can quickly create a Rails site or use whatever backend you are familiar with.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload