Changeset 31537
- Timestamp:
- 02/25/2015 03:57:43 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r31535 r31537 2609 2609 */ 2610 2610 $ua = $_SERVER['HTTP_USER_AGENT']; 2611 2611 2612 2612 if ( ! empty( $ua ) && preg_match( '/\bMSIE (\d)/', $ua, $matches ) && (int) $matches[1] <= 8 ) { 2613 $link = "javascript: 2614 var d=document, 2615 w=window, 2616 e=w.getSelection, 2617 k=d.getSelection, 2618 x=d.selection, 2619 s=(e?e():(k)?k():(x?x.createRange().text:0)), 2620 f='" . admin_url('press-this.php') . "', 2621 l=d.location, 2622 e=encodeURIComponent, 2623 u=f+'?u='+e(l.href)+'&t='+e(d.title)+'&s='+e(s)+'&v=" . $bookmarklet_version . "'; 2624 a=function(){if(!w.open(u,'t','toolbar=0,resizable=1,scrollbars=1,status=1,width=600,height=700'))l.href=u;}; 2625 if (/Firefox/.test(navigator.userAgent)) setTimeout(a, 0); else a(); 2626 void(0)"; 2613 $url = wp_json_encode( admin_url( 'press-this.php' ) ); 2614 2615 $link = 'javascript:var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,' . 2616 's=(e?e():(k)?k():(x?x.createRange().text:0)),f=' . $url . ',l=d.location,e=encodeURIComponent,' . 2617 'u=f+"?u="+e(l.href)+"&t="+e(d.title)+"&s="+e(s)+"&v=' . $bookmarklet_version . '";' . 2618 'a=function(){if(!w.open(u,"t","toolbar=0,resizable=1,scrollbars=1,status=1,width=600,height=700"))l.href=u;};' . 2619 'if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();void(0)'; 2627 2620 } 2628 2621 } 2629 2622 2630 2623 if ( empty( $link ) ) { 2624 $url = wp_json_encode( admin_url( 'press-this.php' ) . '?v=' . $bookmarklet_version ); 2625 2631 2626 /** 2632 2627 * A non-minified version if this script is in /wp-admin/js/bookmarklet.js … … 2657 2652 'f=a.outerWidth||b.documentElement.clientWidth||600,g=a.outerHeight||b.documentElement.clientHeight||700,f=800>f||f>5e3?600:.7*f,' . 2658 2653 'g=800>g||g>3e3?700:.9*g,a.open("about:blank",s,"width="+f+",height="+g),b.body.appendChild(p),p.submit()}}' . 2659 '(window,document,top.location.href, "' . admin_url( 'press-this.php' ) . '?v=' . $bookmarklet_version . '");';2654 '(window,document,top.location.href,' . $url . ');'; 2660 2655 } 2661 2656
Note: See TracChangeset
for help on using the changeset viewer.