📜 ⬆️ ⬇️

Habrapoisk + Visual Search in IE8

Strongly welcome you% username%.
I don’t know about you, but I have a “creative impulse” at night, which I usually regret very much in the morning. But let's not talk about the bad, because until it is morning, then I still have time to share one of their manic creations
I heard a lot about the innovations in IE8 ( web fragments , accelerators , visual search ) and somehow I wanted to try to make one of them.

First you need to decide what we are going to do, but to get something interesting, it is desirable to have your own service, and since I don’t have anything interesting right now, then I decided to steal content from a long-suffering habrabra. In the process of a difficult choice, it was decided that I would do a visual search. A more detailed description of which can be found here , well, or here to look with pictures.
Purpose: so that prompts appear in the IE8 search box, as in the search bar on the habrabra website.


But since we do not have a habrahabra base, then we will go another way. We know that once the habrahabr page receives dynamically prompts, it means we can :). We open firefox and we study as it requests data.
')



Now it becomes clear the whole mechanism. Next, it remains to write a few lines in C # to request data from habrabra and generate xml in a format that IE8 understands.

<? xml version ="1.0" ? >
< SearchSuggestion xmlns ="http://schemas.microsoft.com/Search/2008/suggestions" >
< Query > xbox </ Query >
< Section >
< Item >
< Text > Xbox 360 </ Text >
< Description > The official Xbox website from Microsoft </ Description >
< Url > www.xbox.com </ Url >
</ Item >
< Item >
< Text > Xbox cheats </ Text >
< Description > Codes and walkthroughs </ Description >
< Url > www.example.com/xboxcheatcodes.aspx </ Url >
</ Item >
< Item >
< Text > Xbox 360 games </ Text >
< Description > Games and accessories </ Description >
< Url > www.example.com/games </ Url >
</ Item >
</ Section >
</ SearchSuggestion >

Further we describe our provider of visual search:

<? xml version ="1.0" encoding ="UTF-8" ? >
< OpenSearchDescription xmlns ="http://a9.com/-/spec/opensearch/1.1/" >
< ShortName > HabraSearch </ ShortName >
< Image height ="16" width ="16" type ="image/icon" > habrahabr.ru/i/favicon.ico </ Image >
< Url type ="text/html" template ="http://habrahabr.ru/search/?q={searchTerms}" />
< Url type ="application/x-suggestions+xml" template ="http://habrasearch.bushelper.biz/search.ashx?terms={searchTerms}" />
</ OpenSearchDescription >

And fill in the handler with a description to the host , from where its installation is available in IE8.
Actually after installing the provider in IE8, you can see the following:

Where data is taken from habrakhabra and brought to the desired format on our host.

Source: https://habr.com/ru/post/57400/


All Articles