var G_calificar = false; var G_segundos = 30; var old = window.onload; //window.onload=function(){ //try{ //old(); //}catch(err){} var elem = document.createElement('link'); elem.href="https://rating.semaqroo.gob.mx/sweetalert.css"; elem.rel="stylesheet"; document.body.appendChild(elem); var elem1 = document.createElement('script'); elem1.src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"; document.body.appendChild(elem1); var elem8 = document.createElement('script'); elem8.src="https://rating.semaqroo.gob.mx/contador.php?url="+encodeURI(window.location.href)+"&1524"; document.body.appendChild(elem8); var elem2 = document.createElement('link'); elem2.href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"; elem.rel="stylesheet"; document.body.appendChild(elem2); var elem3 = document.createElement('link'); elem3.href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css"; elem.rel="stylesheet"; document.body.appendChild(elem3); var elem4 = document.createElement('script'); elem4.src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"; if (window.jQuery) { // jQuery is loaded // alert("Yeah!"); } else { // jQuery is not loaded document.body.appendChild(elem4); } var elem7 = document.createElement('script'); elem7.src="https://rating.semaqroo.gob.mx/jquery.ajax-cross-origin.min.js"; document.body.appendChild(elem7); var elem5 = document.createElement('script'); elem5.src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"; document.body.appendChild(elem5); var elem6 = document.createElement('link'); elem6.href="https://rating.semaqroo.gob.mx/style.css?8055"; elem6.rel="stylesheet"; document.body.appendChild(elem6); //} function ask() { let wrap = document.createElement('div'); wrap.setAttribute('class', 'text-muted'); wrap.innerHTML = '
'; swal({ title: "", text: "Califique nuestro contenido", icon: "", className: '', closeOnClickOutside: false, content: { element: wrap }, buttons: { confirm: { text: "Close", value: '', visible: true, className: "btn btn-default", closeModal: true, } }, }); window.setTimeout(function(){ $('.rate-btn').hover(function(){ $('.rate-btn').removeClass('rate-btn-hover'); var therate = $(this).attr('id'); for (var i = therate; i >= 0; i--) { $('.btn-'+i).addClass('rate-btn-hover'); } }); $('.rate-btn').click(function(){ var therate = $(this).attr('id'); var link = 'http://rating.semaqroo.gob.mx/'; var elem7 = document.createElement('script'); elem7.src="https://rating.semaqroo.gob.mx/ajax.php?calif="+therate+"&url="+encodeURI(window.location.href); document.body.appendChild(elem7); swal("", "Gracias por tu valoraciĆ³n", "success"); }); },50); }