Advertisement
Guest User

Sample 1 - jQuery DOMAIN (via NEW)

a guest
May 14th, 2012
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. javascript:
  2.  
  3. function myRadFunction() {
  4.     var domain2Dirty = $('.sub').html();
  5.     var domain2Dirty2 = domain2Dirty.substring(13);
  6.     var indexURLEnd = domain2Dirty2.indexOf('"');
  7.     var domain2 = domain2Dirty2.substring(0,indexURLEnd);
  8.     alert(domain2);
  9.    
  10.     /*$.get("http://getpocket.com/unread", function(data){
  11.     alert($('.favicon').attr('domain'));
  12.     });*/
  13.    
  14.     /*RETURNS CORRECTLY FROM OLD READING LIST (../unread)
  15.     alert($('.favicon').attr('domain')); --> DOMAIN
  16.     alert($('.item').html()); --> TITLE
  17.     */
  18. }
  19.  
  20. if (!($ = window.jQuery)) {
  21.     script = document.createElement( 'script' );  
  22.     script.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js';  
  23.     script.onload=myRadFunction;  
  24.     document.body.appendChild(script);  
  25. }  
  26. else {  
  27.     myRadFunction();  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement