TEST

all tests for my extensions

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

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