TEST

all tests for my extensions

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name       TEST
// @namespace  http://scratch.mit.edu
// @version    0.1
// @description  all tests for my extensions
// @match      *://scratch.mit.edu/projects/*
// @user		minirag (scratch)
// ==/UserScript==
(function(ext) {
    ext._shutdown = function() {
    };
    
    ext._getStatus = function() {
        return {status: 2, msg: 'Ready'}; 
    };
    var descriptor = {
        blocks: [
            ['r', '%n to string', 'string'],
            ['r', '%n to binary', 'binary'],
            ['r', '%n ^ %n', 'power'],
            ['b', 'Is %n ≥ %n', 'testgreat'],
            ['b', 'Is %n ≤ %n', 'testless'],
        ]
    };
    ext.string = function(num) {
        var answer = "foo";
		var binary = num;
		answer = parseInt(binary, 2);
        return answer
    };
    ext.binary = function(num) {
        var x = "foo";
        x = num;
		x = parseInt(x);
		x = x.toString(2);
        return x;
    };
    ext.power = function(n1,n2) {          
        var answer = Math.pow(n1,n2);
        return answer;
    };
    ext.testgreat = function(num1,num2) {
        var answer = "foo";
        if (num1 >= num2) {
            answer = true;
        }
        else {
            answer = false;
        }
        return answer;
    };
     ext.testless = function(num1,num2) {
        var answer = "foo";
        if (num1 <= num2) {
            answer = true;
        }
        else {
            answer = false;
        }
        return answer;
    };
    ScratchExtensions.register('lolwut', descriptor, ext);
})({});