Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----------------------- chrome.bookmarks.remove
- this can remove a bookmark (with a given id) or an empty bookmark folder.
- // window.my_url gives url in my bMark_2017 wali ext.
- // you can use a string or simply location.href
- chrome.bookmarks.search({url: window.my_url }, function (btn_arr){
- console.log(btn_arr[0].id, btn_arr);
- chrome.bookmarks.remove(btn_arr[0].id, function(t){
- // Note: t here gives nothing. So, don't use anything. i have kept
- // just to make this sure. t returns 'undefined'.
- console.log(t, "removed bMark with id: ", btn_arr[0].id);
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement