Discussion I created a script that changes the reaction images

Are you interested?

  • Yes

  • No


Results are only viewable after voting.
UglyBastard

UglyBastard

Kyrie, fons bonitatis
Mar 28, 2023
1,888
There are some bugs that I still need to figure out how to solve. Right now the script only changes the images when you're reacting, if someone else is reacting for some reason the custom image I choose doesn't works.
In the script I can create an object like this:

reactions: { "jfl": "link to the image", "100": "link to the image", "nerd": "link to the image" ... }

The main aim is to put the script into some userscript manager, such as Tampermonkey, greasemonkey etc. These changes only affect the frontend, which means that those who aren't using the userscript can't see your custom reaction, only YOU can see YOUR custom reactions. Yes, it's a bit boring, but I'd rather see some 2d cuties than emotionless emojis.
This way everyone could add the image they wanted instead of the default and boring 100, +1, Nerd, Angry etc.
1695511241762
 
Original

Original

I wanna lock in and i think i’m remembering how
Dec 2, 2020
2,964
unrelated but my life is a nightmare
 
UglyBastard

UglyBastard

Kyrie, fons bonitatis
Mar 28, 2023
1,888
This is not 100% working yet. I'm posting here to see if anyone can help me.
There are some "events" being triggered when you open Notifications bell or when you hover the +1 button to choose a reaction. The HTML for the tags I want to change is only mounted after the event is triggered. I need to track what is the event so I can change the reactions for notifications and for the modal.
Also, can't think of a better code, sorry. This is the best I can do since I'm low IQ:

// ==UserScript== // @name New Userscript // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match https://neets.net/* // @icon https://www.google.com/s2/favicons?sz=64&domain=neets.net // @grant none // ==/UserScript== (function() { 'use strict'; // Your reactions object var reactions = { "JFL": "link_to_image_JFL", "100": "link_to_image_100", "Nerd": "link_to_image_Nerd", "+1": "link_to_image_plus1", "Based": "link_to_image_Based", "Woah": "link_to_image_Woah", "Damn...": "link_to_image_Damn", "...?": "link_to_image_question", "Ugh": "link_to_image_Ugh", "Seriously?": "link_to_image_Seriously" }; function changeModalImages() { var modal = document.querySelector('.your-modal-selector'); if (modal) { for (var title in reactions) { var newSrc = reactions[title]; var selector = 'img[title="' + title + '"]'; var imagesWithCurrentTitle = modal.querySelectorAll(selector); imagesWithCurrentTitle.forEach(function(image) { image.src = newSrc; }); } } } // Listen for the event that triggers the modal document.addEventListener('your-triggering-event', function() { // Call the function to change images inside the modal when the event occurs changeModalImages(); }); } })();
 
Activity
So far there's no one here

Similar threads

MelaninQueen
Replies
4
Views
126
MelaninQueen
MelaninQueen
D
Replies
12
Views
568
uglyboi1
uglyboi1
Neet194012940
Replies
10
Views
402
Neet194012940
Neet194012940
Neet194012940
Replies
37
Views
855
jovan andrade
jovan andrade
Top