📄 found it.kon
字号:
<?xml version=1.0 encoding="utf-8"?><?konfabulator xml-strict="true"?><widget version="1.0.5" minimumVersion="3.0" id="com.yahoo.widget.search" name="Yahoo! Search"> <settings><setting name="allowCustomObjectAttributes" value="true" /></settings> <debug>off</debug><!-- Yahoo! Search High and low, up and down, here and there... where oh where? Copyright (C) 2005 - 2006 Yahoo! Inc. All Rights Reserved.--> <window title="Yahoo! Search"> <name>mainWindow</name> <width>437</width> <height>44</height> <visible>0</visible> <shadow>0</shadow> <onFirstDisplay> mainWindow.hOffset = (screen.width/2) - 218; mainWindow.vOffset = (screen.availHeight + screen.availTop) - 54; </onFirstDisplay> <image src="Images/innerFill.png"> <name>backgroundMid</name> <vOffset>35</vOffset> <height>0</height> </image> <frame name="itemList" hOffset="6" vOffset="35" width="425" height="0" vScrollBar="sb"> <image src="Images/noResults.png" name="noResults" hOffset="213" hAlign="center" vAlign="center" visible="false"/> </frame> <scrollbar name="sb" vOffset="40" hOffset="411" height="0" width="16" thumbColor="r:30; g:30; b:30" autoHide="true" opacity="0"/> <image src="Images/topShadow.png"> <name>topShadow</name> <hOffset>6</hOffset> <vOffset>35</vOffset> <width>425</width> <clipRect>0,0,425,0</clipRect> </image> <image src="Images/bottomShadow.png"> <name>bottomShadow</name> <hOffset>6</hOffset> <vOffset>20</vOffset> <width>425</width> </image> <image src="Images/expandedTop.png"> <name>backgroundTop</name> <width>437</width> <clipRect>0,0,437,20</clipRect> </image> <image src="Images/expandedBase.png"> <name>backgroundBase</name> <width>437</width> <vOffset>20</vOffset> </image> <image src="Images/logo.png"> <name>searchLogo</name> <vOffset>9</vOffset> <hOffset>14</hOffset> </image> <image src="Images/propertyPopup.png"> <name>propertyPopup</name> <vOffset>8</vOffset> <hOffset>108</hOffset> <onMouseDown> <![CDATA[ items = new Array; popupList = ["Web", "Images", "Local", "Video", "Shopping", "News"]; for (menuCount = 0; menuCount < popupList.length; menuCount++) { items[menuCount] = new MenuItem; items[menuCount].title = popupList[menuCount]; items[menuCount].enabled = true; if ( popupList[menuCount] == preferences.searchPref.value ) { items[menuCount].onSelect = ""; items[menuCount].checked = true; } else { items[menuCount].onSelect = "preferences.searchPref.value = '" + popupList[menuCount] + "'; searchType.data='" + popupList[menuCount].toUpperCase() + "'; doPropertySwitch('" + popupList[menuCount] + "')"; items[menuCount].checked = false; } } popupMenu( items, propertyPopup.hOffset + 1, propertyPopup.vOffset + 20 ); ]]> </onMouseDown> </image> <text data="WEB" name="searchType" color="#ffffff" alignment="right" hOffset="175" vOffset="23" size="11" font="Arial Bold"> <shadow hOffset="0" vOffset="-1" opacity="128" /> </text> <image src="Images/textArea.png"> <name>textBackground</name> <vOffset>8</vOffset> <hOffset>188</hOffset> </image> <image src="Images/localDivider.png"> <name>localDivider</name> <vOffset>8</vOffset> <hOffset>328</hOffset> <opacity>255</opacity> <visible>false</visible> </image> <image src="Images/locationFocus.png"> <name>locationFocus</name> <vOffset>4</vOffset> <hOffset>325</hOffset> <opacity>0</opacity> </image> <image src="Images/recentSearches.png"> <name>recentSearches</name> <vOffset>9</vOffset> <hOffset>191</hOffset> <onMouseDown> <![CDATA[ if (preferences.lastSearchItems.value != "") { var items = new Array(); var mySearch = 0; myItems = preferences.lastSearchItems.value.split("*a*"); items[mySearch] = new MenuItem(); items[mySearch].title = "Recent Searches"; items[mySearch].enabled = 0; mySearch++ for (item in myItems) { if (myItems[item] != "") { items[mySearch] = new MenuItem(); items[mySearch].title = myItems[item]; items[mySearch].onSelect = "searchText.data = '" + myItems[item].replace(/'/, "\\'") + "'; searchText.color = '#000000';"; mySearch++ } } items[mySearch] = new MenuItem(); items[mySearch].title = "-"; items[mySearch].enabled = 0; mySearch++; items[mySearch] = new MenuItem(); items[mySearch].title = "Clear Recent Searches"; items[mySearch].onSelect = "preferences.lastSearchItems.value = '';"; } else { var items = new Array(); items[0] = new MenuItem(); items[0].title = "No Recent Searches"; items[0].enabled = 0; } popupMenu( items, recentSearches.hOffset + 1, recentSearches.vOffset + 20 ); ]]> </onMouseDown> </image> <image src="Images/focus.png"> <name>textFocus</name> <vOffset>4</vOffset> <hOffset>104</hOffset> <opacity>0</opacity> </image> <textarea data="Search"> <name>searchText</name> <hOffset>207</hOffset> <vOffset>13</vOffset> <width>205</width> <alignment>left</alignment> <font>Arial</font> <size>12</size> <color>#bababa</color> <lines>1</lines> <scrollbar>false</scrollbar> <onKeyPress> if ( system.event.key.charCodeAt(0) == 9 ) { searchText.rejectKeyPress(); if (preferences.searchPref.value == "Local") { searchText.select( 0, 0 ); locationText.focus(); if ( locationText.data ) locationText.select( 0, -1 ); } } if (system.event.keyString == "Return" || system.event.keyString == "Enter") { searchText.rejectKeyPress(); if ( opening ) startEase(); updateNow(); if( searchText.data.replace( /[^\w]/g, "" ) != "" ) doSearch(searchText.data); else searchText.data = ""; searchText.loseFocus(); } </onKeyPress> <onGainFocus> if( searchText.data == "Search" ) { searchText.data = ""; searchText.color = "#000000"; } textFocus.opacity = 255; </onGainFocus> <onLoseFocus> if( searchText.data == "" ) { searchText.data = "Search"; searchText.color = "#bababa"; } textFocus.opacity = 0; </onLoseFocus> </textarea> <textarea data="Palo Alto, CA"> <name>locationText</name> <hOffset>329</hOffset> <vOffset>13</vOffset> <width>85</width> <alignment>left</alignment> <font>Arial</font> <size>12</size> <color>#000000</color> <lines>1</lines> <scrollbar>false</scrollbar><!-- <visible>false</visible>--> <opacity>0</opacity> <onKeyPress> if ( system.event.key.charCodeAt(0) == 9 ) { locationText.rejectKeyPress(); if (preferences.searchPref.value == "Local") { locationText.select( 0, 0 ); searchText.focus(); if ( searchText.data ) searchText.select( 0, -1 ); } } if (system.event.keyString == "Return" || system.event.keyString == "Enter") { locationText.rejectKeyPress(); locationText.loseFocus(); if ( opening ) startEase(); updateNow(); doSearch(searchText.data); } </onKeyPress> <onGainFocus> if( locationText.data == "Location" ) { locationText.data = ""; locationText.color = "#000000"; } locationFocus.opacity = 255; </onGainFocus> <onLoseFocus> if( locationText.data == "" ) { locationText.data = "Location"; locationText.color = "#bababa"; } locationFocus.opacity = 0; </onLoseFocus> </textarea> <image src="Images/growHandle.png"> <name>growHandle</name> <vOffset>21</vOffset> <hOffset>414</hOffset> <opacity>0</opacity> <tracking>rectangle</tracking> <onMouseDown> myOffset = system.event.y; </onMouseDown> <onMouseMove> <![CDATA[ if ( !opening && system.event.vOffset > 100) myNum = (system.event.vOffset - myOffset) - 20; else myNum = (100 - myOffset) - 20; backgroundBase.vOffset = myNum + 20; growHandle.vOffset = myNum + 20; bottomShadow.vOffset = myNum + 17; moreResults.vOffset = myNum + 22; hideResults.vOffset = myNum + 22; backgroundMid.height = myNum - 15; itemList.height = myNum - 15; if ( myNum < 55 ) sb.opacity = 0; else sb.opacity = 255; sb.height = myNum - 25; topShadow.clipRect = "x:0; y:0; width:425; height:" + (myNum - 20); noResults.vOffset = ( itemList.height / 2 ); mainWindow.height = backgroundBase.vOffset + backgroundBase.height; ]]> </onMouseMove> </image> <image src="Images/moreResults.png"> <name>moreResults</name> <hOffset>135</hOffset> <vOffset>22</vOffset> <opacity>0</opacity> </image> <image src="Images/hideResults.png"> <name>hideResults</name> <hOffset>235</hOffset> <vOffset>22</vOffset> <opacity>0</opacity> <onMouseUp> startEase(); </onMouseUp> </image> </window> <action trigger="onLoad"> <![CDATA[ var bumpStamp = null; var lastPosition = null; var collapsedPosition = null; var startStamp = null; var opening = true; var what = ""; var howMany = 20; var url = new URL(); var storedSearchCount = 10; var itemArray = new Array(); var textShadow = new Shadow(); textShadow.hOffset = 0; textShadow.vOffset = 1; textShadow.color = "#ffffff"; textShadow.opacity = 190; var $qv = function(arg){ return new String(arg) } function doSearch(what) { noResults.visible = false; for ( a in itemArray ) { itemArray[a].removeFromSuperview(); } reusedTerm = false; mySearchList = preferences.lastSearchItems.value.split("*a*"); preferences.userLocation.value = locationText.data; for (item in mySearchList) { if ( mySearchList[item] == what ) reusedTerm = true; } if ( !reusedTerm ) { if (mySearchList.length == storedSearchCount) { mySearchList.splice(0,1); } preferences.lastSearchItems.value = mySearchList.join("*a*") + "*a*" + what; } else preferences.lastSearchItems.value = mySearchList.join("*a*"); switch (preferences.searchPref.value) { case "Web": getWebSearch(what); moreResults.onMouseUp = 'openURL("http://search.yahoo.com/search?fr=kon&ei=UTF-8&p=' + escape(what) + '")'; break; case "Images": getImageSearch(what); moreResults.onMouseUp = 'openURL("http://images.search.yahoo.com/search/images?fr=kon&ei=UTF-8&p=' + escape(what) + '")'; break; case "Local": getLocalSearch(what); moreResults.onMouseUp = 'openURL("http://local.yahoo.com/results?stx=' + escape(what) + '&csz=' + escape( locationText.data ) + '&fr=kon&ei=UTF-8")'; break; case "Video": getVideoSearch(what); moreResults.onMouseUp = 'openURL("http://video.search.yahoo.com/search/video?fr=kon&ei=UTF-8&p=' + escape(what) + '")'; break; case "Shopping": getShoppingSearch(what); moreResults.onMouseUp = 'openURL("http://shopping.yahoo.com/search?fr=kon&p=' + escape(what) + '&ei=UTF-8&cop=mss' + escape(what) + '")'; break; case "News": getNewsSearch(what); moreResults.onMouseUp = 'openURL("http://news.search.yahoo.com/search/news?fr=kon&tab=News&ei=UTF-8&p=' + escape(what) + '")'; break; } } function doPropertySwitch ( whichProperty ) { searchText.focus(); if ( whichProperty == "Local" ) { localDivider.visible = true; textFocus.src="Images/localFocus.png"; searchText.width = 120; //locationText.visible = true; locationText.opacity = 255; } else { localDivider.visible = false; textFocus.src="Images/focus.png"; searchText.width = 210; //locationText.visible = false; locationText.opacity = 0; } } function getImageSearch ( what ) { mySearchData = url.fetch("http://api.search.yahoo.com/ImageSearchService/V1/imageSearch?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);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -