Changeset 8308

Show
Ignore:
Timestamp:
07/10/08 16:54:32 (5 months ago)
Author:
ryan
Message:

Reduce size of Press This bookmarklet. see #7261

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/link-template.php

    r8301 r8308  
    755755            var l=d.location; 
    756756            var e=encodeURIComponent; 
    757             var u= '?u=' + e(l.href); 
    758             var t= '&t=' + e(d.title); 
    759             var s= '&s=' + e(s); 
    760             var v='&v=1'; 
    761             var g= f+u+t+s+v; 
     757            var g=f+'?u='+e(l.href)+'&t='+e(d.title)+'&s='+e(s)+'&v=2'; 
    762758            function a(){ 
    763759                if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=700,height=500')){ 
    764760                    l.href=g; 
    765761                } 
    766             } 
    767             if(/Firefox/.test(navigator.userAgent)){ 
    768                 setTimeout(a,0)
    769             }else{ 
    770                 a()
    771             } 
    772             void(0);"; 
     762            }"; 
     763            if (strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false) 
     764                $link .= 'setTimeout(a,0);'
     765            else 
     766                $link .= 'a();'
     767 
     768            $link .= "void(0);"; 
    773769 
    774770    $link = str_replace(array("\r", "\n", "\t"),  '', $link);