Automatically assuming small player if in iframe

This commit is contained in:
Kasper Rynning-Tønnesen
2018-09-22 16:45:44 +02:00
parent 62ae1ee802
commit 0a7ea9f0b2
3 changed files with 15 additions and 3 deletions

View File

@@ -354,6 +354,14 @@ function contextListener(that, event) {
}
}
function inIframe () {
try {
return window.self !== window.top;
} catch (e) {
return true;
}
}
function mouseContext(left, top) {
var moveFunction = function( event ) {
if(event.pageX < left - 60 || event.pageX > left + document.querySelector(".context-menu-root").offsetWidth + 60 ||