Fix lint errors

This commit is contained in:
Henrik Ingo
2018-01-01 15:27:33 +02:00
parent e92e02ccb4
commit 729651dd5d
3 changed files with 15 additions and 11 deletions

View File

@@ -2965,7 +2965,7 @@
// For example, when clicking on the button to launch speaker console, the button // For example, when clicking on the button to launch speaker console, the button
// is immediately deleted from the DOM. In this case target is a DOM element when // is immediately deleted from the DOM. In this case target is a DOM element when
// we get it, but turns out to be null if you try to actually do anything with it. // we get it, but turns out to be null if you try to actually do anything with it.
foo = target.id; target.id;
} }
catch(err) { catch(err) {
return; return;
@@ -2995,7 +2995,7 @@
gc.addEventListener( document, "click", function( event ) { gc.addEventListener( document, "click", function( event ) {
var target = event.target; var target = event.target;
try { try {
foo = target.id; target.id;
} }
catch(err) { catch(err) {
return; return;

View File

@@ -387,11 +387,14 @@
message.style.right = 0; message.style.right = 0;
message.style.bottom = 0; message.style.bottom = 0;
message.style.backgroundColor = 'rgba(255, 255, 255, 0.9)'; message.style.backgroundColor = 'rgba(255, 255, 255, 0.9)';
var onClickStr = 'var x = document.getElementById(\'impress-console-button\');' + var clickStr = 'var x = document.getElementById(\'impress-console-button\');' +
'x.parentNode.removeChild(x);var root = document.getElementById(\'' + rootId + '\');' + 'x.parentNode.removeChild(x);' +
'impress(\'' + rootId + '\').lib.util.triggerEvent(root, \'impress:console:open\', {})'; 'var r = document.getElementById(\'' + rootId + '\');' +
message.innerHTML = '<button style="margin: 25vh 25vw;width:50vw;height:50vh;" ' + 'impress(\'' + rootId +
'onclick="' + onClickStr + '">' + '\').lib.util.triggerEvent(r, \'impress:console:open\', {})';
var styleStr = 'margin: 25vh 25vw;width:50vw;height:50vh;';
message.innerHTML = '<button style="' + styleStr + '" ' +
'onclick="' + clickStr + '">' +
lang.clickToOpen + lang.clickToOpen +
'</button>'; '</button>';
document.body.appendChild( message ); document.body.appendChild( message );

View File

@@ -125,10 +125,11 @@
// check if event target (or any of its parents is a link) // check if event target (or any of its parents is a link)
var target = event.target; var target = event.target;
try { try {
// For example, when clicking on the button to launch speaker console, the button // For example, when clicking on the button to launch speaker console, the button
// is immediately deleted from the DOM. In this case target is a DOM element when // is immediately deleted from the DOM. In this case target is a DOM element when
// we get it, but turns out to be null if you try to actually do anything with it. // we get it, but turns out to be null if you try to actually do anything with it.
foo = target.id; var foo = target.id; // jshint ignore:line
} }
catch ( err ) { catch ( err ) {
return; return;
@@ -158,7 +159,7 @@
gc.addEventListener( document, "click", function( event ) { gc.addEventListener( document, "click", function( event ) {
var target = event.target; var target = event.target;
try { try {
foo = target.id; var foo = target.id; // jshint ignore:line
} }
catch ( err ) { catch ( err ) {
return; return;