IE8 provides a good experience: Activities

IE8 provides a good experience: Activities

Today I had a sneak peek at IE8 beta 1 (hereafter referred to as IE8). IE8 provides a lot of great experiences, so I won’t go into detail here. I’ll just talk about the Activities in it and come up with something. There is an item in Activities that when the user selects a piece of text, an arrow tool will immediately appear. This tool can be expanded. When expanded, there are rich services inside, such as Baidu search (need to add a search engine), map search, translation, etc. I should also do something for the users, haha, of course. By analogy, I decided to do music services. Just think about it, how nice it would be if you could select a piece of text, click “Listen to the song now” and hear it immediately. So, without further ado, I started drawing the UI interface and writing code.
I just found a random picture and modified it using Photoshop. That's it, it's better to keep it simple.
Add to the API page:
<a href="#" title="" onclick="window.external.AddService('../service.xml');">Add mood music to listen to music instantly in IE8</a>
Also upload an XML (service.xml) file, the contents of the file are as follows;

Click the "Add Mood Music to IE8" link, and the following dialog box will appear;

Click: "Add Provider";

Added success prompt;

Test: Select butterfly on the web page, and the music listening interface will appear immediately; you’re done! Haha, happy! ! !
XML core code:
<?xml version="1.0" encoding="UTF-8"?>
<os:openServiceDescription xmlns:os="http://www.microsoft.com/schemas/openservicedescription
/1.0">
<os:homepageUrl>http://www.***.cn/</os:homepageUrl>
<os:display>
<os:name>Listen to music instantly</os:name>
<os:icon>http://www.nihaoku.cn/favicon.ico</os:icon>
<os:description>Select a song title to hear the song immediately. </os:description>
</os:display>
<os:activity category="Discover">
<os:activityAction context="selection">
<os:preview type="text" accept-charset="utf-8" action="http://www.***.cn/ff/ie8.htm#{selection}" method="get" />
<os:execute type="text" accept-charset="utf-8" action="http://www.***.cn/?{selection}" method="get" />
</os:activityAction>
</os:activity>
</os:openServiceDescription>

Detailed explanation :
The key to the code is that <osreview /> is the action executed when the mouse hovers over the menu item, using the get method (method="get") to send the selected {selection} text of type (type="text") to the address (action) in UTF-8 encoding (accept-charset="utf-8");
<os:execute /> This line is the action executed when the menu item is clicked, and the properties are the same as above.
I am just throwing out some ideas here, hoping that everyone can come up with better services. Microsoft IE8 itself provides services such as word search, translation, and map search. I believe that IE8 will be even more exciting in the future.

<<:  Detailed explanation of loop usage in javascript examples

>>:  Detailed graphic description of MySql8.023 installation process (first installation)

Recommend

Interpretation of 17 advertising effectiveness measures

1. 85% of ads go unread <br />Interpretatio...

Tutorial on installing MYSQL8.X on Centos

MySQL installation (4, 5, 6 can be omitted) State...

Analysis of the HTML writing style and reasons of experienced people

1. Navigation: Unordered List vs. Other Label Ele...

Example of how to change the domestic source in Ubuntu 18.04

Ubuntu's own source is from China, so the dow...

Detailed explanation and examples of database account password encryption

Detailed explanation and examples of database acc...

Scoring rules of YSlow, a webpage scoring plugin developed by Yahoo

YSlow is a page scoring plug-in developed by Yaho...

How to allow remote connection in MySql

How to allow remote connection in MySql To achiev...

Design theory: the basics of font design

<br />Words are the inevitable product of hu...

Detailed explanation of the solution to Ubuntu dual system stuck when starting

Solution to Ubuntu dual system stuck when startin...

Mysql optimization tool (recommended)

Preface While browsing GitHub today, I found this...

Detailed steps to use Arthas in a Docker container

What can Arthas do for you? Arthas is Alibaba'...

Javascript uses the integrity attribute for security verification

Table of contents 1. Import files using script ta...

Detailed tutorial on installing nacos in docker and configuring the database

Environment Preparation Docker environment MySQL ...