简体   繁体   中英

How to access places.bookmarks from Firefox's Add-on SDK (Jetpack)

I'm making a bookmarks extension for Firefox, I figured out that with Jetpack I can make html UI just like in Google's Chrome.

I need to access Firefox's bookmarks, after looking for a while I notinced that there is no naively supported way to access the bookmarks from jetpack's API so I found a module that enables the use of places.

Jetpack-Modules/places.js

Now, the thing is that I don't know how to make use of this module, so maybe somebody could lead me to the right direction.

thanks in advance.

I did manage to find a file called places.sqlite in my Firefox profile directory. Perhaps sqlite is how you're supposed to access it, absent no naively supported way in Jetpack's API.

Perhaps this is the documentation you're looking for. I tried the searching bookmarks code (with var {Cc, Ci, Cu} = require("chrome"); before the code block and console.log(title+"\\t"+uri); added to the end of the for loop) and it seems to work. JSON.stringify doesn't work on the structures due to the circular logic they contain.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM