@zoand
2015-07-01T22:41:31.000000Z
字数 1087
阅读 1544
chrome插件
"permissions": [
"bookmarks"
]
chrome.bookmarks.create({
parentId: '1',
index: 0,
title: 'Google',
url: 'http://www.google.com/'
}, function(bookmark){
console.log(bookmark);
});
chrome.bookmarks.move('16', {
parentId:'7',
index:4
}, function(bookmark){
console.log(bookmark);
});
chrome.bookmarks.remove('16', function(){
console.log('Bookmark 16 has been removed.');
});
chrome.bookmarks.removeTree('6', function(){
console.log('Bookmark group 6 has been removed.');
});
chrome.bookmarks.getTree(function(bookmarkArray){
console.log(bookmarkArray);
});
chrome.bookmarks.getChildren('0', function(bookmarkArray){
console.log(bookmarkArray);
});
chrome.bookmarks.getSubTree('0', function(bookmarkArray){
console.log(bookmarkArray);
});
chrome.bookmarks.get(['16', '17'], function(bookmarkArray){
console.log(bookmarkArray);
});
chrome.bookmarks.getRecent(5, function(bookmarkArray){
console.log(bookmarkArray);
});
chrome.bookmarks.search('google', function(bookmarkArray){
console.log(bookmarkArray);
});