Reduce size of Press This bookmarklet. see #7261

git-svn-id: http://svn.automattic.com/wordpress/trunk@8308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-07-10 16:54:32 +00:00
parent 0022c2c510
commit 6960418d18
1 changed files with 8 additions and 12 deletions

View File

@ -754,22 +754,18 @@ function get_shortcut_link() {
var f='" . admin_url('press-this.php') . "'; var f='" . admin_url('press-this.php') . "';
var l=d.location; var l=d.location;
var e=encodeURIComponent; var e=encodeURIComponent;
var u= '?u=' + e(l.href); var g=f+'?u='+e(l.href)+'&t='+e(d.title)+'&s='+e(s)+'&v=2';
var t= '&t=' + e(d.title);
var s= '&s=' + e(s);
var v='&v=1';
var g= f+u+t+s+v;
function a(){ function a(){
if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=700,height=500')){ if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=700,height=500')){
l.href=g; l.href=g;
} }
} }";
if(/Firefox/.test(navigator.userAgent)){ if (strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false)
setTimeout(a,0); $link .= 'setTimeout(a,0);';
}else{ else
a(); $link .= 'a();';
}
void(0);"; $link .= "void(0);";
$link = str_replace(array("\r", "\n", "\t"), '', $link); $link = str_replace(array("\r", "\n", "\t"), '', $link);