How I can add search bar to IE?

120 views Asked by At

I am trying to built a cross platform search extension. I already have one for firefox and its fairly simple to add search provide to search in firefox plugin. But in IE and chrome I don't see search bar so i was wondering if there is amy method in cross rider that create a search bar or add text field.

Any help will be great. Thanks

1

There are 1 answers

0
Shlomo On

The Crossrider framework is designed for rapid development of cross browser extensions, and hence generally provides features that can work in all supported browser. Hence, it's not possible to add a Search Bar to the browser itself.

You could add the text input as you suggested and then use CSS to position it where you want it to appear within the page. However, you cannot use a text input and place it in the toolbar region of a browser. Hence, using a text input you can only approximate a toolbar Search Bar.

So for instance, your text input code in the extension.js file could look like (obviously you will style it as you require):

appAPI.ready(function($) {
    $('<input type="text" id="myInput">')
        .css({
            "position": "fixed",
            "right":5,
            "top": 5
        })
        .appendTo('body');
});

[Disclosure: I am a Crossrider employee]