Changeset 41313
- Timestamp:
- 08/24/2017 05:54:22 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/bookmarklet.js
r32828 r41313 1 /** 2 * @summary Creates a form with a URL, title, and content based on the current opened URL and the content of the associated web page. 3 * 4 * @since 4.2.0 5 * 6 * @param {window} window The window. 7 * @param {document} document The document. 8 * @param {string} href The current opened URL. 9 * @param {string} pt_url The URL to post the content to. 10 * 11 * @returns {void} 12 */ 1 13 ( function( window, document, href, pt_url ) { 2 14 var encURI = window.encodeURIComponent, … … 14 26 if ( href.match( /^https?:/ ) ) { 15 27 pt_url += '&u=' + encURI( href ); 28 // Check whether the unencoded url and the encoded url use the same protocol. 16 29 if ( href.match( /^https:/ ) && pt_url.match( /^http:/ ) ) { 17 30 canPost = false; … … 53 66 } 54 67 68 /** 69 * @summary Creates a hidden input field and sets its name and value. 70 * 71 * @since 4.2.0 72 * 73 * @param name The input field name. 74 * @param value The input field value. 75 * 76 * @returns {void} 77 */ 55 78 function add( name, value ) { 56 79 if ( typeof value === 'undefined' ) {
Note: See TracChangeset
for help on using the changeset viewer.