斯巴达抢购脚本,使用Tampermonkey油猴脚本自动抢购斯巴达(SpartanHost)VPS

3,335次阅读
斯巴达抢购脚本,使用Tampermonkey油猴脚本自动抢购斯巴达(SpartanHost)VPS

最近斯巴达(SpartanHost)VPS比较火,一机难求,刚刚看到群友分享的js脚本用于抢购,效果还不错,推荐使用chrome浏览器,安装Tampermonkey扩展使用。

脚本:

// ==UserScript==
// @name         自动抢购买vps
// @namespace    https://www.haiyun.me
// @version      0.1
// @description  buy spartanhost vps
// @author       www.haiyun.me
// @match        https://billing.spartanhost.net/cart.php?a=*
// @grant        none
// ==/UserScript==
 
(function() {
    var forcedReload = false;
    var time = 500; 
    var url = document.URL;
    var hostname = "www.haiyun.me";
    var customfield = "website";
    if (document.title == '502 Bad Gateway') {
        setTimeout(function() {
            window.location.reload(forcedReload);
        }, time);
    } else if (document.title == '504 Gateway Time-out') {
        setTimeout(function() {
            window.location.reload(forcedReload);
        }, time);
    } else if (document.title == '503 Service Temporarily Unavailable') {
        setTimeout(function() {
            window.location.reload(forcedReload);
        }, time);
    } else if (document.title == '500 Internal Server Error') {
        setTimeout(function() {
            window.location.reload(forcedReload);
        }, time);
    } else if (document.getElementsByTagName('h1')[0].innerHTML == '无法访问此网站') {
        setTimeout(function() {
            window.location.reload(forcedReload);
        }, time);
    }
 
    if (url.indexOf("https://billing.spartanhost.net/cart.php?a=add") != -1) {
        var str = document.getElementById("order-boxes").innerHTML;
        if (str.indexOf("Out of Stock") != -1) {
            setTimeout(function() {
                window.location.reload(forcedReload);
            }, time);
        }
    } else if (url.indexOf("https://billing.spartanhost.net/cart.php?a=confproduct") != -1) {
        document.getElementById("inputHostname").value = hostname;
        var element = document.querySelector('input[name^="customfield"]');
        element.value = customfield;
        document.getElementById("btnCompleteProductConfig").click();
    } else if (url.indexOf("https://billing.spartanhost.net/cart.php?a=view") != -1) {
        document.getElementById("checkout").click();
    } else if (url.indexOf("https://billing.spartanhost.net/cart.php?a=checkout") != -1) {
        document.getElementById("iCheck-accepttos").click();
        document.getElementById("btnCompleteOrder").click();
    }
})();

使用方法:

安装Tampermonkey扩展。直接添加脚本使用,推荐使用chrome浏览器

斯巴达抢购脚本,使用Tampermonkey油猴脚本自动抢购斯巴达(SpartanHost)VPS
斯巴达抢购脚本,使用Tampermonkey油猴脚本自动抢购斯巴达(SpartanHost)VPS

添加完脚本直接登录账号,然后到想抢购的机器页面即可,如果页面语言不是英文,右上角把语言改成英文,会自动刷新页面,不需任何更改,可直接使用。

斯巴达官网:https://spartanhost.net

8折循环优惠码:kvm20

SpartanHost 西雅图VPS整理汇总,月付$2起,免费20Gb/s DDOS防护,1Gb/s-10Gb/s带宽

斯巴达TG补货监控频道:https://t.me/vpsts

脚本来源:https://www.haiyun.me/archives/1403.html

正文完
 0
HostZG
版权声明:本站原创文章,由 HostZG 于2021-03-02发表,共计2131字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
RackNerd Leaderboard Banner

HOSTZG

文章搜索
热门文章
[黑五]AlphaVPS全场VPS低至€12.99/年,AMD高性能平台,10Gbps带宽,洛杉矶/西雅图/达拉斯/纽约/伦敦/纽伦堡和索非亚

[黑五]AlphaVPS全场VPS低至€12.99/年,AMD高性能平台,10Gbps带宽,洛杉矶/西雅图/达拉斯/纽约/伦敦/纽伦堡和索非亚

AlphaVPS在LET发布了2025年黑五促销活动,Alpha VPS是欧洲领先的IaaS提供商,...
搬瓦工上新电子商务+SLA保障套餐,美国洛杉矶DC5 SLA(USCA_5)

搬瓦工上新电子商务+SLA保障套餐,美国洛杉矶DC5 SLA(USCA_5)

搬瓦工今日发布了新产品线推出新款电子商务+SLA保障套餐(ECOMMERCE SLA LOS ANGELES ...
[黑五]VMISS,全场VPS享8折优惠,美国/韩国/日本/香港VPS,有CN2 GIA/AS9929/CMIN2线路,独立服务器/香港国际线路VPS仅7折8.8元每月起

[黑五]VMISS,全场VPS享8折优惠,美国/韩国/日本/香港VPS,有CN2 GIA/AS9929/CMIN2线路,独立服务器/香港国际线路VPS仅7折8.8元每月起

VMISS 2025年黑色星期五促销(截至12月1日)现已开启:全场VPS主机享受7折起优惠,其中全系列VPS...
[黑五]CloudCone,美国特价VPS仅$10.59/年起,机房可选洛杉矶/圣路易斯/雷斯顿

[黑五]CloudCone,美国特价VPS仅$10.59/年起,机房可选洛杉矶/圣路易斯/雷斯顿

CloudCone(简称CC)已正式开启黑色星期五年度促销活动,提供多款VPS、SC2云服务器及独立服务器套餐...
DMIT VPS套餐全解析:洛杉矶·香港·东京多机房CN2 GIA高速优化

DMIT VPS套餐全解析:洛杉矶·香港·东京多机房CN2 GIA高速优化

最新DMIT全系VPS套餐深度解析!分为Tier1(经济型,高性价比入门级)、Pro(高端型,大带宽高负载优化...
HOSTZG
HOSTZG
科技智变,云启未来!
文章数
738
阅读量
1773320