Php 如何在网页加载时自动运行Firefox.xpi扩展

Php 如何在网页加载时自动运行Firefox.xpi扩展,php,firefox-addon,Php,Firefox Addon,您好,我有这个firefox插件,我希望它在用户加载页面时自动弹出并下载。您不能使用javascript将用户重定向到.xpi文件吗 在页面末尾,在标记前,放置以下内容: <script type="text/javascript"> window.location.href = 'path/to/your.xpi'; </script> window.location.href='path/to/your.xpi';

您好,我有这个firefox插件,我希望它在用户加载页面时自动弹出并下载。

您不能使用javascript将用户重定向到
.xpi
文件吗

在页面末尾,在
标记前,放置以下内容:

<script type="text/javascript">
    window.location.href = 'path/to/your.xpi';
</script>

window.location.href='path/to/your.xpi';