0xDC00 / scripts

A collection of scripts for Agent. Feel free to submit a pull request to add your script.
https://github.com/0xDC00/agent
MIT License
75 stars 36 forks source link

[Request] PC Steam: ATRI -My Dear Moments- #506

Open ArmoryFou opened 3 months ago

ArmoryFou commented 3 months ago

https://store.steampowered.com/app/1230140/ATRI_My_Dear_Moments/

cpettitt commented 2 months ago

This works pretty well for me:

// ==UserScript==
// @name         ATRI
// @version      0.1
// @author       cpettitt
// @description  Steam
//
// ==/UserScript==

const furiganaPattern = /\[([^,]+),(\d+)\]/g;
function removeFurigana(s) {
    return s.replace(furiganaPattern, function(match, p1, p2, p3) {
        return "";
    });
}

function filter(s) {
    const sanitized = s .trim() .replace(/\\n/g, "\n\u3000")
    return removeFurigana(sanitized);
}

const engine = require('./libPCKiriKiriZ.js');
const handler = trans.send(filter, '200+');
engine.hookTextrenderDll(handler);