only show edit button on close if editable
This commit is contained in:
parent
d3e68f5ba0
commit
d40f66978a
1 changed files with 5 additions and 3 deletions
|
@ -2,9 +2,11 @@ window.addEventListener('message', function(event) {
|
|||
if (event.origin != 'null' && event.data) {
|
||||
var data = JSON.parse(event.data);
|
||||
if (data.event == 'close') {
|
||||
var e = document.getElementById(data.id);
|
||||
Array.prototype.forEach.call(e.parentElement.getElementsByClassName('button'), function(e) {
|
||||
e.style.display = 'block';
|
||||
var element = document.getElementById(data.id);
|
||||
Array.prototype.forEach.call(element.parentElement.getElementsByClassName('button'), function(element) {
|
||||
if (editable || element.className = 'button playButton') {
|
||||
element.style.display = 'block';
|
||||
}
|
||||
});
|
||||
e.parentElement.removeChild(e);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue