Skip to content

Instantly share code, notes, and snippets.

@Hans5958
Last active November 4, 2020 10:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hans5958/cca411858ca600958778bcdbcaca6df3 to your computer and use it in GitHub Desktop.
Save Hans5958/cca411858ca600958778bcdbcaca6df3 to your computer and use it in GitHub Desktop.
Clean/remove all empty sticky notes created on Note.ly with this simple JS script
// var notes = [] // https://gist.github.com/Hans5958/4155e60254f19b5f04cbda0f20133aef
emptyNotes = []
window.notes.forEach(note => {
if (note.content === "") {
emptyNotes.push(note.dbId)
} else {
console.log(note.dbId, note.content)
}
})
emptyNotes.forEach(db_id => {
$.ajax({
type : "POST",
url: "submit.php",
data: {action: "delete_note", db_id},
success: function(res) {
console.log(`Successfully removed ${db_id}!`)
}
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment