reformatting, update prompt message
This commit is contained in:
parent
3f2e6c348a
commit
cd0e09169d
1 changed files with 9 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
|||
window.addEventListener('message', function(event) {
|
||||
if(event.origin != 'null' && event.data) {
|
||||
if (event.origin != 'null' && event.data) {
|
||||
var data = JSON.parse(event.data);
|
||||
if(data.event == 'close') {
|
||||
if (data.event == 'close') {
|
||||
var e = document.getElementById(data.id);
|
||||
Array.prototype.forEach.call(e.parentElement.getElementsByClassName('button'), function(e) {
|
||||
e.style.display = 'block';
|
||||
|
@ -67,15 +67,17 @@ function getVideoOverlay(page) {
|
|||
img.onclick = function(event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
if(!videoOverlay[page]) {
|
||||
if (!videoOverlay[page]) {
|
||||
videoOverlay[page] = {}
|
||||
}
|
||||
if(! videoOverlay[page][id]) {
|
||||
videoOverlay[page][id] = '';
|
||||
if (!videoOverlay[page][id]) {
|
||||
videoOverlay[page][id] = '';
|
||||
}
|
||||
console.log('EDIT');
|
||||
var message = 'Please enter a pan.do/ra video URL, like\nhttp://pad.ma/A/editor/00:00:00,00:01:00,00:02:00';
|
||||
var url = prompt(message, videoOverlay[page][id]);
|
||||
var message = 'Please enter a pan.do/ra video URL, like\n'
|
||||
+ 'http://pad.ma/A/editor/00:00:00,00:01:00,00:02:00'
|
||||
+ (videoOverlay[page][id] ? '\n\nTo remove the video, just remove the URL.' : ''),
|
||||
url = prompt(message, videoOverlay[page][id]);
|
||||
if (url !== null) {
|
||||
videoOverlay[page][id] = url;
|
||||
saveVideoOverlay();
|
||||
|
|
Loading…
Reference in a new issue