Skip to content

An open source chrome extension that takes your code, creates a beautiful image from your code snippet and posts on facebook

License

Notifications You must be signed in to change notification settings

israfil-miya/autoleet

Repository files navigation

AutoLeet

An open source chrome extension that takes your code, creates a beautiful image from your code snippet and posts on facebook

Installation (Debian Linux)

sudo apt-get install -y git 
git clone https://github.com/israfil-miya/autoleet.git
cd autoleet
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
npm install
npm run build

Setup

  • Open Chrome browser (should work in any chromium browser)
  • Go to chrome://extensions
  • Enable the Developer mode toggle
  • Click on Load unpacked
  • Select the downloaded autoleet folder (root)

Configure

Professional Mode:

  • Open /src/script/background.ts file
  • Set the professionalAccount variable as true if you have professional mode enabled for your Facebook account.
  • Default: true

Confirmation Before Posting:

  • Open /src/script/background.ts file
  • Set the requireConfirmationBeforePosting variable as true if you want a confirmation before clicking the post button.
  • Default: true

Waiting Time After Confirmation:

  • Open /src/script/background.ts file
  • Set the wait time in seconds in countdownAfterConfirmationInSeconds variable.
  • You can set the variable to 0 for no waiting.
  • Default: 5

Usage

  • Go to leetcode.com and open any problem step-1

  • Solve the problem and submit your answer step-2

  • Select the part of the code you want to share step-3

  • Right click on the selection and choose Share to social media step-4

  • Fill-up the form in the popup and click the Submit button step-5

    Note: Language, Title & Caption is auto generated but it's editable

Flow

  • The extension opens ray.so, generates the code block image, and downloads it automatically.
  • After download, it opens facebook.com, fills in the caption and image, and posts.

Note

  • Ensure you're logged in to Facebook before using the extension.
  • If you don't get the popup when clicking Share to social media, refresh the page and try again.

About

An open source chrome extension that takes your code, creates a beautiful image from your code snippet and posts on facebook

Topics

Resources

License

Stars

Watchers

Forks