npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

nuxt-block-russia-belarus

v1.0.1

Published

Block Russian and Belarusian users during the Ukrainian invasion

Downloads

13

Readme

Module to Block Russian and Belarusian users during the Ukrainian Invasion

#TechForUkraine

This nuxt module is a wrapper of OB42's Russia Blocker..

✍🏻 Motivation

Companies, NGOs, and individuals around the world have condemned the violence against the Ukranian people. One way they are doing this is blocking services to Russian users while the Ukranian invasion is ongoing. This Nuxt.js module makes it simple to block users from Russia and Belarus from your site, such as your Vue Storefront store. We identify users from these countries using fingerprints from their web browser. You can configure this module to redirect users to the Ukranian National Anthem on YouTube, to a Russian government complaint form, or soft-block users by presenting an alert window over your website with a custom message. Users can choose to only block/alert these users once per day or on every visit using a cookie. Users can selectively disable this behavior for users from Belarus if they choose, however by default users from Belarus are also detected.

🧱 Install

You must add nuxt-block-russia-belarus dependency using yarn or npm to your project

$ npm install nuxt-block-russia-belarus --save

or

$ yarn add nuxt-block-russia-belarus

⚙️ Config

You have to add nuxt-block-russia-belarus to the modules section of nuxt.config.js

// nuxt.config.js
{
  ...,
  modules: [
    'nuxt-block-russia-belarus'
  ],
  ...,
}

▶️ Usage

Next, you need to add the <russia-blocker> tag in the body tag of your page.

By default this will redirect users from Russia and Belarus to the Ukranian National Anthem on YouTube. You can choose the other options by adding the following component properties to your configuration:

Example:

<!-- view.html -->
<russia-blocker
  blockBelarus: True
  redirectToUkrainianAnthem: True
  :redirectToRussianGovernmentComplaints="false"
  :displayAlert="false"
  :oncePerDay="false"
  customMessage: "протестуйте против войны!"
></russia-blocker>

The above custom message translates to "Protest the war!"- if it does not please open an issue and let me know!

Component props:

| prop | type | description | ---- | ---- | ----------- | blockBelarus | Boolean | Optional. Block users from Belarus, which has participated in the invasion. This is True by default. | redirectToUkrainianAnthem | Boolean | Optional Redirect blocked users to a video of the Ukranian National Anthem on YouTube. This is the default behavior. | redirectToRussianGovernmentComplaints | Boolean | Optional Redirect users to a complaint form on the Russian government's website. If you set this to True, you should set redirectToUkrainianAnthem to False. | displayAlert | Boolean | Optional. Soft block users by displaying a popup alert that they can dismiss. This alert box can contain a custom message, but default says "Protest the war" in Russian. | oncePerDay | Boolean | Optional. Set a cookie to only block users once per day. This is false by default. | customMessage | String | Optional. This lets you set a custom message for the alert box that appears. By default this is set to "Protest the war" in Russian.

How does this module work❓

Module (when app starts)

  1. The module loads RussianBlocker.js from a CDN.
  2. The module is loaded and a Vue component called russia-blocker is made available.

russia-blocker component

  1. The component checks properties set by the user
  2. The component checks the time zone and language set in the user's browser
  3. If the user is in Russia or Belarus (optional) the blocking behavior the component is configured for is applied.