Goal: To see when was each PPM friend last time logged in the game. Specifically to highlight those who were last logged more than 14, 21, 50 days ago.
Tested: Latest Chrome for Windows, Tampermonkey extension
-
Setup userscript
-
Install userscript extension. For example, Tampermonkey for Chrome (Alternative: Greasemonkey for Firefox)
-
Add PPMFriendListAnalyzer.user.js as new userscript
-
Open any page that start with https://ppm.powerplaymanager.com/ — there must be a new item in the upper right corner, partially hidden behind the right side. It will fully come out on mouse over.
-
-
Click the first button — Read the friend list — it will get IDs and Names of friends from the Community/Friends section (all pages)
-
Click the second button — Check up to 50 friends — it will get last login times of the friends that were not yet checked during the last 12 hours. Amount and time limitations are added just in case. User can either click this button multiple times (until "Not checked: —" in the quick stat under buttons), or change the limitation in the code:
// Amount of friend profiles to check in one run const FRIENDS_PER_RUN = 50
-
Click the third button — Show friends — it will replace main content of the page with the full list of friends, ordered by last login time, with the next info:
- Photo with a profile link that will be opened in a new tab
- Username (without country and status) with a profile link that will be opened in a new tab
- Datetime of the last login. Styles:
- bold red — more than 50 days ago;
- red — more than 21 days ago;
- orange — more than 14 days ago
- Amount of teams
-
Click any photo/username to go to their profile and do whatever is needed there (there is function unfriend in the userscript, but I decided not to finish this functionality)
To update the list, click Read the friend list and Show friends again
-
Userscript is not designed well enough to keep it always on, so:
- Click the fourth button — Before uninstall — to remove the userscript data from the browser local storage
- Switch it off in the userscript extension
- Install Kiwi browser for Android
- Download the raw script to the device
- Open this repo page in a browser on Android (any browser that has permit to write files)
- Open View code block
- Open PPMFriendListAnalyzer.user.js file
- Right above the contents of the file tap [...] — View raw
- Download the raw file to the device
- Install the script in Kiwi browser for Android
- Open Kiwi browser
- Tap [Three vertical dots] — Extensions
- Switch on Developer mode if it's off (it may be on by default)
- Click +(from .zip/.crx/.user.js)
- Select downloaded file. Card of this script will appear on the Extensions page
- Switch on this script in the bottom right corner of its card
- Tap OK in the popup window
- Open PPM website in Kiwi browser
- Load PPM page
- Tap on FLA in the upper right corner
- Continue with the main order of actions
Video (27.5 MB)