创建一个Internet Explorer插件 [英] Create an internet-explorer plugin

查看:85
本文介绍了创建一个Internet Explorer插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很难在网上找到有关如何为IE创建插件的资源(6和7).您是否碰巧知道有关此主题的好的网站/教程?

I'm having troubles finding resources on the net on how to create a plugin for IE (6 & 7). Do you happen to know good sites/tutorials on this subject?

顺便说一句,这就是为什么我要这样做:我们这里有一个与另一个应用程序链接的网络应用程序;即,当您在某个页面上时,您可以启动书签页(带有javascript的书签)来解析该页面并将数据发送到第二个Web应用程序.在过去的两年中,这种方法一直运行良好.

BTW, here's why I want to do this: we have a web app here that's linked with another; i.e. when on a certain page, you could launch a bookmarklet (bookmark with javascript) that would parse the page and send data to the 2nd web app. This has worked fine for the last 2 years.

现在他们要更新应用程序,而书签小册用于检索的信息现在分布在2页上.

Now they want to update the application, and the information the bookmarklet used to retrieve are now spread on 2 pages.

因此,我打算让插件查找已加载的每个url,如果它适合给定的模式,则解析页面并存储数据.如果第二个页面已加载(再次为URL模式),则在该页面上显示一个按钮,该按钮将使用检索到的数据启动另一个Web应用程序.

So I intend the plugin to look for each url that is loaded, and if it fits a given pattern, then parse the page and store the data. If the second page is loaded (url pattern again), then make a button appear on the page that would launch the other web app with the retrieved data.

您看到这个有什么问题吗? (加分点:2个页面之一包含框架)

Do you see any problem with this? (bonus points: one of the 2 pages contains frames)

推荐答案

Here is the sample of Browser Helper Object doing something similar. May be in your case the event will be DISPID_DOWNLOADBEGIN (as you want to catch any URI accessed, not only the ones entered by user).

请记住,防病毒软件不喜欢这样的插件,因为troyan程序经常使用类似的方式来记录用户的浏览历史记录.最好考虑通过AJAX进行此操作.

Keep in mind that antivirus software doesn't like plugins like this because troyan programs often use similar way to record user's browsing history. May be a good idea is to consider doing this via AJAX.

这篇关于创建一个Internet Explorer插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆