doutui2016 2014-04-16 20:48
浏览 21

使用JS或PHP在Firefox中启用检测扩展

Is there anyway that we can find out the extensions that are enabled and disabled in firefox using Javascript or PHP script?

I need to alert a message if the extension is enabled.

Thanks in advance.

  • 写回答

2条回答 默认 最新

  • duanmeng3573 2014-04-16 21:02
    关注

    This depends on the extension.

    Some extensions actually modify the html/dom of your page so you can easily identify them.

    like InFormEnter: This extension creates img elements which you can identify using jquery:

    if ($("img.ife_marker").length > 0) alert("InformEnter installed!");
    

    But only a few do this, and you can only guess the behaviour (or fork the extension to add something like this).

    IF you have an extension that has such a behaviour (you can create a test-page and use firebug to search the dom tree for added/changed elements) then you could write some javascript (like the example above) and use JSON to send the information back to your server.

    Some extensions might react to requests you send out (like modify headers) - then you can create an ajax request with a know header and check this.

    The only reason I could theoretically think of when this makes any sense would be in a closed office environment where you want to check for specific addons that have to be installed in order for your app to work. In that case I would actually create a fork of the extension and make it append such a marker to the page.

    Edit: since you mention yslow: No yslow does not do ANYTHING to the page. It actually only takes information already available within firefox and analyzes the page based on that. It does not even create any extra http requests which you could theoretically pick up on.

    评论

报告相同问题?

悬赏问题

  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么