From 6960418d182c87147a42b673f69e003629b30ea9 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 10 Jul 2008 16:54:32 +0000 Subject: [PATCH] Reduce size of Press This bookmarklet. see #7261 git-svn-id: http://svn.automattic.com/wordpress/trunk@8308 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/link-template.php | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 434faf3da..d864ba29c 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -754,22 +754,18 @@ function get_shortcut_link() { var f='" . admin_url('press-this.php') . "'; var l=d.location; var e=encodeURIComponent; - var u= '?u=' + e(l.href); - var t= '&t=' + e(d.title); - var s= '&s=' + e(s); - var v='&v=1'; - var g= f+u+t+s+v; + var g=f+'?u='+e(l.href)+'&t='+e(d.title)+'&s='+e(s)+'&v=2'; function a(){ if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=700,height=500')){ l.href=g; } - } - if(/Firefox/.test(navigator.userAgent)){ - setTimeout(a,0); - }else{ - a(); - } - void(0);"; + }"; + if (strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false) + $link .= 'setTimeout(a,0);'; + else + $link .= 'a();'; + + $link .= "void(0);"; $link = str_replace(array("\r", "\n", "\t"), '', $link);