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)
The MySQL built-in date function TIMESTAMPDIFF ca...
HTML: Title Heading is defined by tags such as &l...
CSS image splicing technology 1. Image stitching ...
This article describes how to use MySQL to export...
After setting the table width in the page to width...
One of the most commonly used and discussed data ...
After installing MySQL using ports, I found that ...
1. ip_hash: ip_hash uses a source address hash al...
brew install nginx Apple Mac uses brew to install...
I searched for many ways to change it online but ...
1. Previous versions yum remove docker docker-cli...
The shutdown.bat file has a sentence if not "...
WeChat Mini Program - QR Code Generator Download:...
MySQL 5.7.18 installation and problem summary. I ...
1. Oracle is a large database while MySQL is a sm...