Coder Social home page Coder Social logo

yeahtwitter's Introduction

Yeah! for Twitter

Extension that adds a "Yeah!" button to Twitter. Essentially, it's a public Like button. It doesn't send spammy images into replies, instead it saves your Yeahs into a shared database. Everyone can see who Yeahed a tweet, and what tweets person Yeahed.
This extension supports both new Twitter and OldTwitter!
Screenshot

Installation

Chrome, Edge, Opera, Brave, Vivaldi, etc:
Chrome Web Store

Firefox, Waterfox, LibreWolf, Floorp, etc:
Firefox Add-ons

Userscript (Tampermonkey, Greasemonkey, Violentmonkey, etc):

Manual Installation

  1. Go to Releases page.
  2. Download chrome.zip if you're on Chromium based browsers (Chrome, Edge, Opera, Brave, etc.) or firefox.zip if you're on Firefox.

Chromium

  • Unpack file anywhere
  • Go to chrome://extensions
  • Turn on Developer mode
  • Press "Load unpacked" and select folder with extension

Firefox

  • Go to about:debugging#/runtime/this-firefox
  • Press "Load Temporary Add-on" and select zip file you downloaded
  • Installing it this way will remove extension after browser restart, see below for permanent installation

Firefox Developer Edition / Nightly

  • Go to about:config
  • Set xpinstall.signatures.required to false
  • Go to about:addons
  • Press "Install Add-on From File" and select zip file you downloaded

API

If you wish to implement Yeah! button in your Twitter mod, you can use this API.
Base URL: https://yeah.dimden.dev
All requests use POST method.
All requests require Content-Type: application/json.

Request Token - /api/request_token

Returns { public_token: String, private_token: String }.
You need to make user tweet yeah-xxxxxxxx where xxxxxxxx is public token.

Verify Token - /api/verify_token

Requires body: { public_token: String, private_token: String, tweet: Tweet }.
Tweet is object of this format. Must also include user object inside with id_str.
Will reply with success if everything went correctly. After that you can save private_token somewhere to use in other requests.

Get Yeah data for tweets - /api/get

Requires body: { post_ids: String, key: private_token }.
post_ids is string of tweet IDs separated by comma. Max 100 tweets per request.
Will return [ { post_id: String, count: Number, yeahed: Boolean }, ... ].

Yeah a tweet - /api/yeah

Requires body: { post_id: String, key: private_token }.
Will reply with done if everything went fine.

Unyeah a tweet - /api/unyeah

Requires body: { post_id: String, key: private_token }.
Will reply with done if everything went fine.

Get users that Yeahed a tweet - /api/get_users

Requires body: { post_id: String, key: private_token, page: Number }.
page starts with 1.
Will return an array with user ids.

Get tweets that user Yeahed - /api/get_yeahs

Requires body: { user_id: String, key: private_token, page: Number }.
page starts with 1.
Will return an array with tweet ids.

Get how many tweets user Yeahed - /api/get_user_yeah_count

Requires body: { user_id: String, key: private_token }.
Will return { count: Number }.

yeahtwitter's People

Contributors

dimdengd avatar suwacrab avatar 2chanhaeng avatar acrazytown avatar pukacyi avatar snazzah avatar helloyanis 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.