⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 found it.kon

📁 Yahoo!search API. 用于搜索引擎接口
💻 KON
📖 第 1 页 / 共 4 页
字号:
				text.size = 11;				text.data = node.evaluate( "string(Summary)" );				text.hOffset = maxWidth + 10;				if ( ratingIsThere )					text.vOffset = 54;				else					text.vOffset = 40;									text.width = 385 - maxWidth;				text.editable = false;				text.scrollbar = false;				tmpTextHeight = text.vOffset + text.height;				itemFrame.addSubview( text );				itemFrameViews.address = text;				if ( (text.vOffset + text.height) > frameHeight )					frameHeight = text.vOffset + text.height + 10;				itemFrame.addSubview( text );				itemFrameViews.city = text;				// Our list item is complete, add it to the main frame in the right position				itemFrame.vOffset = heightOffset;				if ( subItem%2 )				{					image = new Image();					image.src = "Images/darkRow.png";					image.hOffset = 0;					image.vOffset = 0;					image.width = 425;					image.height = frameHeight;					image.zOrder = 0;										itemFrame.addSubview( image );					itemFrameViews.background = image;				}				itemFrame.height = frameHeight;				heightOffset += frameHeight;								itemArray[itemArray.length] = itemFrame; // hold onto this so it doesn't get garbage collected				itemList.addSubview( itemFrame );								subItem++;				itemsAdded++;			}		}		function getVideoSearch(what)		{			mySearchData = url.fetch("http://api.search.yahoo.com/VideoSearchService/V1/videoSearch?appid=Konfabulator&query=" + escape(what) + "&results=" + howMany);			var xml = XMLDOM.parse( mySearchData );						var subItem = 0;			var itemsAdded = 0;			var results = xml.evaluate( "ResultSet/Result" );						var heightOffset = 0;						itemArray = new Array();			itemList.scrollY = 0;						maxWidth = 0;			if (results.length == 0)			{				noResults.visible = true;				return;			}			for (n = 0; n < results.length; n++)			{				var node = results.item(n);				if ( Number(node.evaluate( "string(Thumbnail/Width)" )) > maxWidth) maxWidth = Number(node.evaluate( "string(Thumbnail/Width)" ));			}			for (n = 0; n < results.length; n++)			{				var itemFrame = new Frame();				var itemFrameViews = new Array();				var image = null;				var text = null;								var node = results.item(n);				frameHeight = Number(node.evaluate( "string(Thumbnail/Height)" )) + 16;				if ( frameHeight < 70 ) frameHeight = 70;				rightOffset = (maxWidth - Number(node.evaluate( "string(Thumbnail/Width)" )))/2;				itemFrame.width = 425;// -- START FRAME								image = new Image();				image.hOffset = rightOffset + 5;				image.vOffset = 6;				image.src = "Images/imageBoxTopLeft.png";								itemFrame.addSubview( image );				itemFrameViews.background = image;				image = new Image();				image.hOffset = rightOffset + 18;				image.vOffset = 6;				image.width = Number(node.evaluate( "string(Thumbnail/Width)" )) - 20;				image.src = "Images/imageBoxTop.png";								itemFrame.addSubview( image );				itemFrameViews.background = image;				image = new Image();				image.hOffset = rightOffset + Number(node.evaluate( "string(Thumbnail/Width)" )) - 2;				image.vOffset = 6;				image.src = "Images/imageBoxTopRight.png";				itemFrame.addSubview( image );				itemFrameViews.background = image;				image = new Image();				image.hOffset = rightOffset + 5;				image.vOffset = 18;				image.height = Number(node.evaluate( "string(Thumbnail/Height)" )) - 20;				image.src = "Images/imageBoxLeft.png";								itemFrame.addSubview( image );				itemFrameViews.background = image;				image = new Image();				image.hOffset = rightOffset + 18;				image.vOffset = 18;				image.width = Number(node.evaluate( "string(Thumbnail/Width)" )) - 20;				image.height = Number(node.evaluate( "string(Thumbnail/Height)" )) - 20;				image.src = "Images/imageBoxFill.png";								itemFrame.addSubview( image );				itemFrameViews.background = image;				image = new Image();				image.hOffset = rightOffset + Number(node.evaluate( "string(Thumbnail/Width)" )) - 2;				image.vOffset = 18;				image.height = Number(node.evaluate( "string(Thumbnail/Height)" )) - 20;				image.src = "Images/imageBoxRight.png";								itemFrame.addSubview( image );				itemFrameViews.background = image;				image = new Image();				image.hOffset = rightOffset + 5;				image.vOffset = Number(node.evaluate( "string(Thumbnail/Height)" )) - 2;				image.src = "Images/imageBoxBottomLeft.png";								itemFrame.addSubview( image );				itemFrameViews.background = image;				image = new Image();				image.hOffset = rightOffset + 18;				image.vOffset = Number(node.evaluate( "string(Thumbnail/Height)" )) - 2;				image.width = Number(node.evaluate( "string(Thumbnail/Width)" )) - 20;				image.src = "Images/imageBoxBottom.png";								itemFrame.addSubview( image );				itemFrameViews.background = image;				image = new Image();				image.hOffset = rightOffset + Number(node.evaluate( "string(Thumbnail/Width)" )) - 2;				image.vOffset = Number(node.evaluate( "string(Thumbnail/Height)" )) - 2;				image.src = "Images/imageBoxBottomRight.png";								itemFrame.addSubview( image );				itemFrameViews.background = image;// -- END FRAME								image = new Image();				image.hAlign = "center";				image.vAlign = "center";				image.hOffset = rightOffset + 8 + Math.floor(Number(node.evaluate( "string(Thumbnail/Width)" ))/2);				image.vOffset = 8 + Math.floor(Number(node.evaluate( "string(Thumbnail/Height)" ))/2);				image.remoteAsync = true;				image.loadingSrc = "Images/loading.png";				image.src = node.evaluate( "string(Thumbnail/Url)" );								itemFrame.addSubview( image );				itemFrameViews.background = image;				text = new Text();				text.color = "#000000";				text.font = "Arial Bold";				text.size = 14;				text.data = node.evaluate( "string(Title)" );				text.hOffset = maxWidth + 15;				text.vOffset = 16;				text.width = 245;				text.truncation = "end";								itemFrame.addSubview( text );				itemFrameViews.title = text;				text = new TextArea();				text.color = "#616161";				text.font = "Arial";				text.size = 11;				text.data = node.evaluate( "string(Summary)" );				text.hOffset = maxWidth + 10;				text.vOffset = 22;				text.width = 240;				text.editable = false;				text.scrollbar = false;				tmpTextHeight = text.vOffset + text.height;				itemFrame.addSubview( text );				itemFrameViews.address = text;				text = new TextArea();				text.color = "#108409";				text.font = "Arial";				text.size = 11;				text.data = node.evaluate( "string(Url)" );				text.hOffset = maxWidth + 10;				text.vOffset = tmpTextHeight + 3;				text.width = 240;				text.editable = false;				text.scrollbar = false;				text.href = $qv( node.evaluate( "string(ClickUrl)" ) );				text.onMouseUp = (function () {					openURL( this.href );				});				if ( (text.vOffset + text.height) > frameHeight )					frameHeight = text.vOffset + text.height + 10;				itemFrame.addSubview( text );				itemFrameViews.city = text;				// Our list item is complete, add it to the main frame in the right position				itemFrame.vOffset = heightOffset;				if ( subItem%2 )				{					image = new Image();					image.src = "Images/darkRow.png";					image.hOffset = 0;					image.vOffset = 0;					image.width = 425;					image.height = frameHeight;					image.zOrder = 0;										itemFrame.addSubview( image );					itemFrameViews.background = image;				}				itemFrame.height = frameHeight;				heightOffset += frameHeight;								itemArray[itemArray.length] = itemFrame; // hold onto this so it doesn't get garbage collected				itemList.addSubview( itemFrame );								subItem++;				itemsAdded++;			}		}		function getLocalSearch(what)		{			mySearchData = url.fetch("http://api.local.yahoo.com/LocalSearchService/V1/localSearch?appid=Konfabulator&query=" + escape(what) + "&location=" + preferences.userLocation.value + "&results=" + howMany);			var xml = XMLDOM.parse( mySearchData );						var subItem = 0;			var itemsAdded = 0;			var results = xml.evaluate( "ResultSet/Result" );			var heightOffset = 0;			itemArray = new Array();			itemList.scrollY = 0;			if (results.length == 0)			{				noResults.visible = true;				return;			}			for (n = 0; n < results.length; n++)			{				var itemFrame = new Frame();				var itemFrameViews = new Array();				var image = null;				var text = null;								var node = results.item(n);								itemFrame.width = 425;								text = new Text();				text.color = "#0000c1";				text.font = "Arial Bold";				text.size = 14;				text.data = node.evaluate( "string(Title)" );				text.hOffset = 15;				text.vOffset = 19;				text.width = 275;				text.truncation = "end";				text.href = $qv( node.evaluate( "string(ClickUrl)" ) );				text.onMouseUp = (function () {					openURL( this.href );				});				itemFrame.addSubview( text );				itemFrameViews.title = text;				text = new Text();				text.color = "#000000";				text.font = "Arial Bold";				text.size = 14;				text.data = node.evaluate( "string(Phone)" );				text.hOffset = 390;				text.vOffset = 19;				text.alignment = "right";				text.width = 385;				text.truncation = "end";								itemFrame.addSubview( text );				itemFrameViews.title = text;				if ( node.evaluate( "string(Address)" ) != "" )				{					text = new Text();					text.color = "#000000";					text.font = "Arial";					text.size = 12;					text.data = node.evaluate( "string(Address)" );					text.hOffset = 15;					text.vOffset = 34;					text.width = 385;					text.truncation = "end";					itemFrame.addSubview( text );					itemFrameViews.address = text;					text = new Text();					text.color = "#000000";					text.font = "Arial";					text.size = 12;					text.data = node.evaluate( "string(City)" ) + ", " + node.evaluate( "string(State)" );					text.hOffset = 15;					text.vOffset = 47;					text.width = 385;					text.truncation = "end";					itemFrame.addSubview( text );					itemFrameViews.city = text;					text = new Text();					text.color = "#000000";					text.font = "Arial";					text.size = 11;					text.data = node.evaluate( "string(Distance)" ) + " miles away";					text.hOffset = 15;					text.vOffset = 60;					text.width = 385;					text.truncation = "end";					itemFrame.addSubview( text );					itemFrameViews.city = text;				}				else				{					text = new Text();					text.color = "#000000";					text.font = "Arial";					text.size = 12;					text.data = node.evaluate( "string(City)" ) + ", " + node.evaluate( "string(State)" );					text.hOffset = 15;					text.vOffset = 34;					text.width = 385;					text.truncation = "end";					itemFrame.addSubview( text );					itemFrameViews.city = text;					text = new Text();					text.color = "#000000";					text.font = "Arial";					text.size = 11;					text.data = node.evaluate( "string(Distance)" ) + " miles away";					text.hOffset = 15;					text.vOffset = 47;					text.width = 385;					text.truncation = "end";					itemFrame.addSubview( text );					itemFrameViews.city = text;				}				rating = node.evaluate( "string(Rating)" );				if (rating == "") rating = "none";				image = new Image();				image.src = "Images/" + rating + ".png";				image.hOffset = 390;				image.vOffset = 26;				image.hAlign = "right";								itemFrame.addSubview( image );				itemFrameViews.background = image;				image = new Image();				image.src = "Images/map.png";				image.hOffset = 390;				image.vOffset = 41;				image.hAlign = "right";				if ( node.evaluate( "string(MapUrl)" ) != "" )				{					image.href = $qv( node.evaluate( "string(MapUrl)" ) );					image.onMouseUp = (function (){						openURL( this.href );					});				}				else				{					image.opacity = 80;				}				itemFrame.addSubview( image );				itemFrameViews.background = image;				if ( node.evaluate( "string(BusinessUrl)" ) != "" )				{					text = new Text();					text.color = "#108409";					text.font = "Arial";					text.size = 11;					text.data = node.evaluate( "string( BusinessUrl)" );					text.hOffset = 15;					text.vOffset = 75;					text.width = 385;					text.truncation = "end";					text.zOrder = 3;					text.href = $qv( node.evaluate( "string( BusinessClickUrl)" ) );					text.onMouseUp = (function (){						openURL( this.href );					});						itemFrame.addSubview( text );					itemFrameViews.city = text;										frameHeight = 86;				}				else				{					frameHeight = 72;				}				// Our list item is complete, add it to the main frame in the right position				itemFrame.vOffset = heightOffset;				if ( subItem%2 )				{					image = new Image();					image.src = "Images/darkRow.png";					image.hOffset = 0;					image.vOffset = 0;					image.width = 425;					image.height = frameHeight;					image.zOrder = 0;										itemFrame.addSubview( image );					itemFrameViews.background = image;				}				itemFrame.height = frameHeight;				heightOffset += frameHeight;				itemArray[itemArray.length] = itemFrame; // hold onto this so it doesn't get garbage collected				itemList.addSubview( itemFrame );								subItem++;				itemsAdded++;			}		}		function getWebSearch(what)		{					mySearchData = url.fetch("http://api.search.yahoo.com/WebSearchService/V1/webSearch?appid=Konfabulator&query=" + escape(what) + "&results=" + howMany);print (mySearchData);			var xml = XMLDOM.parse( mySearchData );						var subItem = 0;			var itemsAdded = 0;			var results = xml.evaluate( "ResultSet/Result" );

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -