Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

打发$$伸手党用的脚本 #21

Open
san3Xian opened this issue Mar 26, 2020 · 1 comment
Open

打发$$伸手党用的脚本 #21

san3Xian opened this issue Mar 26, 2020 · 1 comment

Comments

@san3Xian
Copy link
Owner

// ==UserScript==
// @name         free-ss.site__get_link
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  hello world
// @author       null
// @match        https://free-ss.site/
// @run-at       document-end
// ==/UserScript==


function get_ss_link(data){
    var str = 'ss://'+ CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(data.method + ':' + data.password + '@' + data.address +':'+ data.port ));
    return str;
}

unsafeWindow.get_all_ss_links = function get_all_ss_links(){
    var links = "";
    jQuery("#tbss_wrapper table tbody tr").each(function (index, item){
        item = jQuery(this);
        var data = new Object;
        data.method = item.find("td").eq(3).html();
        data.password = item.find("td").eq(4).html();
        data.address = item.find("td").eq(1).html();
        data.port = item.find("td").eq(2).html();
        links += get_ss_link(data) + "\n";
    });
    console.log(links);
}


unsafeWindow.test = function(){
    alert("123");
}
@san3Xian
Copy link
Owner Author

san3Xian commented Mar 26, 2020

screenshot:
image

=> select text => ctrl +c => ctrl +v => send

@san3Xian san3Xian changed the title 打发伸手党用的脚本 打发$$伸手党用的脚本 Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant