hidemy.name proxy parser

parse proxy from site page

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         hidemy.name proxy parser
// @namespace    tuxuuman:hideme-parser-proxy
// @version      0.1.3
// @description  parse proxy from site page
// @author       tuxuuman
// @match        https://hidemy.name/*/proxy-list/*
// @match        https://hidemyna.me/*/proxy-list/*
// @require      https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js
// @grant        GM_registerMenuCommand
// @grant        GM_setClipboard
// @grant        GM_notification
// ==/UserScript==

(function() {
    'use strict';

    $('.table_block>table>tbody>tr').on('click', function () {
        let tds = $(this).children('td');
        let ip = tds.eq(0).text();
        let port = tds.eq(1).text();
        let host = ip + ':' + port;
        GM_setClipboard(host);
        GM_notification({
            title: "Copied",
            text: host,
            timeout: 2000,
            silent: true
        })
    });

    GM_registerMenuCommand('Parse', function() {
        var resultText = "";
        $('.table_block>table>tbody>tr').each(function(i, e){
            var tr = $(e);
            var tdList = tr.children('td');
            var host = tdList.get(0).innerText;
            var port = tdList.get(1).innerText;
            resultText += host +':'+port+"<br>";
        });
        var newWin = window.open("about:blank", "Proxies", "width=400,height=300");
        newWin.document.write(resultText);
    });

})();