PageSourceSearch

https://www.notariosyregistradores.com/web/wp-content/cache/wpfc-minified/dfe4tpgs/3tkv0.js

js notariosyregistradores.com collected 2026-09-24 10:08:56 UTC 3,239 bytes, 139 lines download raw bytes

1// source --> https://www.notariosyregistradores.com/web/wp-content/plugins/simple-share-buttons-adder/js/ssba.js?ver=1754429400 
2/**
3 * Main.
4 *
5 * @package SimpleShareButtonsAdder
6 */
7
8/* exported Main */
9var Main = ( function( $, FB ) {
10	'use strict';
11
12	return {
13		/**
14		 * Holds data.
15		 */
16		data: {},
17
18		/**
19		 * Boot plugin.
20		 *
21		 * @param data
22		 */
23		boot: function( data ) {
24			this.data = data;
25
26			$( document ).ready(
27				function() {
28					this.init();
29				}.bind( this )
30			);
31		},
32
33		/**
34		 * Initialize plugin.
35		 */
36		init: function() {
37			this.listen();
38			this.removeP();
39		},
40
41		/**
42		 * Listener event.
43		 */
44		listen: function() {
45			var self = this;
46
47			// Upon clicking a share button.
48			$( 'body' ).on(
49				'click',
50				'.ssbp-wrap a',
51				function( event ) {
52
53					// Don't go the the href yet.
54					event.preventDefault();
55					self.engageShareButton( this );
56				}
57			);
58		},
59
60		/**
61		 * Share button popup
62		 *
63		 * @param event
64		 */
65		engageShareButton: function( event ) {
66
67			// If it's facebook mobile.
68			if ( 'mobile' === $( event ).data( 'facebook' ) ) {
69				FB.ui(
70					{
71						method: 'share',
72						mobile_iframe: true,
73						href: $( event ).data( 'href' )
74					},
75					function( response ) {}
76				);
77			} else {
78				// These share options don't need to have a popup.
79				if ( 'copy' === $( event ).data( 'site' ) || 'email' === $( event ).data( 'site' ) || 'print' === $( event ).data( 'site' ) || 'pinterest' === $( event ).data( 'site' ) ) {
80					if ( 'copy' === $( event ).data( 'site' ) ) {
81						const copybutton = document.querySelector( '[data-site="copy"]' );
82
83						navigator.clipboard.writeText(copybutton.getAttribute('href'));
84
85						if ( copybutton ) {
86							const copymessage = document.createElement( 'span' )
87							copymessage.innerText = 'URL Copied!';
88							copymessage.className = 'copy-notify';
89							copymessage.style.opacity = '1';
90							copymessage.style.width = '100px';
91							copymessage.style.fontSize = '12px';
92							copymessage.style.transition = 'all .6s';
93							copymessage.style.position = 'absolute';
94							copymessage.style.top = '-24px';
95							copymessage.style.left = '-24px';
96							copybutton.append( copymessage );
97
98							setTimeout( () => {
99								copymessage.style.opacity = '0';
100								copymessage.style.minWidth = '0';
101								copymessage.style.width = '0';
102								copymessage.style.padding = '0';
103								copymessage.style.overflow = 'hidden';
104
105								setTimeout( () => {
106									copymessage.remove();
107								}, 1000 );
108							}, 1500 );
109						}
110					} else {
111						// Just redirect.
112						window.location.href = $( event ).attr( 'href' );
113					}
114				} else {
115
116					// Prepare popup window.
117					var width  = 575,
118						height = 520,
119						left   = ( $( window ).width() - width ) / 2,
120						top    = ( $( window ).height() - height ) / 2,
121						opts   = 'status=1' +
122								',width=' + width +
123								',height=' + height +
124								',top=' + top +
125								',left=' + left;
126
127					// Open the share url in a smaller window.
128					window.open( $( event ).attr( 'href' ), 'share', opts );
129				}
130			}
131		},
132
133		/**
134		 * Remove generated p tag from facebook save button.
135		 */
136		removeP: function() {
137		}
138	};
139} )( window.jQuery, window.FB );

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.