nhtua
7/19/2015 - 3:56 PM

Make your diigo bookmarks private

Make your diigo bookmarks private

//Run in console (press F12, click `Console` tab, paste and press Enter to run)
//NOTE: 
// Scroll to end of page, choose 100 items/page. 
// Run once for every page. 
// After done; change page by your-self then run code again. (press Up Arrow to get pre-code)

var items = document.querySelectorAll(".editIcon");
var i = 0;
items[i].click();
var tBrowser = setInterval(function(){
  console.log("Private item: "+i);
    if ( i+1 <= items.length){
    items[i].click();
    
    var checkBookmark = document.querySelector("#bPriPrivate");
    var checkNote = document.querySelector("#newItemPrivate");
    if (checkBookmark !== null)
      checkBookmark.checked = "checked";
    if (checkNote !== null)
      checkNote.checked = "checked";
    
    var bmS = document.querySelector("#wSubmit");
    var bmN = document.querySelector(".btn.blue.submit");
    if (bmS !== null) 
      bmS.click();
    if (bmN !== null)
      bmN.click();
  } else {
    clearInterval(tBrowser);
    alert("Done")
  }
  i++;
},1000)