简体   繁体   中英

Jquery Chrome extension help?

I am making a Chrome extensions where you can drag and drop links and it'll bookmark it in the extension. I found this from a stackoverflow thread, it does what I want it to but the only problem is that I want it to make a new element with the link and not replace the old link. Can someone point me to the right direction. I'm stuck.

I modified that fiddle to match your request. Each dropped link now creates a new LI element within a UL. I suggest you read up on the Chrome Bookmark API if you haven't already, and I commented the fiddle to show locations where you would use API functions. If you want to remember which bookmarks the user has created through the extension, you may want to set up localStorage as well to save the ID of the created bookmark.

JSFiddle: http://jsfiddle.net/ArkahnX/jwsdm/5/

LocalStorage: http://www.kirupa.com/html5/html5_local_storage.htm

Chrome Bookmarks API:http://code.google.com/chrome/extensions/bookmarks.html

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