// ==UserScript== // @name ACQUA: StackExchange best answer predictor // @namespace https://acqua.kmi.open.ac.uk/ // @description G. Gkotsis, K. Stepanyan, C. Pedrinaci, J. Domingue, and M. Liakata. It's all in the Content: State of the art Best Answer Prediction based on Discretisation of Shallow Linguistic Features. In Proceedings of the 2014 ACM Conference on Web Science, WebSci '14, pages 202-210, New York, NY, USA, 2014. ACM. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js // @include http*://*.stackexchange.com/questions/* // @include http*://stackoverflow.com/questions/* // @include http*://askubuntu.com/questions/* // @include http*://mathoverflow.net/questions/* // @include http*://serverfault.com/questions/* // @include http*://superuser.com/questions/* // @version 1.3 // @run-at document-end // @grant GM_xmlhttpRequest // @downloadURL https://update.greasyfork.icu/scripts/6698/ACQUA%3A%20StackExchange%20best%20answer%20predictor.user.js // @updateURL https://update.greasyfork.icu/scripts/6698/ACQUA%3A%20StackExchange%20best%20answer%20predictor.meta.js // ==/UserScript== // GM_getResourceURL URL = "https://acqua.kmi.open.ac.uk/predict?URL=" + document.URL; GM_xmlhttpRequest({ method: "GET", url: URL, onload: function(xhr) { id = "#answer-"+xhr.responseText; var num = parseInt(xhr.responseText) || 0; if (num==0){ // $("#question").append( "

" ); $("#header").append("
Acqua: You need to authenticate
"); } else $("#header").append("
Acqua is loaded
"); $(id).prepend( "
ACQUA icon
"); // $(id+" :first").prepend( "
ACQUA icon
"); $(id).css({"border-color": "#1b75bb", "border-width":"5px", "border-style":"solid"}); // $(id).append("AcQUA: Did you find this useful? Yes    No"); $(id).append("ACQUA: Did you find this useful? Yes    No"); $('#acquayes').hover(function(){ $(this).css('background','#9a3334'); }, function(){$(this).css('background','#003366');} ); $('#acquano').hover(function(){ $(this).css('background','#9a3334'); }, function(){$(this).css('background','#003366');} ); $("#acquayes").click (function () { $.ajax({ url: "https://acqua.kmi.open.ac.uk/feedback?answer=yes&id="+xhr.responseText, jsonp: "callback", dataType: "jsonp", data: { q: "", format: "json" }, success: function( response ) { ; }, error:function(response){$('#acquafeedback').html("Thank you!");} }); }); $("#acquano").click (function () { $.ajax({ url: "https://acqua.kmi.open.ac.uk/feedback?answer=no&id="+xhr.responseText, jsonp: "callback", dataType: "jsonp", data: { q: "", format: "json" }, success: function( response ) { ; }, error:function(response){$('#acquafeedback').html("Thank you!");} }); }); } });