PageSourceSearch

https://rhapsody.health/wp-content/plugins/sps-rhapsody-blocks/assets/extend-core-button.js

js rhapsody.health collected 2026-10-03 19:58:10 UTC 642 bytes, 29 lines download raw bytes

1/**
2 * Prevent sticky focus on custom button links that open a new tab.
3 *
4 * @package SPS_Rhapsody_Blocks
5 */
6( function () {
7	var selector =
8		'.wp-block-button.sps-button--has-hover-colors .wp-block-button__link[target="_blank"]';
9
10	/**
11	 * Prevent mouse focus so theme link :focus styles do not flash on click.
12	 *
13	 * @param {MouseEvent} event Mousedown event.
14	 */
15	function preventMouseFocus( event ) {
16		if ( event.button !== 0 ) {
17			return;
18		}
19
20		var link = event.target.closest( selector );
21
22		if ( ! link ) {
23			return;
24		}
25
26		event.preventDefault();
27	}
28	document.addEventListener( 'mousedown', preventMouseFocus, true );
29} )();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.