Skip to content

Instantly share code, notes, and snippets.

@NaokiStark
Last active February 2, 2017 14:43
Show Gist options
  • Save NaokiStark/2bd6bbe40c112006a2ee to your computer and use it in GitHub Desktop.
Save NaokiStark/2bd6bbe40c112006a2ee to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Notificaciones
// @namespace fabi
// @version 0.2
// @description Notificaciones...
// @author Fabi
// @match http*://www.taringa.net/*
// @grant none
// ==/UserScript==
$(document).ready(function(){
setInterval(function(){UpdateCount()},5000);
});
var UpdateCount = function(){
//obtener html
$.get('/clima',null,function(e){
var reg=/new notifications\('[\w\d]+',\s*(.*?)\)/ig;
var results=reg.exec(e);
notifications.updateCounts(JSON.parse(results[1]));
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment