L_editor/editor/plugins/googlemaps/fckplugin.js

(开头部分) 22KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*
	GoogleMaps Plugin for FCKeditor
	Dialog plugin to handle insertion and modification of Google Maps in FCKeditor

	File Author:
		Alfonso Martinez de Lizarrondo amla70 at gmail dot com

	version 1.98

	See readme.html
*/

// Check that the Google key is defined
if ( typeof( FCKConfig.GoogleMaps_Key ) != 'string')
{
	alert( 'Error.\r\nThe configuration doesn\'t contain the Google Maps key.\r\n' + 
		'Please read the Configuration section.') ;

	window.open(FCKPlugins.Items['googlemaps'].Path + 'docs/' + FCKLang.GMapsHelpFile + '#configure');
}

// If it's empty automatically remove the button from any toolbar.
if ( !FCKConfig.GoogleMaps_Key || FCKConfig.GoogleMaps_Key.length === 0)
{
	for( var name in FCKConfig.ToolbarSets )
		RemoveButtonFromToolbarSet( FCKConfig.ToolbarSets[name], 'googlemaps' ) ;
}

/**
	Helper function
	It does remove a button from an toolbarset. 
	It's better than leaving it disabled as it will avoid questions about why some button is always disabled.
*/
function RemoveButtonFromToolbarSet(ToolbarSet, CommandName)
{
	if (!ToolbarSet)
		return;

	for ( var x = 0 ; x < ToolbarSet.length ; x++ )
	{
		var oToolbarItems = ToolbarSet[x] ;

		// If the configuration for the toolbar is missing some element or has any extra comma
		// this item won't be valid, so skip it and keep on processing.
		if ( !oToolbarItems ) 
			continue ;

		if ( typeof( oToolbarItems ) == 'object' )
		{
			for ( var j = 0 ; j < oToolbarItems.length ; j++ )
			{
				if ( oToolbarItems[j] == CommandName)
				{
						oToolbarItems.splice(j, 1);
						ToolbarSet[x] = oToolbarItems ;
						return;
				}
			}
		}
	}
后面还有 692 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。