// ==UserScript==
// @name Temas ForoBeta
// @version 0.1
// @description Obtén los temas actualizados de forobeta.com sin recargar la página
// @author kanikase
// @match http://forobeta.com/
// [MENTION=39868]grant[/MENTION] none
// ==/UserScript==
/* jshint -W097 */
'use strict';
function ajax(s,e,a){
var t = new XMLHttpRequest;
t.open("GET", s),
t.onreadystatechange = function(){
if(4 == t.readyState && 200 == t.status){
var s = t.responseText;
e(s, a)
}
},
t.send(null)
}
function escribe(s,e){
document.getElementById(e).innerHTML = '<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center" height="100%"><tbody>'+s+"</tbody></table>"
}
function nuevosTemas(s){
setInterval(function(){
ajax("/misc.php?show=latestthread&vsacb_resnr=11", escribe, "vsastats_ltdiv"),
ajax("/misc.php?show=latestposts&vsacb_resnr=11", escribe, "vsastats_lpdiv"),
ajax("/misc.php?show=businessthread&vsacb_resnr=11", escribe, "vsastats_bfdiv"),
ajax("/misc.php?show=subastasforum&vsacb_resnr=11", escribe, "vsastats_sfdiv"),
ajax("/misc.php?show=newthread&vsacb_resnr=11", escribe, "vsastats_tndiv"),
ajax("/misc.php?show=updatethread&vsacb_resnr=11", escribe, "vsastats_tudiv")
}, 1e3 * s)
}
nuevosTemas(10);