0

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

user588324
  • 310
  • 1
  • 6
  • 19
  • Look in the comments on the question I said this is a duplicate of. There's a comment that points to [this blog post](http://www.add-in-express.com/programming-internet-explorer/developing-addons.php), which [tells you how to do it](http://www.add-in-express.com/programming-internet-explorer/developing-addons.php#toolbar). – David Aug 29 '13 at 19:22
  • I looked and I also asked the same question on crossrider blog about adding search bar or adding text field and make it work like search bar. I tried but to add text field to `extension.js` file `appAPI.ready(function($) { $('').appendTo('body'); });` but not able to see text field next to the address bar. – user588324 Aug 29 '13 at 19:25

1 Answers1

1

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]

Shlomo
  • 3,763
  • 11
  • 16