DEV Community

Cover image for How to stop complaining and improve a web service yourself without developer help
Sergo
Sergo

Posted on

How to stop complaining and improve a web service yourself without developer help

Hi! My name is Sergo Medin, and I am the Team Lead of Sales Analytics at Avito Real Estate, one of the world's largest classified ad platforms. You may be familiar with the situation when you want to add a new feature to an external web service, but obstacles arise: a complex request process and heavy developer workload.

Sometimes a new feature is needed right now, and there is simply no time to wait. In such cases, there is a great solution—create your own script that will significantly simplify working with any web service. I'm not a developer, but I have basic programming knowledge in JavaScript, which is enough to write such scripts in just a few hours. In this article, I will explain in detail how to do this and provide a step-by-step guide.

Why you don’t always need to wait for developers

The classic approach to development is valuable because new features are well thought out, optimized, and thoroughly tested. This helps create stable and maintainable solutions. However, the main drawback of this approach is that it takes a lot of time. Moreover, development requires deep knowledge and skills, making it inaccessible to most employees.

For me, local improvements that can be made independently are a way to simplify routine tasks. Yes, for fundamental changes, you still need developers' help, but small, useful improvements can be implemented quickly and with minimal costs. Such solutions can save time and effort and increase work efficiency since you no longer have to wait for the much-needed updates.

This approach is used at Amazon

The company encourages employees to solve problems with web services on their own.

The logic is simple: writing a script and sharing it with colleagues is much faster and easier than trying to initiate large-scale changes to an IT product. Yes, this might be a temporary and "crutch" solution (we'll discuss the risks and limitations below), but it requires minimal time and allows you to get the desired result quickly.

How to Improve a Web Service Using the Example of a Recruitment Automation Service

My team is constantly expanding, so I often interact with HR specialists and participate in the hiring process. To automate and speed up this process, Avito recruiters use the Huntflow service. However, during work, they noticed that it was necessary to add several features to speed up the process and eliminate routine tasks.

Since such changes are implemented strictly according to the service's development plan, it can take time. Therefore, to help our recruiters, we decided not to wait for the implementation of changes on Huntflow's side but to quickly create the necessary features using JavaScript scripts for TamperMonkey. This allowed us to significantly reduce the time spent on routine tasks and provided recruiters with a convenient and flexible tool for work.

Let's look at a couple of problems HR specialists face as an example:

Problem #1: Manually exporting information from Huntflow to an Excel file.
To compile a table with candidate information, recruiters need to manually copy data such as email, phone number, full name, Telegram nickname, job title, and other information from Huntflow. This process is repeated for dozens, sometimes hundreds, of candidates—manually filling out an Excel file can take hours. At the same time, standard data exports from Huntflow do not allow exporting everything needed.

Solution: I wrote a script that automatically navigates from one candidate to another, collects the necessary information, and creates an Excel file at the end. This frees up HR specialists' time for more important tasks instead of performing routine work.

Important Note: This solution cannot be called fundamental.
Yes, Huntflow has an API that allows you to implement automatic data export, but it requires more time and resources. In situations where a quick solution is needed, TamperMonkey scripts are the perfect option, as writing them takes only 1-2 hours.

If a higher-quality solution is needed, then you can initiate processes to improve web services by developers, while already having a temporary solution based on scripts. This way, we immediately gain time and can calmly wait for a full-fledged update.

Problem #2: Processing responses takes a lot of time because candidates often apply for several positions.
Suppose a person responded to a sales position at Avito Auto and a similar one at Avito Real Estate. The Huntflow interface is designed so that the HR specialist needs to manually click through each job for this candidate and set a status, for example, "candidate transferred to another job." These routine actions take time, especially if the company has many vacancies, each with dozens of applicants.

Solution: I wrote a script that creates several additional buttons. They can be selected depending on the goal, for example, to continue working with the candidate or not. The HR specialist presses one button, and the script literally sets the required statuses for each candidate in just a few seconds. This greatly speeds up the work.

HR specialists were very pleased with this solution. Here is what they say:

Previously, we manually exported candidates to a table because there was no automatic export of contacts (Telegram, LinkedIn). With the new button, the task is solved much faster and requires minimal involvement. When our team needed to invite 200 candidates to an event and fill in a table with their contacts, we thought it would take a lot of time. But it happened that on the same day we got a script, which we immediately tested, and the export took just a few minutes.

Anastasia Bashkirova, Senior Recruiter at Avito

Thanks to the script, we now quickly process responses, can instantly transfer a candidate to work, or reject a resume in one click.
The coolest thing is that the automation of routine tasks is now in our hands—and we have plenty of ideas for further improvements!

Emilia Ashanina, Researcher at Avito

How we organized script distribution

We placed them in a special GitHub repository, and all Avito managers can copy the scripts from there. If the script is updated on GitHub, it automatically reaches HR specialists through the TamperMonkey update system.

How to Do It Yourself (Without Technical Details)

The idea is simple: write or find a suitable JavaScript script and run it in your browser. The script will modify the loaded page and add everything you need to it. Here's how to do it:

1.Install a Browser Extension: You need an extension that allows you to create, edit, and run scripts. There are several options, but I use the free Tampermonkey extension. It works with Chrome, Microsoft Edge, Safari, Opera Next, and Firefox.

👉 Download and Install Tampermonkey

2.Browser Restrictions: Your browser might block running JavaScript by default to prevent malicious code from executing. Therefore, only use code from trusted sources and grant the extension the necessary permissions to run JavaScript.

3.Add the Required Script to the Extension: An important note: writing code yourself is not mandatory. You can find something suitable in an open library. For example, there are many useful scripts on the Greasy Fork website. It's one of the largest resources for finding scripts, offering a vast collection of vetted community-created scripts. You can find almost anything, from ad blockers to enhancements for various websites.

📂 Explore My Repository for Huntflow Scripts

4.Install Scripts in a Few Clicks: If you use Huntflow and already have the Tampermonkey extension installed, just follow one of the links below:

You can view the source code and, if desired, install the script by clicking the appropriate button:

Example of Installing a TamperMonkey Script

Test the Scripts in Huntflow: Once installed, you can try using the scripts in Huntflow (if you have access to this service, of course).

If you decide to write the script yourself, here's how the code works. I'll use an example of a script that adds a button to the page and collects data from candidate profiles, exporting them to Excel:
1.Script Metadata: At the top of the code, the script's metadata is defined—this part is usually straightforward and doesn't need much explanation.
2.Finding the Right Place on the Page: The next part of the code searches for the spot on the page where our new element (e.g., a button) will be added. In this example, we are looking for a container on the page where the button for exporting data will be placed.

This is done using the document.querySelector method, which allows you to find HTML elements by a specified CSS selector.

var buttonContainer = document.querySelector('div.search--qvPi4.item--R7wgx');
Enter fullscreen mode Exit fullscreen mode

You can find the right container on your page using your browser's developer tools.

3.Next, the code describes adding a new element to the page: once we find the right container, a new div element is created, inside which a button with the text "to Excel" will be placed. This button is then added to the container found in the previous step.

var newButton = document.createElement('div');
newButton.className = 'item--OBfF8';
newButton.innerHTML = '<a><span style="padding: 5px; border: 1px solid #ccc; border-radius: 3px; cursor: pointer;">to Excel</span></a>';
Enter fullscreen mode Exit fullscreen mode

4.Next, the code responds to user interaction with the new element: here, we add a click event handler to the button. When the user clicks the button, the data collection process starts. In this example, all elements on the page containing candidate data are searched, and the data loading process begins.

newButton.querySelector('a').addEventListener('click', async function() {
    console.log('HF_SE: Button clicked');
    var applicantRootElements = document.querySelectorAll('div[data-qa="applicant_root"]');
    // Logic for processing the found elements and exporting data
    // ...
});
Enter fullscreen mode Exit fullscreen mode

5.The script is completed by the code responsible for collecting, processing, and saving data: once the data is loaded, it is processed and saved in Excel format. Using the xlsx library, the script creates a new Excel file and writes all the collected data into it.

function generateExcel(data) {
    var ws = XLSX.utils.json_to_sheet(data);
    var wb = XLSX.utils.book_new();
    XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
    XLSX.writeFile(wb, "data.xlsx");
    console.log('HF_SE: Excel file generated');
}
Enter fullscreen mode Exit fullscreen mode

Disadvantages of TamperMonkey Scripts

Despite all the advantages of using TamperMonkey scripts, it is important to consider the following limitations:
1.Scalability and Maintenance Challenges: For your script to work for other users, they all need to install the TamperMonkey extension and manually add the script.
2.Dependency on Web Page Design: Scripts interact with specific elements on the web page. If developers change the structure or appearance of the site, the script may stop working. This requires regular monitoring and updating of scripts in case of site changes.

Conclusion

TamperMonkey scripts are a powerful tool for automating tasks in the browser. They can significantly simplify working with web services by adding the necessary features or automating routine actions without waiting for updates to the services themselves. However, you should also consider the drawbacks, such as the need to adapt scripts in case of changes to the target web pages.

At Avito, we actively use such scripts to quickly solve tasks that employees face. This allows us to respond quickly to requests and launch temporary solutions while more large-scale improvements are in progress.
Especially when it comes to improvements to external services like Huntflow. This approach allows us to effectively achieve results. Try it, experiment, and share your experiences in the comments!

P.S. If you are interested in exchanging experiences, gaining new knowledge in analytics, preparing for interviews, and building a great career—I look forward to seeing you at personal meetings. I act as a mentor for specialists of different levels: from juniors to team leads. You can find me on LinkedIn, and I will be glad to connect with you!

Top comments (2)

Collapse
 
__f17b24246c profile image
Apollinaria • Edited

Inspiring article! I decided to try TamperMonkey in practice—and I’ve already made my life easier by automating a couple of routine tasks in Jira. I added a script that automatically assigns the required tags when creating tasks, so I no longer have to waste time filling them in manually. It used to be frustrating, but now it works on its own! I’m so glad I can solve these small issues without long approvals from developers. Thanks for the motivation!

Collapse
 
sergome profile image
Sergo

Glad it was helpful! Give it a try and share your impressions)