Kikora hax

Attempts to record tasks submitted to kikora and delivers the correct results to everyone else

目前為 2016-09-21 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Kikora hax
// @namespace    Danielv123
// @version      0.1
// @description  Attempts to record tasks submitted to kikora and delivers the correct results to everyone else
// @author       You
// @match        *.kikora.no/*
// @require      http://code.jquery.com/jquery-3.1.0.js
// @grant        none
// ==/UserScript==

url = document.location.href.replace("|", "/").replace("|", "/").split("/");
console.log(url);
console.log("Book: " + url[8] + " Theme: " + url[9] + " Chapter: " + url[10] + " Task: " + url[11]);

function wasddas(number) {
    number = number - 1;
    (function(number){
        url = document.location.href.replace("|", "/").replace("|", "/").split("/");
        $.ajax({
            type: "POST",
            url: "/k/json",
            data: 'request={"solution":{"containerid":"'+url[10]+'","exerciseid":'+url[11]+',"timeusedforevent":'+666+',"calculationid":0,"solutionid":' + number + ',"newcalculation":false,"lcode":"nb"}}',
            dataType: "json",
            success: function(data) {
                if(data[0].solution){
                    console.log(number);
                    console.log("Hint found!");
                    console.log(data[0].solution.esl);
                } else {
                    console.log("Not found :'(");
                    wasddas(number);
                }
            },
            error: function() {
                // alert('error handing here');
            }
        });
    })(number);
}

// start it up
setInterval(function(){
    wasddas(10);
}, 5000);