403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/cvetdv.ru/bitrix/js/landing/mediaservice/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/cvetdv.ru/bitrix/js/landing/mediaservice/google_maps_search_mediaservice.js
;(function() {
	"use strict";

	BX.namespace("BX.Landing.MediaService");


	/**
	 * Implements interface for works with Google Maps Search
	 * @inheritDoc
	 */
	BX.Landing.MediaService.GoogleMapsSearch = function(url, settings)
	{
		BX.Landing.MediaService.BaseMediaService.apply(this, arguments);

		this.matcher = BX.Landing.Utils.Matchers.googleMapsSearch;
		this.embedURL = function(matched) {
			var query = "";

			if (matched[5])
			{
				query = matched[5].replace("query=", "q=").replace("api=1", "");
			}
			else if (matched[9])
			{
				query = matched[9];
			}

			return "//maps.google." + matched[2] + "/maps?q=" + query + "&output=embed";
		};
	};


	/**
	 * Checks that URL is valid Google Maps Search
	 * @param {string} url
	 * @return {boolean}
	 */
	BX.Landing.MediaService.GoogleMapsSearch.validate = function(url)
	{
		return BX.Landing.Utils.Matchers.googleMapsSearch.test(url);
	};


	BX.Landing.MediaService.GoogleMapsSearch.prototype = {
		constructor: BX.Landing.MediaService.GoogleMapsSearch,
		__proto__: BX.Landing.MediaService.BaseMediaService.prototype,

		/**
		 * Gets URL preview HTMLElement
		 * @return {Promise<HTMLElement>}
		 */
		getURLPreviewElement: function()
		{
			return new Promise(function(resolve) {
				var title = "<span class=\"fa fa-map\"></span>&nbsp;Google Maps";

				setTimeout(function() {
					resolve(
						BX.create("div", {
							props: {className: "landing-ui-mediaservice-url-preview landing-ui-mediaservice-url-preview-map"},
							children: [
								BX.create("div", {
									props: {className: "landing-ui-mediaservice-url-preview-text"},
									children: [
										BX.create("div", {
											props: {className: "landing-ui-mediaservice-url-preview-text-title"},
											html: title
										})
									]
								})
							]
						})
					);
				}, 400);
			});
		}
	};
})();

Youez - 2016 - github.com/yon3zu
LinuXploit