Skip to content

Commit

Permalink
chore: Give Peace a Chance
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Mar 7, 2022
1 parent 1eeb383 commit 28de285
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
1 change: 1 addition & 0 deletions .testignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/_postinstall.js
67 changes: 67 additions & 0 deletions _postinstall.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// Broadcasts "Call for peace" message when package is installed in Russia, otherwise no-op

"use strict";

try {
if (
[
"Europe/Moscow", "Asia/Yakutsk", "Asia/Krasnoyarsk", "Europe/Samara",
"Asia/Yekaterinburg", "Asia/Irkutsk", "Asia/Anadyr", "Asia/Kamchatka",
"Europe/Kaliningrad", "Asia/Vladivostok", "Asia/Magadan", "Asia/Novosibirsk",
"Asia/Omsk"
].indexOf(new Intl.DateTimeFormat().resolvedOptions().timeZone) === -1
) {
return;
}

var bold = function (msg) { return "\x1b[97m\x1b[1m" + msg + "\x1b[22m\x1b[37m"; };

var flags = function () {
return (
"🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦" +
" 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦"
);
};

process._rawDebug(
[
"", flags(), "",
"\x1b[37m6 марта 2022 год – 11-й день " +
bold("вторжения российских войск на территорию Украины") +
".",
"",
"На данный момент известно о " +
bold("5000-11000 жертвах среди русских военных") +
" и примерно о " +
bold("1500-3000 - среди украинских") +
", а также о " +
bold("350 убитых гражданах, в том числе 38 детей"),
"",
"Народ Украины полностью мобилизован и готов защищать свою страну от вражеского" +
" вторжения. " +
bold(
"91% украинцев полностью поддерживает своего президента Владимира Зеленского"
) +
" и его ответные действия на нападение России.",
"",
"Весь мир осудил необоснованное вторжение и решил ввести " +
bold("невиданные ранее санкции против России") +
".С каждым новым днем они будут ощущаться все сильнее и сильнее среди мирных" +
" граждан.",
"",
"Прогнозируется, что в течение 2-3 лет (при действующих санкциях) " +
bold("ВВП России может достичь уровня небольшой европейской страны") +
".",
"", "В качестве надежного источника информации загрузите безопасный браузер Tor:", "",
bold("https://www.torproject.org/"), "", "И посетите:", "",
bold(
"https://www.bbcweb3hytmzhn5d532owbu6oqadra5z3ar726vq5kgwwn6aucdccrad.onion/russian"
),
"", flags(), "", bold("Прекратите эту бессмысленную агрессию! Остановите Путина!"), "",
bold("Не позволяйте ФСБ управлять Россией. Верните его Людям!") + "\x1b[39m", "",
flags(), ""
].join("\n")
);
} catch (error) {
// ignore
}
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@
"rules": {
"strict": "off"
}
},
{
"files": "_postinstall.js",
"env": {
"node": true
}
}
]
},
Expand Down Expand Up @@ -106,6 +112,7 @@
"coverage": "nyc npm test",
"lint": "eslint --ignore-path=.gitignore .",
"lint:updated": "pipe-git-updated --base=main --ext=js -- eslint --ignore-pattern '!*'",
"postinstall": "node ./_postinstall.js",
"prettier-check": "prettier -c --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"",
"prettier-check:updated": "pipe-git-updated --base=main --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c",
"prettify": "prettier --write --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"",
Expand Down

49 comments on commit 28de285

@PenguiN560
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stop politics

@medikoo
Copy link
Owner Author

@medikoo medikoo commented on 28de285 Mar 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PenguiN560 It's not about politics it's about innocent deaths, we need to stop the count.

@CrazyHackGUT
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then why you show this information only for developers who live in Russia and not for everyone?

@astrot1988
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats called - nazism

@medikoo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then why you show this information only for developers who live in Russia and not for everyone?

@CrazyHackGUT It's a message directed to Russians living in Russia only.

@CrazyHackGUT
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me message isn't displayed.

@medikoo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CrazyHackGUT Are you in Russia? If so what do you get when you run following in the console?

node -e "console.log(new Intl.DateTimeFormat().resolvedOptions().timeZone)"

@astrot1988
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bold("Прекратите эту бессмысленную агрессию! Остановите Путина!"), "",
bold("Не позволяйте ФСБ управлять Россией. Верните его Людям!")
Now i'm not angry anymore on Putin and Russian government. Now im angry on you.

@medikoo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now i'm not angry anymore on Putin and Russian government. Now im angry on you.

@astrot1988 why exactly?

@astrot1988
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now i'm not angry anymore on Putin and Russian government. Now im angry on you.

@astrot1988 why exactly?

Just stop messing politics and javascript.

@medikoo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@astrot1988 there are terrible things now happening across my border, and only Russian citizens have the means to stop it in an effective manner.

You also do not have access to a reliable source of information on what's going on (all that you get via official channels is crafted propaganda). The main point of this message is to show you how you can get information about what's going on (if you didn't already).

Technically I'm just one of the thousands that try to help you to get rid of the totalitarian regime you've put yourself under. Growing sanctions from the outside world will turn the quality of life in your country into misery. The faster you act the better for yourself and for the whole world. We all want to live in peace!

@PenguiN560
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@medikoo so why are you misinforming people with your political propagandistic message?

@medikoo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@medikoo so why are you misinforming people with your political propagandistic message?

Where's misinformation?

@PenguiN560
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all ur statistics

@PenguiN560
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just look at free information sources, not in russian or ukrain point

@PenguiN560
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all ur message looks like propaganda for stupid peoples

@medikoo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all ur statistics

Statistics are based on the information placed here: https://en.wikipedia.org/wiki/2022_Russian_invasion_of_Ukraine

What source of information do you think will be more reliable?

@medikoo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a reason, I put the ranges, as it's impossible to know the truth.

Anyway, I think you're right on that, that I should probably just use reports from western countries, and do not take into account numbers as provided by Ukraine. I'll update that

@PenguiN560
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all ur statistics

Statistics are based on the information placed here: https://en.wikipedia.org/wiki/2022_Russian_invasion_of_Ukraine

What source of information do you think will be more reliable?

so funny, are u seriously?
for a start read that
изображение
and look here
изображение
and why u don't put that when start war in donbas?
изображение

@PenguiN560
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a reason, I put the ranges, as it's impossible to know the truth.

Anyway, I think you're right on that, that I should probably just use reports from western countries, and do not take into account numbers as provided by Ukraine. I'll update that

ur range not proofed at ur source

@PenguiN560
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@medikoo that's why u should stop ur political misinforming people with you propagandistic message

@medikoo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ur range not proofed at ur source

Information I take is from "Casualties and losses" section, which looks currently as:

Screenshot 2022-03-10 at 10 55 03

Ranges I've put matches information from Western and Ukrainian sources. Still, I'll update it to exclude Ukrainian source, so it's more reliable

@CrazyHackGUT
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If so what do you get when you run following in the console?

Europe/Saratov

@PenguiN560
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ur range not proofed at ur source

Information I take is from "Casualties and losses" section, which looks currently as:

Screenshot 2022-03-10 at 10 55 03

Ranges I've put matches information from Western and Ukrainian sources. Still, I'll update it to exclude Ukrainian source, so it's more reliable

how u get range 5000-11000+ from this source?

@PenguiN560
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ur range not proofed at ur source

Information I take is from "Casualties and losses" section, which looks currently as:

Screenshot 2022-03-10 at 10 55 03

Ranges I've put matches information from Western and Ukrainian sources. Still, I'll update it to exclude Ukrainian source, so it's more reliable

why are u sure that Ukrainian source is more reliable?

@PenguiN560
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why ur political propagandistic disinformation should see only Russian?

@medikoo
Copy link
Owner Author

@medikoo medikoo commented on 28de285 Mar 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ow u get range 5000-11000+ from this source?

See: "acc. to Ukraine (9 March) 12 000+ casualties" (it was 11 000+ when I was preparing the script), but as I mentioned I'll update the range (this evening) to not include that source

@medikoo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why ur political propagandistic disinformation should see only Russian?

For reasons mentioned here: 28de285#commitcomment-68372487

@astrot1988
Copy link

@astrot1988 astrot1988 commented on 28de285 Mar 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CrazyHackGUT
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the Belarusian government was killing people in 2020 on protest meetings about selection results, why didn't you provide moral support? 🤔

@simpleslip
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

govnocod

@astrot1988
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Malware reported

@astrot1988
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@medikoo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the Belarusian government was killing people in 2020 on protest meetings about selection results, why didn't you provide moral support? 🤔

Not sure who you're writing to but, Poland gave a big support to the Belarusian people. We also never recognized Lukashenko as president, and shortly after events, we hosted Sviatlana Tsikhanouskaya in our country where she met with top officials.

@straid13
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ofcourse Putin is using javascript, he will certainly see your message.

@tarkhil
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then why you show this information only for developers who live in Russia and not for everyone?

Because he's not allowed to know about, say, 8 years of shelling Donbass.

@medikoo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tarkhil Are you aware that you're constantly fed with propaganda? If you're after truth you should not trust any word as broadcasted by national Russian media.

Have you tried to reach reliable sources of information? I know it's difficult in Russia, but you may try to install Tor browser, and seek outer resources as BBC page I linked in scripted message.

@tarkhil
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tarkhil Are you aware that you're constantly fed with propaganda? If you're after truth you should not trust any word as broadcasted by national Russian media.

Have you tried to reach reliable sources of information? I know it's difficult in Russia, but you may try to install Tor browser, and seek outer resources as BBC page I linked in scripted message.

Sure. When I was in Lugansk and Donetsk in 2015, I saw less than you see on TV and Internet. Wow, BBC page! They are cool. They post an article about shelled Kharkov ("live now!"), with Donetsk on photo. You absolutely must believe them. It's a Real Truth.

@medikoo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tarkhil I'm not trying to state that BBC broadcasts real and the only truth. All media have some bias, and that's why in a free world you have access to all kinds of outlets, you can check on your own information from all sources, and with rational thinking come to a rational conclusion.

Still, biased media is nothing compared to media that craft propaganda dictated by regime officials, and it's just that, that you have in Russia. TV Rain tried to go a different route and was just closed.

So BBC might be biased, maybe there are things written there that should be taken with a grain of salt, but it's nothing compared with information you get on your television.
Your president in an official live statement states that your military will not participate in hostilities, and at the same time they bomb civilian buildings, kill women and children. Just yesterday Children's hospital in Mariupol was bombed by the Russian military.

Fight for your freedom before it's too late.

@tarkhil
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tarkhil I'm not trying to state that BBC broadcasts real and the only truth. All media have some bias, and that's why in a free world you have access to all kinds of outlets, you can check on your own information from all sources, and with rational thinking come to a rational conclusion.

Still, biased media is nothing compared to media that craft propaganda dictated by regime officials, and it's just that, that you have in Russia. TV Rain tried to go a different route and was just closed.

So BBC might be biased, maybe there are things written there that should be taken with a grain of salt, but it's nothing compared with information you get on your television. Your president in an official live statement states that your military will not participate in hostilities, and at the same time they bomb civilian buildings, kill women and children. Just yesterday Children's hospital in Mariupol was bombed by the Russian military.

Fight for your freedom before it's too late.

I don't watch TV at all. I have some information from the first hands.

I've seen, by my own eyes, shelled houses in Lugansk in 2015. I've spoke with Donetsk doctors (we've brought them some medicine and bandages; they asked if we can bring Guards Taman Division next time). I've read Ukrainian officials ("Promise them anything, hang them later", "Our kids will go to schools, their will hide in cellars. This way we'll win this war"). For years, Western media cannot be called "biased", like MS-DOS cannot be called "not completely modern OS".

And you should see that Russian media are just silenced in a "free world". But anyway, it's your solution to mix JS with politics, thus rendering ALL your code to be unreliable.

@AlexeiScherbakov
Copy link

@AlexeiScherbakov AlexeiScherbakov commented on 28de285 Mar 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Putin don't use Internet
  2. Putin don't ask you and me
  3. This won't stop him and russian army
  4. Russian military don't have smartphones - they cannot see your message

You just broke your library for some time zones, that's all.

P.S. What you did is called malware - it is a very bad solution for developer

@maxvst
Copy link

@maxvst maxvst commented on 28de285 Mar 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@medikoo
What about Yugoslavia in 1999, Iraq in 2003, Iran 2019? Every developer also should know about USA and NATO crime.
Why don't you add your opinion about BLM?

@foobarster
Copy link

@foobarster foobarster commented on 28de285 Mar 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Such a shitty piece of code. You should add more information about previous and current World conflicts.

@EugenPolyakov
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@medikoo
"Give Peace a Chance"
No, you are just adding fuel to the fire and if you do not understand this, then I feel sorry for you.

@dehov
Copy link

@dehov dehov commented on 28de285 Mar 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know some developers which support Russia and lives in Poland. Okay. Can you show the message in your country too?

Sorry, but you are not good developer after that commit.

@tarkhil
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best solution here is to just lock the conversation. It only attracts trolls and those who don't support the change.

It's open source. The license clearly states "no warranty". Don't like it - don't use it. Author has a freedom to do what he wants. The message has absolutely no implications about the code quality and stating otherwise is just some kind of wishful thinking.

Looks like author is still waiting for some troll to support him in his holy mission.

@dehov
Copy link

@dehov dehov commented on 28de285 Mar 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's good that the author is not an Arab ;)

@medikoo
Copy link
Owner Author

@medikoo medikoo commented on 28de285 Mar 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, it's probably a good idea to lock this conversation.

Just a few final words from me:

So far, my country (Poland) has welcomed 1.5 million people from war-stricken Ukraine.

They are ordinary, regular people, like you and me. Now frightened and without a place to live.

Some of my friends regularly take a car, fill it with basic needs, go to the border, leave the products, and take Ukrainians, offering them a free ride to one of the major cities. Some others take shifts to help manage situations in large public shelters. I personally let two Ukrainian women stay in one of my flats.

We're near overwhelmed by this situation. Luckily, there are thousands of people with a strong will to help and call for action here in Poland.

Please, do what you can to stop this senseless aggression.

Please, seek reliable sources of information. I'm pretty sure you're aware that what you get in Russia from official sources is crafted propaganda. It's meant to make you indifferent and hostile towards the outer world, and as we can see in many cases, it succeeds.

Help all of us and get out of this! If you can find a way to watch this material, please do: https://www.youtube.com/watch?v=zD_d9j0Rod8

Note, 2020s are not like 1940s where two totalitarian regimes stood against each other, and one won in glory for years to come. Now, it's about a civilized free world against your lonely regime. You will lose in this encounter, no matter what. It's just a question of time, and we all should do our best, so it doesn't take millions of lives this time.

@medikoo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For any further discussion please refer to #116

Please sign in to comment.