Advertisement
Raul_julian

Untitled

Sep 15th, 2015
415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function convert_url_complete() {
  2.   var interval = setInterval(function() {
  3.         var dir = $(".icon-button");
  4.        
  5.         if(dir.length != 0) {
  6.           if($(".icon-button")[0].href.indexOf("/wp-content") == -1) {
  7.             clearInterval(interval);
  8.           }
  9.           var id = $("#id_download").attr("class") ;
  10.  
  11.           if(id.length != 0) {
  12.             dir.attr("href", "http://dtsconsultoria.com.br/blog/download/" + id );  
  13.             console.warn("Thanks to use the script change url plugin email before download");
  14.           } else {
  15.             console.log("Alert_mensenger: You can insert span tag in your code.");
  16.           }
  17.        } else {
  18.          console.log("Console: undefined wrong");
  19.        }
  20.   }, 1);
  21. }
  22.  
  23. if (("jQuery" in window)) {
  24.         console.info("jQuery ($) not defined");
  25.         var k = document,
  26.                 c = k.createElement('script'),
  27.                 ref = k.getElementsByTagName('script')[0];
  28.         c.type = "text/javascript";
  29.         c.src = "http://code.jquery.com/jquery-1.9.1.min.js";
  30.         c.onload = function () {
  31.                 console.warn("jQuery ($) defined");
  32.                 convert_url_complete();
  33.         }
  34.         ref.parentNode.insertBefore(c, ref);
  35. }
  36. else convert_url_complete();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement