app.quickreviewer.com Open in urlscan Pro
54.157.225.81  Public Scan

Submitted URL: http://app.quickreviewer.com/proof/webproof/qrv2.js?r=906889414&ver=6.1.1
Effective URL: https://app.quickreviewer.com/proof/webproof/qrv2.js?r=906889414&ver=6.1.1
Submission: On March 06 via manual from US — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

var qrtragetwindow = null;
var interval;

window.addEventListener('load', function () {
	interval = setInterval(function () {
		if (qrtragetwindow) {
			window.parent.postMessage({
				'message': 'loaded',
				'l': window.location.href,
				'h': document.body.scrollHeight,
				'w': document.body.scrollWidth,
				't': document.title
			}, qrtragetwindow);
			addotherlisteners(qrtragetwindow);
			clearInterval(interval);
		}
	}, 1000)
})

window.addEventListener('keyup', function (e) {
	if (qrtragetwindow) {
		window.parent.postMessage({
			'message': 'keyup',
			't': e.target.tagName,
			'c': e.target.className,
			'k': e.keyCode,
			's': e.shiftKey,
			'c': e.ctrlKey
		}, qrtragetwindow);
	}
})

function addotherlisteners(qrtragetwindow) {
	window.addEventListener('scroll', function (e) {
		window.parent.postMessage({
			'message': 'scrolled',
			't': document.documentElement.scrollTop,
			'l': document.documentElement.scrollLeft,
			'h': document.documentElement.scrollHeight
		}, qrtragetwindow)
	});
}

window.addEventListener('message', function (e) {
	var request = event.data['message'];
	if(!request) return;
	if (request.action == 'ping') {
		window.parent.postMessage({
			'message': 'pong',
		}, qrtragetwindow);

	} else if (request.action == 'changeUrl') {
		window.document.location.replace(request.value);

	} else if (request.action == 'scrollTop') {
		window.scrollTo({
			top: request.value.top,
			left: request.value.left,
			behavior: 'smooth'
		});
		window.parent.postMessage({
			'message': 'scrolled',
			't': document.documentElement.scrollTop || document.body.scrollTop,
			'l': document.documentElement.scrollLeft || document.body.scrollLeft,
			'h': document.documentElement.scrollHeight
		}, qrtragetwindow)

	} else if (request.action == 'getFrameGeometry') {
		window.parent.postMessage({
			'message': request.action,
			'w': document.body.scrollWidth,
			'h': document.body.scrollHeight,
		}, qrtragetwindow)
	} else if (request.action == 'targetWindow') {
		qrtragetwindow = request.value;
	}
}, false);