remove some console.logs
This commit is contained in:
parent
1cd06040da
commit
3423aac49a
@ -225,7 +225,7 @@ export default {
|
|||||||
* to the correct function down the line.
|
* to the correct function down the line.
|
||||||
*/
|
*/
|
||||||
handleMessage(event) {
|
handleMessage(event) {
|
||||||
console.log('[handleMessage] will handle event:', event)
|
if (event.data.action === 'uwui-probe') {
|
||||||
if (event.data.cmd === 'uwui-probe') {
|
if (event.data.cmd === 'uwui-probe') {
|
||||||
if (!this.site) {
|
if (!this.site) {
|
||||||
this.site = event.origin.split('//')[1];
|
this.site = event.origin.split('//')[1];
|
||||||
|
@ -71,7 +71,6 @@ class UI {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.warn('coords:', coords, 'uiURI:', uiURI);
|
|
||||||
|
|
||||||
// ask the iframe to check whether there's a clickable element
|
// ask the iframe to check whether there's a clickable element
|
||||||
iframe.contentWindow.postMessage(
|
iframe.contentWindow.postMessage(
|
||||||
@ -90,7 +89,6 @@ class UI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
rootDiv.appendChild(iframe);
|
rootDiv.appendChild(iframe);
|
||||||
console.log('ui created')
|
|
||||||
|
|
||||||
// subscribe to events coming back to us
|
// subscribe to events coming back to us
|
||||||
window.addEventListener('message', (event) => this.handleMessage(event));
|
window.addEventListener('message', (event) => this.handleMessage(event));
|
||||||
@ -106,14 +104,12 @@ class UI {
|
|||||||
handleMessage(event) {
|
handleMessage(event) {
|
||||||
console.log('[main] received event:', event.origin, this.uiURI, this.extensionBase, event)
|
console.log('[main] received event:', event.origin, this.uiURI, this.extensionBase, event)
|
||||||
if (event.origin === this.extensionBase) {
|
if (event.origin === this.extensionBase) {
|
||||||
console.log('this is the event we want', this.uiIframe );
|
if (event.data.action === 'uwui-clickable') {
|
||||||
if (event.data.cmd === 'uwui-clickable') {
|
if (event.data.cmd === 'uwui-clickable') {
|
||||||
if (event.data.ts < this.lastProbeResponseTs) {
|
if (event.data.ts < this.lastProbeResponseTs) {
|
||||||
console.log('event too early')
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.lastProbeResponseTs = event.data.ts;
|
this.lastProbeResponseTs = event.data.ts;
|
||||||
console.log('---- event is clickable?', event.data.clickable)
|
|
||||||
this.uiIframe.style.pointerEvents = event.data.clickable ? 'auto' : 'none';
|
this.uiIframe.style.pointerEvents = event.data.clickable ? 'auto' : 'none';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user