generalized TOS GM script for content from a remote source

master
Fabien Benetou 13 years ago
parent d2ab3272a7
commit 7273db9bac
  1. 40
      greasemonkey/remote_overlay.user.js

@ -0,0 +1,40 @@
// ==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: wikiUrl+,
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 += "<p class=\"parsed_render\">"Renderer+"<ul>";
boxcss = 'position:fixed; right:5px; top:50px; background-color:white; z-index:1; opacity:0.9;';
myDiv.style.cssText = boxcss;
document.body.appendChild(myDiv);
Loading…
Cancel
Save