TEST

all tests for my extensions

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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);
})({});