Skip to content
View in the app

A better way to browse. Learn more.

GAMELIFE România

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How too Use Auto-Invite Script

  • Administrators

For this script to work, you need any browser that allows developer console to be used such as Chrome, Firefoxl, Edge, Opera, etc.

 

Go to your friends list ( https://steamcommunity.com/my/friends/ ).
Once you have done that go to your browser's developer console ( 
To open DevTools, right-click the page and select Inspect )  and paste the following code:

 

const groupID = '103582791435613873';
const friends = GetCheckedAccounts('#search_results>.selectable');
InviteUserToGroup(null, groupID, friends);

 

Script work only for GameLife Romania! Steam Group! 

 

spacer.png

 

SCW66nm.png

 

Featured Replies

  • Administrators

Pentru a îmbunătăți experiența de invitație pe Steam, am creat un userscript pentru Tampermonkey. Puteți descărca Tampermonkey de aici: https://www.tampermonkey.net/

Pentru a crea scriptul, urmați pașii de mai jos:

 

1. Selectați extensia Tampermonkey și accesați dashboard-ul.

Spoiler

Tampermonkey Dashboard

 

2. În dashboard, faceți click pe simbolul '+' care semnifică 'Create new script'.

Spoiler

Create New Script

 

3. După ce ați creat noul script, copiați și lipiți următorul cod și salvați folosind combinația de taste CTRL + S sau din meniul File > Save.

Spoiler

Script Code

 

 

Script:

Spoiler
            // ==UserScript==
            // @name         Steam Invite Friends to Group
            // @namespace    http://tampermonkey.net/
            // @version      1.5
            // @description  Invite friends to your Steam group
            // @author       @LeX
            // @match        https://steamcommunity.com/id/*/friends
            // @match        https://steamcommunity.com/profiles/*/friends
            // @grant        none
            // ==/UserScript==

            (function() {
                'use strict';

                function addInviteButton() {
                    let titleBar = document.querySelector('.profile_friends.title_bar');
                    if (!titleBar) return;

                    let inviteButton = document.createElement('button');
                    inviteButton.id = 'add_friends_button';
                    inviteButton.className = 'profile_friends manage_link btn_green_steamui btn_medium';
                    inviteButton.innerHTML = 'Invite friends in your group';
                    inviteButton.style.marginBottom = '10px';
                    inviteButton.onclick = fetchGroups;

                    titleBar.parentNode.insertBefore(inviteButton, titleBar);
                }

                function fetchGroups() {
                    let groupUrl = location.href.includes('id') ?
                        location.href.replace('/friends', '/groups') :
                        location.href.replace('/friends', '/groups');

                    fetch(groupUrl)
                        .then(response => response.text())
                        .then(text => {
                            let parser = new DOMParser();
                            let doc = parser.parseFromString(text, 'text/html');
                            let groupBlocks = doc.querySelectorAll('.group_block');
                            let groups = Array.from(groupBlocks).map(block => {
                                let groupIdMatch = block.innerHTML.match(/OpenGroupChat\(\s*'(\d+)'/);
                                let groupName = block.querySelector('.groupTitle a').textContent.trim();
                                return {
                                    id: groupIdMatch ? groupIdMatch[1] : null,
                                    name: groupName
                                };
                            }).filter(group => group.id);

                            showGroupSelection(groups);
                        });
                }

                function showGroupSelection(groups) {
                    let select = document.createElement('select');
                    select.style.width = '100%';
                    select.style.marginBottom = '10px';
                    select.style.padding = '5px';
                    select.style.fontSize = '14px';

                    groups.forEach(group => {
                        let option = document.createElement('option');
                        option.value = group.id;
                        option.textContent = group.name;
                        select.appendChild(option);
                    });

                    let confirmButton = document.createElement('button');
                    confirmButton.textContent = 'Confirm';
                    confirmButton.className = 'btn_green_steamui btn_medium';
                    confirmButton.style.width = '100%';
                    confirmButton.onclick = () => {
                        let selectedGroupId = select.value;
                        let friends = GetCheckedAccounts('#search_results>.selectable');
                        InviteUserToGroup(null, selectedGroupId, friends);
                        document.body.removeChild(modal);
                    };

                    let modal = document.createElement('div');
                    modal.style.position = 'fixed';
                    modal.style.top = '50%';
                    modal.style.left = '50%';
                    modal.style.transform = 'translate(-50%, -50%)';
                    modal.style.backgroundColor = '#1b2838';
                    modal.style.border = '1px solid #000';
                    modal.style.padding = '20px';
                    modal.style.zIndex = '1000';
                    modal.style.width = '300px';
                    modal.style.color = '#c6d4df';
                    modal.style.boxShadow = '0px 0px 10px rgba(0,0,0,0.5)';

                    let modalTitle = document.createElement('h2');
                    modalTitle.textContent = 'Select a group';
                    modalTitle.style.marginBottom = '10px';
                    modalTitle.style.fontSize = '18px';

                    modal.appendChild(modalTitle);
                    modal.appendChild(select);
                    modal.appendChild(confirmButton);

                    document.body.appendChild(modal);
                }

                window.addEventListener('load', addInviteButton);
            })();
        


Acum totul este terminat. Nimic mai simplu!
Rezultat:

Spoiler

HcCAyvM.png



Butonul va apărea după aproximativ 1 secundă sau mai puțin și putem selecta grupul dorit.
Apăsăm confirm și invitația va fi trimisă automat către toți prietenii din listă. Acest script este mai util și mult mai automatizat.

 

Ps. Voi reveni cu un edit dacă voi mai lucra la acest script.
Momentan are o problemă: odată apăsat butonul de invitație, selectorul grupurilor nu dispare și trebuie să reîncărcați pagina.
Poate voi adăuga un event log astfel încât dacă selectorul este existent și apăsăm în afara acestuia, să dispară, dar nu promit nimic încă.

277198.png?1730931816

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.