// ==UserScript== // @name Remote website overlay // @namespace Utopiah // @description Display information on a website (e.g. sale) according to another website (e.g. wiki, API, ...) // @include *.com* // ==/UserScript== /* Generalisaton of ToS Inspector http://fabien.benetou.fr/repository/?p=.git;a=blob;f=greasemonkey/tos_inspector.user.js; */ RemoteSourceUrl="http://self/trained_classifier/"; // self can be 127.0.0.1 for test, e.g. Ruby with AI4R trained on a scrapped dataset // cf http://fabien.benetou.fr/Laboratory/AuctionPricing GM_xmlhttpRequest({ method: "GET", url: RemoteURL+"?q="+document.URL, onload: function(response) { parsed = response.responseText; GM_setValue("parsedLastResult",responseCheck(parsed)); } }); function responseCheck(parsed) { return 'additional info in HTML '+parsed+' and more.'; } Renderer = GM_getValue("parsedLastResult",'No classified result for this object'); var myDiv = document.createElement('div'); myDiv.id = "GM_Window"; myDiv.innerHTML = "

"Renderer+"