Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

marquee3001

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

marquee3001 - npm Package Compare versions

Comparing version 1.0.11 to 1.0.12

68

marquee3k.js

@@ -21,24 +21,24 @@ /**

constructor(element, options) {
this.element = element;
this.selector = options.selector;
this.speed = element.dataset.speed || 0.25;
this.pausable = element.dataset.pausable;
this.reverse = element.dataset.reverse;
this.paused = false;
this.parent = element.parentElement;
this.parentProps = this.parent.getBoundingClientRect();
this.content = element.children[0];
this.innerContent = this.content.innerHTML;
this.wrapStyles = '';
this.offset = 0;
this.element = element;
this.selector = options.selector;
this.speed = element.dataset.speed || 0.25;
this.pausable = element.dataset.pausable;
this.reverse = element.dataset.reverse;
this.paused = false;
this.parent = element.parentElement;
this.parentProps = this.parent.getBoundingClientRect();
this.content = element.children[0];
this.innerContent = this.content.innerHTML;
this.wrapStyles = '';
this.offset = 0;
this._setupWrapper();
this._setupContent();
this._setupEvents();
this._setupWrapper();
this._setupContent();
this._setupEvents();
this.wrapper.appendChild(this.content);
this.element.appendChild(this.wrapper);
this.wrapper.appendChild(this.content);
this.element.appendChild(this.wrapper);
}
_setupWrapper() {
_setupWrapper() {
this.wrapper = document.createElement('div');

@@ -125,4 +125,6 @@ this.wrapper.classList.add('marquee3k__wrapper');

static init(options = { selector: 'marquee3k' }) {
let animationId;
window.cancelAnimationFrame(animationId);
window.removeEventListener('resize', resizeListener);
if (window.MARQUEES_ANIMATIONID) {
window.cancelAnimationFrame(window.MARQUEES_ANIMATIONID);
}
window.MARQUEES = [];

@@ -145,19 +147,21 @@ const marquees = Array.from(document.querySelectorAll(`.${options.selector}`));

}
animationId = window.requestAnimationFrame(animate);
window.MARQUEES_ANIMATIONID = window.requestAnimationFrame(animate);
}
window.addEventListener('resize', () => {
clearTimeout(timer);
function resizeListener() {
clearTimeout(timer);
timer = setTimeout(() => {
const isLarger = previousWidth < window.innerWidth;
const difference = window.innerWidth - previousWidth;
timer = setTimeout(() => {
const isLarger = previousWidth < window.innerWidth;
const difference = window.innerWidth - previousWidth;
for (let i = 0; i < MARQUEES.length; i++) {
MARQUEES[i].repopulate(difference, isLarger);
}
for (let i = 0; i < MARQUEES.length; i++) {
MARQUEES[i].repopulate(difference, isLarger);
}
previousWidth = this.innerWidth;
});
}, 250);
previousWidth = this.innerWidth;
}, 250);
}
window.addEventListener('resize', resizeListener);
}

@@ -164,0 +168,0 @@ }

{
"name": "marquee3001",
"version": "1.0.11",
"version": "1.0.12",
"description": "Internet marquees in HD!",

@@ -5,0 +5,0 @@ "keywords": ["marquee", "marquees"],

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