theonedemon / Foxgate ONU G2001R remove captcha

// ==UserScript==
// @name         Foxgate ONU G2001R remove captcha
// @namespace    http://tampermonkey.net/
// @version      2025-04-27
// @author       You
// @match        http://192.168.1.1/
// @icon         https://www.google.com/s2/favicons?sz=64&domain=foxgate.ua
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';
    const originalCreateCode = window.createCode;

    window.createCode = function() {
        //console.log('createCode called');
        const result = originalCreateCode.apply(this);
        var captcha = window.getObj("checkCode").value;
        window.getObj("Frm_IdentCode").value = captcha;
        //console.log(captcha);

        return result;
    };

})(window);