UserScript Automated Button Text Notifier

This script is intended to work with @require only. Provides class AutomatedButtonTextNotifier

Ekde 2022/01/19. Vidu La ĝisdata versio.

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greatest.deepsurf.us/scripts/438801/1010217/UserScript%20Automated%20Button%20Text%20Notifier.js

Aŭtoro
Xortrox
Versio
0.2
Kreita
2022/01/19
Ĝisdatigita
2022/01/19
Size
2,84 kb
Licenco
MIT

Not intended for installation, only used with @require

Provides class AutomatedButtonTextNotifier

Example usage: const notificationConfig = [];

notificationConfig.push({
    includes: ['claim'],
    excludes: ['claimed'],
    notificationText: 'You have at least one adventure to claim'
});

notificationConfig.push({
    includes: ['reload adventures'],
    notificationText: 'You can reload adventures'
});

const automatedButtonTextNotifier = new AutomatedButtonTextNotifier({
    icon: 'https://play.arenaofglory.io/favicon.ico',
    title: 'Arena of Glory',
    selector: '.button label',
    config: notificationConfig,
    interval: 60000,
});

await automatedButtonTextNotifier.init();