CodingBat FULL cheat - codingbat.com

Fake stars and check mark, auto fetch answer in github raw

25.05.2020 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name        CodingBat FULL cheat - codingbat.com
// @namespace   SaigyoujiYuyuko233
// @match       https://codingbat.com/python/*
// @match       https://codingbat.com/python
// @match       https://codingbat.com/prob/*
// @grant       none
// @version     1.0
// @author      SaigyoujiYuyuko233
// @description Fake stars and check mark, auto fetch answer in github raw
// @require http://code.jquery.com/jquery-3.4.1.min.js
// ==/UserScript==

let answer = new Map()

// python - logic - 1
answer.set('p191645', "https://raw.githubusercontent.com/diezguerra/codingbat-python-solutions/master/list-1.py")
answer.set('p195669', "https://raw.githubusercontent.com/snowpolar/codingbat-solutions/master/Python/Logic-1/cigar_party.py");
answer.set('p129125', "https://raw.githubusercontent.com/snowpolar/codingbat-solutions/master/Python/Logic-1/date_fashion.py");
answer.set('p135815', "https://raw.githubusercontent.com/snowpolar/codingbat-solutions/master/Python/Logic-1/squirrel_play.py")
answer.set('p137202', "https://raw.githubusercontent.com/snowpolar/codingbat-solutions/master/Python/Logic-1/caught_speeding.py")
answer.set('p119867', "https://raw.githubusercontent.com/snowpolar/codingbat-solutions/master/Python/Logic-1/alarm_clock.py")
answer.set('', "")
answer.set('', "")
answer.set('', "")
answer.set('', "")
answer.set('', "")
answer.set('', "")


$("img[src='/c1.jpg']").each(function (n, el){
  $(el).attr("src", "/c2.jpg");
});

$("img[src='/s1.jpg']").each(function (n, el){
  $(el).attr("src", "/s2.jpg");
});

let url = window.location.href;
if (url.includes("prob") == true) {
  let problemID = url.split("/")[4];
  let problemAnswerUrl = answer.get(problemID);
  
  if (problemAnswerUrl == undefined) {
    console.log("No answer for question: " + problemID);
    return;
  }
  
  console.log("answer: " + problemAnswerUrl);
  
  let ret = $.ajax({
    url: problemAnswerUrl,
    method: "GET",
    async: false
  });
  
  let responseAnswer = ret.responseText;
  editor.setValue(responseAnswer);
}