Created
November 13, 2015 18:16
-
-
Save russorat/bfffdb585709609a6a65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*********** | |
* This function applies a set of changes provided. | |
* It utilizes tight loops to take advantage of any | |
* batch processing behind the scenes. | |
***********/ | |
function applyChanges(changes_to_make) { | |
for(var i in changes_to_make.kw_to_delete) { | |
changes_to_make.kw_to_delete[i].remove(); | |
} | |
for(var i in changes_to_make.labels_to_delete) { | |
changes_to_make.labels_to_delete[i].remove(); | |
} | |
for(var i in changes_to_make.labels_to_add) { | |
changes_to_make.labels_to_add[i].kw.applyLabel(changes_to_make.labels_to_add[i].label); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment