Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var stack = [];
- var lastState = document.getElementById('drop_zone_content');
- stack.push(lastState);
- var observer = new MutationObserver(function(div) {
- if(current_hash != old_hash){
- var newState = document.getElementById('drop_zone_content');
- stack.push(newState);
- old_hash = current_hash;
- }
- });
- function undo(){
- document.getElementById('drop_zone_content').remove();
- lastState = stack.pop();
- var returnBack = document.getElementById('uploadFiles');
- returnBack.insertBefore(lastState, null);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement