Mousehunt Ultimate Horn

Just to sound horn, nothing fancy, but it bypasses the king's reward.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

 // ==UserScript==
// @name        Mousehunt Ultimate Horn
// @author      Howie The Almighty
// @version    	2020.11.25
// @namespace   https://github.com
// @description Just to sound horn, nothing fancy, but it bypasses the king's reward.
// @require		https://code.jquery.com/jquery-2.2.2.min.js
// @include		http://mousehuntgame.com/*
// @include		https://mousehuntgame.com/*
// @include		http://www.mousehuntgame.com/*
// @include		https://www.mousehuntgame.com/*
// @include		http://apps.facebook.com/mousehunt/*
// @include		https://apps.facebook.com/mousehunt/*
// @include		http://hi5.com/friend/games/MouseHunt*
// @include		http://mousehunt.hi5.hitgrab.com/*
// @grant		unsafeWindow
// @grant		GM_info
// ==/UserScript==



(function() {
    'use strict';

    setTimeout(main_function, 960*1000);
})();

function main_function(){
    hornAPI()
    location.reload()
}

function hornAPI(){
    let timeNow = new Date()
    fetch('https://www.mousehuntgame.com/api/action/turn/me', {
        method: "GET",
    })
    .then(res => res.json())
    .then(res => {
        if (res.success){
            console.log("Successfully horned at " + timeNow.toISOString())
        } else {
            console.log("Failed to horn at " + timeNow.toISOString())
        }
        console.log(res)
    })
}