问题标签 [firefox-addon-sdk]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
firefox - Mozilla Addon-SDK 的存储选项
我是 Addon-SDK 的新手。我正在制作一个插件,我在其中记录了一些用于稍后手动查看的信息。我遇到了 Simple-Storage API,但据我所知,它以某种格式在内部保存信息,只能通过函数调用访问,即“ss.storage.variable_name”。
我想知道是否可以从 Windows 目录结构中以某种方式访问此信息,即可能从配置文件目录中的某个文件中访问。
其次,有什么方法可以访问 SQlite 数据库或任何第三方 API?
(我不知道为什么,但是这个 API 的 cfx 测试给了我错误,所以不能使用它)。
firefox - 事件监听器知道页面何时被书签/下载
有什么方法可以跟踪某个页面何时在 Firefox 中被添加书签或下载?我的意思是在添加书签或下载页面时会触发任何事件吗?我正在使用 Add-on SDK 来开发 Add-on。
如果没有,那么请建议我一些解决方法。
firefox-addon - 在 Page-Mod 中使用远程内容脚本文件/Javascript
有没有办法通过page-mod API轻松地将远程 javascript 文件用作内容脚本?
我正在尝试构建一些简单的插件供我自己使用,以自动化一些重复的东西。因为我要修改的页面会不时更改,并且我需要相应地更新“内容脚本”javascript,所以如果我只需要在我的服务器上编辑它并且插件/扩展将再次工作就好了无需编辑和重新打包 xpi。我很确定我可以一起破解一些东西来实现这一点,但是如果有任何简单的方法可以做到这一点,我会全力以赴:)
firefox-addon - Unique Identifier for each Addon user
So far I have been just playing around with the Addon SDK and making tools for my own use.
I had in mind the idea to possibly try to do something like one of those extensions that adds a profile theme to your Facebook profile, as well as letting others with the extension see your theme when they visit your Facebook profile.
I'm just kind of thinking out what I may do, and what I was wondering is - I know the addon will have a unique ID, but is there anything inherent I can use to identify each unique Addon user? I.e. to tie them to the stored data with their theme information?
If anyone has experience with this - how did you approach it?
Maybe I could set a cookie as the Addon that lasts a year or something, and then keep resetting it each time the browser is opened, and hope for the best?
firefox - 发现 Firefox 插件不兼容
我有一个为我们的工作场所开发的自定义插件(使用插件 SDK),它最初是为 FF4 开发的。
当 FF5 出来时,我所要做的就是重建 XPI。FF6 能够使用相同的 XPI。
现在我正试图让它在 FF7 中运行,但它不起作用。我在尝试安装时收到“此插件与 Firefox 7 不兼容”。
我已经阅读了这篇博文: http ://blog.mozilla.com/addons/2011/07/19/firefox-7-compat-looking-to-8/ 据我所知,这些变化都不会影响我的添加在。
同时运行此验证测试 https://addons.mozilla.org/en-US/developers/addon/validate 不会产生错误或警告。
关于如何找出是什么让 FF7 认为它不兼容的任何线索?
firefox - Using XPCOM components from Mozilla Add-on SDK
I have worked on Mozilla Add-on Development in the past (beginner level). But on encountering XPCOM, I got really scared and left it in the middle.
Recently only I encountered Add-on SDK and found it to be really cool, and it was really fascinating to see that the work that took months before was not more than 2 days work with the SDK. Now again I am stuck on the XPCOM module.
Now I really want to exploit the power of XPCOM but it will take me at least a week to get familiar with XPCOM in the context of SDK. What code do I need to obtain the functionality that I desire?
For each user session, I want to log something. I am able to differentiate sessions. What I want now is the code to create a file in the user's machine, open it from the add-on and write something onto it.
Code to access the bookmarks and downloads and to read them.
It would really be a heart-breaking moment if I would have to switch back from SDK.
javascript - 使用 window.location.href 更改 URL 后如何知道 DOM 何时再次准备就绪
我正在使用附加 SDK 编写一个 Firefox 扩展,并且我成功地从内容脚本扫描了一个站点,现在想更深入。但是,当我更改网址时
我无法访问新的 DOM。警报会在站点被完全读取之前出现。我试过$(document).ready(function()
了,但似乎这只有效一次......
我怎样才能等到站点完全构建?
jquery - 如何使用附加构建器为 firefox-extension-developlment 添加 jquery 插件
我正在编写一个 firefox 扩展并想解决这个问题:如何知道 iFrame 的 DOM 在更改其内容后何时再次准备就绪? 我发现 这个插件可能会解决我的问题。但我不知道如何在我的 add-builder 中添加它。
我的问题在这里:
jquery.js 的路径对于每个用户都不同,因为它位于 firefox 上下文中,例如:
C:\Users\myname\AppData\Roaming\Mozilla\Firefox\Profiles\im0woiy2.default\flightdeck\resources\jid0-rxgsbnpfxdmtfgdq504rka9xktm-at-jetpack-privatsphaere_tool-data\jquery-1.6.4.js
那么如何添加这个插件呢?
firefox - 如何在 Firefox Addon SDK 中中止 HTTP 请求
Firefox Addon SDK 中的Request
对象似乎没有提供abort
功能:
https ://addons.mozilla.org/en-US/developers/docs/sdk/1.1/packages/addon-kit/docs/request.html
我错过了中止 HTTP 请求的方法还是必须修改
packages\addon-kit\lib\request.js
firefox-addon - Firefox 扩展观察响应
我正在尝试使用代码
但是行console.log(data);
没有在控制台日志中打印任何东西。为什么 ?