自动点赞机

实现自动点赞

Stan na 30-11-2018. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @namespace Violentmonkey Scripts
// @name         自动点赞机
// @version      0.3
// @description  实现自动点赞
// @author       文不能测字
// @match        http*://ican.sf-express.com/*
// @require      https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js
// @grant       GM.xmlHttpRequest
// @grant       GM.addStyle
// @grant       GM.getResourceText
// @grant       GM.getValue
// @grant       GM.setValue
// @grant       GM.info
// @grant       GM.registerMenuCommand
// ==/UserScript==
(function () {
    'use strict';
    const websiteList = [
        {
            "url": "工行卡寄递:http://ican.sf-express.com/#/comInnovateDetail/4232",
            "description": "工行卡寄递",
            "microInnoId": 4232
        },
        {
            "url": "http://ican.sf-express.com/#/comInnovateDetail/4239",
            "description": "舟汽寄递",
            "microInnoId": 4239
        },
        {
            "url": "http://ican.sf-express.com/#/comInnovateDetail/4217",
            "description": "货微打",
            "microInnoId": 4217
        },
    ];

    $(function () {
        run(websiteList, changeLink);

    });

})();

function run(websiteList, callback) {
    console.log("自动点赞项目列表" + websiteList[index].description);
    GM_log("自动点赞项目列表" + websiteList[index].description);
    callback(websiteList[index]);
}

// 点赞
function changeLink(website) {

    // 注册一个定时器
    var task = setInterval(function (event) {

        var myData = new FormData();
        myData.append("microInnoId", website.microInnoId);
        GM_xmlhttpRequest({
            method: "POST",
            url: "http://chap-manage.sf-express.com/yearInno/base/praise",
            // data: JSON.stringify({parametro: parametro}),
            // headers: {
            //     "Content-Type": "application/json"
            // },
            data: myData,
            onload: function (response) {
                console.log(response.responseText);
                GM_log(response.responseText);
            },
            onerror: function (reponse) {
                //alert('error');
                console.log("error: ", reponse);
                GM_log(reponse);
            }
        });
        // 关闭定时器
        clearInterval(task);
    }, 1000);


}