olivierdagenais / tampermonkey-copy-url

A Tampermonkey userscript to copy nice-looking URLs to the clipboard.
MIT License
0 stars 0 forks source link

Copy URLs from Zabbix 6.4.9 #44

Closed olivierdagenais closed 5 months ago

olivierdagenais commented 5 months ago

Sample content from a history.php?action=showgraph&itemids[]=204159&from=now-2h&to=now-1h page where the values of the input fields from and to can be injected into the URL, but they aren't automatically, which makes for an excellent use-case for this project:

<html>
    <head>
        <meta name="Author" content="Zabbix SIA">
    </head>
    <body>
        <div class="wrapper">
            <header class="header-title">
                <h1 id="page-title-general">host.example.com: Free disk space on / in %</h1>
            </header>
            <main>
                <div class="filter-space ui-tabs ui-corner-all ui-widget" aria-label="Filter">
                    <form method="get" action="history.php" accept-charset="utf-8" name="zbx_filter">
                        <div style="display: none"></div>
                    </form>
                    <div>
                        <input type="text" id="from" name="from" value="now-2h" maxlength="19">
                        <input type="text" id="to" name="to" value="now-1h" maxlength="19">
                    </div>
                </div>
            </main>
            <footer role="contentinfo">
                Zabbix 6.4.9. © 2001–2023, <a href="https://www.zabbix.com/">Zabbix SIA</a>
            </footer>
        </div>
    </body>
</html>
olivierdagenais commented 5 months ago

Included in release 2.6.0