New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

webdriver-image-comparison

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webdriver-image-comparison - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1

12

build/clientSideScripts/hideScrollbars.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function hideScrollBars(hide) {
if (hide) {
document.body.style.overflow = 'hidden';
try {
if (hide) {
document.body.style.overflow = 'hidden';
}
else {
document.body.style.overflow = '';
}
}
else {
document.body.style.overflow = '';
catch (e) {
}

@@ -10,0 +14,0 @@ }

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function scrollToPosition(yPosition) {
var initialScroll = document.documentElement.scrollTop;
var largestNode;
window.scrollTo(0, yPosition);
if (initialScroll === document.documentElement.scrollTop && yPosition > 0) {
largestFirstNode(document.documentElement.childNodes).scrollTo(0, yPosition);
}
function largestFirstNode(nodesList) {
var node;
for (var i = nodesList.length - 1; i >= 0; i--) {
node = nodesList[i];
if (largestNode) {
break;
}
if (node.scrollHeight && node.clientHeight) {
var viewPortHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
var elHeight = Math.max(node.scrollHeight, node.clientHeight);
if (elHeight > viewPortHeight) {
largestNode = node;
break;
}
}
if (node.childNodes.length) {
largestFirstNode(node.childNodes);
}
}
return (document.body === largestNode || !largestNode) ? window : largestNode;
}
(document.scrollingElement || document.documentElement).scrollTop = yPosition;
}
exports.default = scrollToPosition;
//# sourceMappingURL=scrollToPosition.js.map
{
"name": "webdriver-image-comparison",
"version": "0.8.0",
"version": "0.8.1",
"description": "An image compare module that can be used for different NodeJS Test automation frameworks that support the webdriver protocol",

@@ -40,10 +40,10 @@ "main": "./build/index.js",

"@types/fs-extra": "^5.1.0",
"@types/jest": "^24.0.15",
"@types/node": "^10.14.13",
"@types/jest": "^24.0.18",
"@types/node": "^10.14.15",
"awesome-typescript-loader": "^5.2.1",
"coveralls": "^3.0.5",
"coveralls": "^3.0.6",
"husky": "^1.3.1",
"jest": "^24.8.0",
"jest": "^24.9.0",
"np": "^5.0.3",
"rimraf": "^2.6.3",
"rimraf": "^2.7.1",
"source-map-loader": "^0.2.4",

@@ -50,0 +50,0 @@ "ts-jest": "^23.10.5",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc