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

MySQL calculates the number of days, months, and years between two dates

The MySQL built-in date function TIMESTAMPDIFF ca...

HTML basic summary recommendation (title)

HTML: Title Heading is defined by tags such as &l...

Detailed explanation of CSS image splicing technology (sprite image)

CSS image splicing technology 1. Image stitching ...

Analysis of MySQL's method of exporting to Excel

This article describes how to use MySQL to export...

Set the width of the table to be fixed so that it does not change with the text

After setting the table width in the page to width...

How to implement a binary search tree using JavaScript

One of the most commonly used and discussed data ...

What is the file mysql-bin.000001 in mysql? Can it be deleted?

After installing MySQL using ports, I found that ...

Detailed steps to install nginx on Apple M1 chip and deploy vue project

brew install nginx Apple Mac uses brew to install...

Detailed explanation of Vue save automatic formatting line break

I searched for many ways to change it online but ...

Detailed tutorial on installing Docker on CentOS 8

1. Previous versions yum remove docker docker-cli...

WeChat Mini Program QR Code Generation Tool weapp-qrcode Detailed Explanation

WeChat Mini Program - QR Code Generator Download:...

MySQL 5.7.18 installation tutorial and problem summary

MySQL 5.7.18 installation and problem summary. I ...

Briefly describe the difference between MySQL and Oracle

1. Oracle is a large database while MySQL is a sm...