Git Product home page Git Product logo

run-it-when-i-m-dead's Introduction

☠ Run It When I'm Dead

Automatically code execution when you're dead.


(gif by @faedryn)

Install

npm i runitwhenimdead --save

Why?

I don't know, just for fun. Enjoy it! 🤘

How it works?

As you know, Facebook adds a 'Remembering' tag on the profiles of the users who have passed away (when their families or friends request so). Basically, the code is fetching the profile page in a specified interval and looking for the 'Remembering' tag. Obviously, it won't work if Facebook changes the structure of DOM elements. Keep that in mind and contribute. I'm using puppeteer library for fetching and DOM operations.

Usage

  1. npm install - Install the all dependencies.
  2. Paste the public Facebook profile URL into 'profileURL'.
  3. npm start - Start demo app.

Push Notification via chatbots

If you want to send push notifications via Messenger or Telegram, enable the integrated BotDelive configuration and follow these steps:

  1. Create an account.
  2. Create an app on the dashboard to get appId and secretKey credentials.
  3. Add appId, secretKey, userId and message:
let init = new riwimd({
    profileURL: "<FACEBOOK_PUBLIC_PROFILE_URL>",
    timer: 1000,
    appId: "<BotDelive_APP_ID>",
    secretKey: "<BotDelive_SECRET_KEY>",
    userId: "<BotDelive_USER_ID>",
    message: "<PUSH_MESSAGE>"
});

Complete documentation available at: https://botdelive.com/docs

Example

const riwimd = require('runitwhenimdead');

// Initialization
let init = new riwimd({
    profileURL: "<FACEBOOK_PUBLIC_PROFILE_URL>", // public facebook profile url
    timer: 1000, // scan interval in ms

    // SEND PUSH NOTIFICATION VIA MESSENGER, TELEGRAM WHEN YOU'RE DEAD
    // SIGN UP AT https://botdelive.com

    // appId: "<BotDelive_APP_ID>",
    // secretKey: "<BotDelive_SECRET_KEY>",
    // userId: "<BotDelive_USER_ID>",
    // message: "<PUSH_MESSAGE>"
});

// Start scanner
init.Start();

// Listen 'watch' event
init.on('watch', (data) => {
   console.log(data)
});

run-it-when-i-m-dead's People

Contributors

rufat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.