Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var stack = [];
  2. var lastState = document.getElementById('drop_zone_content');
  3. stack.push(lastState);
  4. var observer = new MutationObserver(function(div) {
  5.  
  6. if(current_hash != old_hash){
  7.  
  8. var newState = document.getElementById('drop_zone_content');
  9. stack.push(newState);
  10. old_hash = current_hash;
  11.  
  12. }
  13. });
  14.  
  15. function undo(){
  16.  
  17. document.getElementById('drop_zone_content').remove();
  18. lastState = stack.pop();
  19. var returnBack = document.getElementById('uploadFiles');
  20. returnBack.insertBefore(lastState, null);
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement