Skip to content

Instantly share code, notes, and snippets.

@boubkhaled
Last active June 15, 2016 10:25
Show Gist options
  • Select an option

  • Save boubkhaled/00e41ab92ec6e875e9256e4b28a28f30 to your computer and use it in GitHub Desktop.

Select an option

Save boubkhaled/00e41ab92ec6e875e9256e4b28a28f30 to your computer and use it in GitHub Desktop.
سكريبت تحديث عنوان الدرس script
// ==UserScript==
// @name miraath.net ميراث الأنبياء
// @namespace js
// @include http://www.miraath.net/radios.php?id=1
// @include http://miraath.net/radios.php?id=1
// @version 1
// @grant none
// ==/UserScript==
// Inject jQuery
(function(){function l(u,i){
var d=document;if(!d.getElementById(i)){var s=d.createElement('script');s.src=u;s.id=i;d.body.appendChild(s);}}l('https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js','jquery')})();
if($("#div_author") === null) $("object").after("<div id='div_author' ></div>");
else if($("#div_author").length == 0) $("object").after("<div id='div_author' ></div>");
var refresh_auth = function(){
$.get("http://www.miraath.net/radios.php?id=1&tt=" + Math.random() ,
function(data){
var auyh = $(data).find("td.dirc:nth-child(1)").text();
//console.log("Auteur : " + auyh);
$("td.dirc:nth-child(1)").text(auyh);
$("#div_author").text(auyh);
})
}
setInterval(refresh_auth,1000 * 60);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment