Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
⏰ A lightweight and performant flip styled countdown clock.
Version: 0.2.0 [JS: 5.66KB, CSS: 4.44KB]
Example live at: https://pbutcher.uk/flipdown/
Remix FlipDown on CodePen: https://codepen.io/PButcher/pen/dzvMzZ
For basic usage, FlipDown takes a unix timestamp (in seconds) as an argument.
new FlipDown(1538137672).start();
Include the CSS and JS in <head>
and include the following line in your HTML.
<div id="flipdown" class="flipdown"></div>
See a full example here.
To use multiple instances of FlipDown on the same page, specify a DOM element ID as the second argument in FlipDown's constructor:
new FlipDown(1538137672, 'signup').start();
new FlipDown(1538137672, 'register').start();
<div id="signup" class="flipdown"></div>
<div id="register" class="flipdown"></div>
FlipDown comes with 2 themes as standard:
To change the theme, you can supply the theme
property in the opt
object in the constructor with the theme name as a string:
{
theme: 'light'
}
For example, to instantiate FlipDown using the light theme instead:
new FlipDown(1538137672, {
theme = 'light'
}).start();
Custom themes can be added by adding a new stylesheet using the FlipDown theme template.
FlipDown themes must have the class name prefix of: .flipdown__theme-
followed by the name of your theme. For example, the standard theme class names are:
.flipdown__theme-dark
.flipdown__theme-light
You can then load your theme by specifying the theme
property in the opt
object of the constructor (see Themes).
FlipDown.prototype.constructor(uts, [el], [opts])
Create a new FlipDown instance.
uts
Type: number
The unix timestamp to count down to (in seconds).
[el]
Optional
Type: string (default: flipdown
)
The DOM element ID to attach this FlipDown instance to. Defaults to flipdown
.
[opts]
Optional
Type: object (default: {}
)
Optionally specify additional configuration settings. Currently supported settings include:
FlipDown.prototype.start()
Start the countdown.
FlipDown.prototype.isEnded(callback)
Call a function once the countdown has ended.
callback
Type: function
Function to execute once the countdown has ended.
var flipdown = new FlipDown(1538137672)
// Start the countdown
.start()
// Do something when the countdown ends
.ifEnded(() => {
console.log('The countdown has ended!');
});
Thanks to @chuckbergeron for his help with making FlipDown responsive.
FAQs
A lightweight and performant flip styled countdown clock
The npm package flipdown receives a total of 933 weekly downloads. As such, flipdown popularity was classified as not popular.
We found that flipdown demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.