riseofthepixels
Table of profit
by hive_coding
JavaScript
// ==UserScript==
// @name Rise of the Pixels Dashboard Script
// @namespace http://riseofthepixels.com
// @version 0.1
// @description Extracts information from specified div elements on riseofthepixels.com/dashboard
// @author Your Name
// @match https://riseofthepixels.com/dashboard
// @require https://code.jquery.com/jquery-3.6.0.min.js
// @grant none
// ==/UserScript==
(function() {
'use strict';
$(document).ready(function() {
createHideButton();
createHideButton2();
// Find all divs with attribute data-v-a690fcaf containing divs with class card-header
});
function GetData2(){
GetData(true);
}
function GetData(isblurt=false){
console.log("GetData");
console.log("isblurt x",isblurt);
var table=`| Titel | Genre/Thema | Plattform | Kosten | Verdienst | Gewinn/Verlust |
| ------------ | ------------ | ------------ | ------------ | ------------ | ------------ |
`;
var sumcost=0;
var sumreward=0;
var sumwin=0;
$('div.card').each(function() {
// Extract required information and store in variables
var genre = $(this).find('span.capitalize').text().trim();
var title = $(this).find('div.hidden.2xl\\:block.text-2xl.font-bold.text-white').text().trim();
var platform = $(this).find('span.bg-white\\/30.rounded').text().trim();
// console.log("costdiv", $(this).find('div:not(:has(>div)):contains("Cost")'));
var cost = $(this).find('div:not(:has(>div)):contains("Cost")').find('span').text().trim();
var reward = $(this).find('a:contains("Rewards")').find('span:first').text().trim();
// Output the extracted information to console
// console.log("Genre: " + genre);
// console.log("Title: " + title);
...