IP : 3.19.239.158Hostname : server86.web-hosting.comKernel : Linux server86.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64Disable Function : None :) OS : Linux
PATH:
/
home/
servlmvm/
puppiesoftexas.com/
wp-includes/
js/
wplink.js/
/
// If URL wasn't corrected last time and doesn't start with http:, https:, ? # or /, prepend http://. correctURL: function () { var url = inputs.url.val().trim();
if ( typeof window.tinymce !== 'undefined' ) { // Make sure the link wrapper is the last element in the body, // or the inline editor toolbar may show above the backdrop. $body.append( inputs.backdrop, inputs.wrap );
ed = window.tinymce.get( window.wpActiveEditor );
if ( ed && ! ed.isHidden() ) { editor = ed; } else { editor = null; } }
if ( wpLink.isMCE() ) { wpLink.mceRefresh( url, text ); } else { // For the Text editor the "Link text" field is always shown. if ( ! inputs.wrap.hasClass( 'has-text-field' ) ) { inputs.wrap.addClass( 'has-text-field' ); }
if ( document.selection ) { // Old IE. linkText = document.selection.createRange().text || text || ''; } else if ( typeof this.textarea.selectionStart !== 'undefined' && ( this.textarea.selectionStart !== this.textarea.selectionEnd ) ) { // W3C. text = this.textarea.value.substring( this.textarea.selectionStart, this.textarea.selectionEnd ) || text || ''; }
inputs.text.val( text ); wpLink.setDefaultValues(); }
if ( isTouch ) { // Close the onscreen keyboard. inputs.url.trigger( 'focus' ).trigger( 'blur' ); } else { /* * Focus the URL field and highlight its contents. * If this is moved above the selection changes, * IE will show a flashing cursor over the dialog. */ window.setTimeout( function() { inputs.url[0].select(); inputs.url.trigger( 'focus' ); } ); }
// Load the most recent results if this is the first time opening the panel. if ( ! rivers.recent.ul.children().length ) { rivers.recent.ajax(); }
hasSelectedText: function( linkNode ) { var node, nodes, i, html = editor.selection.getContent();
// Partial html and not a fully selected anchor element. if ( /</.test( html ) && ( ! /^<a [^>]+>[^<]+<\/a>$/.test( html ) || html.indexOf('href=') === -1 ) ) { return false; }
if ( linkNode.length ) { nodes = linkNode[0].childNodes;
if ( searchStr && searchStr !== href ) { // The user has typed something in the inline dialog. Trigger a search with it. inputs.search.val( searchStr ); } else { inputs.search.val( '' ); }
// If there's no href, return. if ( ! attrs.href ) { return; }
html = wpLink.buildHtml(attrs);
// Insert HTML. if ( document.selection && wpLink.range ) { // IE. // Note: If no text is selected, IE will not place the cursor // inside the closing tag. textarea.focus(); wpLink.range.text = html + ( text || wpLink.range.text ) + '</a>'; wpLink.range.moveToBookmark( wpLink.range.getBookmark() ); wpLink.range.select();
wpLink.range = null; } else if ( typeof textarea.selectionStart !== 'undefined' ) { // W3C. begin = textarea.selectionStart; end = textarea.selectionEnd; selection = text || textarea.value.substring( begin, end ); html = html + selection + '</a>'; cursor = begin + html.length;
// If no text is selected, place the cursor inside the closing tag. if ( begin === end && ! selection ) { cursor -= 4; }
textarea.value = ( textarea.value.substring( 0, begin ) + html + textarea.value.substring( end, textarea.value.length ) );
// Escape key. if ( 27 === event.keyCode ) { wpLink.close(); event.stopImmediatePropagation(); // Tab key. } else if ( 9 === event.keyCode ) { id = event.target.id;
// wp-link-submit must always be the last focusable element in the dialog. // Following focusable elements will be skipped on keyboard navigation. if ( id === 'wp-link-submit' && ! event.shiftKey ) { inputs.close.trigger( 'focus' ); event.preventDefault(); } else if ( id === 'wp-link-close' && event.shiftKey ) { inputs.submit.trigger( 'focus' ); event.preventDefault(); } }
// Up Arrow and Down Arrow keys. if ( event.shiftKey || ( 38 !== event.keyCode && 40 !== event.keyCode ) ) { return; }
$.extend( River.prototype, { refresh: function() { this.deselect(); this.visible = this.element.is( ':visible' ); }, show: function() { if ( ! this.visible ) { this.deselect(); this.element.show(); this.visible = true; } }, hide: function() { this.element.hide(); this.visible = false; }, // Selects a list item and triggers the river-select event. select: function( li, event ) { var liHeight, elHeight, liTop, elTop;
if ( li.hasClass( 'unselectable' ) || li == this.selected ) return;
this.deselect(); this.selected = li.addClass( 'selected' ); // Make sure the element is visible. liHeight = li.outerHeight(); elHeight = this.element.height(); liTop = li.position().top; elTop = this.element.scrollTop();
if ( liTop < 0 ) // Make first visible element. this.element.scrollTop( elTop + liTop ); else if ( liTop + liHeight > elHeight ) // Make last visible element. this.element.scrollTop( elTop + liTop - elHeight + liHeight );
// Trigger the river-select event. this.element.trigger( 'river-select', [ li, event, this ] ); }, deselect: function() { if ( this.selected ) this.selected.removeClass( 'selected' ); this.selected = false; }, prev: function() { if ( ! this.visible ) return;
var to; if ( this.selected ) { to = this.selected.prev( 'li' ); if ( to.length ) this.select( to ); } }, next: function() { if ( ! this.visible ) return;