Check whether the Alexa toolbar is installed

Source: Internet
Author: User

To identify this problem, you can only use the webpage script and then send the value to the server when the user logs on.
After the Alexa toolbar is installed, AlxTB1.dll and AlxRes are generated in the system directory. dll files. alxRes. dll files contain a large amount of HTML and JavaScript code. They exist in AlxRes as resources. in the dll file, you can use res: // AlxRes. dll/CHTML/about.html to access these resources. Open the DLL in the editor and you can see all the scripts. We create an HTML page and insert a <script> between <Script language = "javascript" src = "res: // AlxRes. dll/SCRIPT/dsn. class. js"> </script>
Dsn. class. js is one of the script resources in AlxRes. dll. Now we can find a function in this resource as long as it can run. I find a simple one:
Function aborted ()
{
Return;
}
This method is relatively simple and is not prone to errors. This is easy to handle. You need to determine whether the alexa toolbar is installed on the user end and write a script:

<Script language = "javascript" src = "res: // AlxRes. dll/SCRIPT/dsn. class. js"> </script>
<Script language = "javascript">
Function doTryAlexa ()
{
Try
{
Aborted ();
Return 1;
}
Catch (e)
{
Return 0;
}
}
</Script>

... Let's test it below:

<Input type = "button" value = "tryAlexa" onclick = "alert (doTryAlexa ()">
If the installation is complete, prompt 1. If the installation is not complete, prompt 2.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.