8000 Also sync js/impress.js / Forgot to run `node build.js` · JavaScriptExpert/impress.js@784a6d2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 784a6d2

Browse files
author
Henrik Ingo
committed
Also sync js/impress.js / Forgot to run node build.js
1 parent 729651d commit 784a6d2

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

js/impress.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2316,11 +2316,14 @@
23162316
message.style.right = 0;
23172317
message.style.bottom = 0;
23182318
message.style.backgroundColor = 'rgba(255, 255, 255, 0.9)';
2319-
var onClickStr = 'var x = document.getElementById(\'impress-console-button\');' +
2320-
'x.parentNode.removeChild(x);var root = document.getElementById(\'' + rootId + '\');' +
2321-
'impress(\'' + rootId + '\').lib.util.triggerEvent(root, \'impress:console:open\', {})';
2322-
message.innerHTML = '<button style="margin: 25vh 25vw;width:50vw;height:50vh;" ' +
2323-
'onclick="' + onClickStr + '">' +
2319+
var clickStr = 'var x = document.getElementById(\'impress-console-button\');' +
2320+
'x.parentNode.removeChild(x);' +
2321+
'var r = document.getElementById(\'' + rootId + '\');' +
2322+
'impress(\'' + rootId +
2323+
'\').lib.util.triggerEvent(r, \'impress:console:open\', {})';
2324+
var styleStr = 'margin: 25vh 25vw;width:50vw;height:50vh;';
2325+
message.innerHTML = '<button style="' + styleStr + '" ' +
2326+
'onclick="' + clickStr + '">' +
23242327
lang.clickToOpen +
23252328
'</button>';
23262329
document.body.appendChild( message );
@@ -2962,12 +2965,13 @@
29622965
// check if event target (or any of its parents is a link)
29632966
var target = event.target;
29642967
try {
2968+
29652969
// For example, when clicking on the button to launch speaker console, the button
29662970
// is immediately deleted from the DOM. In this case target is a DOM element when
29672971
// we get it, but turns out to be null if you try to actually do anything with it.
2968-
target.id;
2972+
var foo = target.id; // jshint ignore:line
29692973
}
2970-
catch(err) {
2974+
catch ( err ) {
29712975
return;
29722976
}
29732977

@@ -2995,9 +2999,9 @@
2995 762E 2999
gc.addEventListener( document, "click", function( event ) {
29963000
var target = event.target;
29973001
try {
2998-
target.id;
3002+
var foo = target.id; // jshint ignore:line
29993003
}
3000-
catch(err) {
3004+
catch ( err ) {
30013005
return;
30023006
}
30033007

0 commit comments

Comments
 (0)
0