Created
December 7, 2009 05:19
-
-
Save andyed/250639 to your computer and use it in GitHub Desktop.
Jetpack for Site Search of Current Tab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
@author: Andy Edmonds | |
@url: http://www.twitter.com/andyed | |
@email:[email protected] | |
@title: Bing Site Searcher | |
@description: Loads Bing site search of current site into slidebar. | |
@version: 0.2 | |
*/ | |
jetpack.future.import("slideBar") | |
jetpack.slideBar.append({ | |
onReady: function (slide) { | |
function onTabFocused(tab) { | |
$(".frame", slide.contentDocument).attr("src", "http://www.google.com/m?dc=mgcgo&source=mobileproducts&q=site%3A" + jetpack.tabs.focused.url); | |
} | |
// Initialize | |
onTabFocused(jetpack.tabs.focused); | |
jetpack.tabs.onFocus(function () onTabFocused(this)); | |
}, | |
html: '<iframe class="frame" height="99%" width="100%" border="no" style="border:none;padding:0;margin:0;background-color:#fff;" src="http://www.google.com/search?q=site%3A"></frame>', | |
icon: "http://m.bing.com/favicon.ico", | |
width: 300, | |
persist: true | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment