Made output box bigger, fixed another missing var issue

This commit is contained in:
Tim Stallard 2017-04-04 22:08:45 +01:00
parent a172488746
commit c5c73e76b5
2 changed files with 4 additions and 4 deletions

View File

@ -10,10 +10,10 @@ module.exports = {
},
output: false,
execute: function({input}, block){
$(block.elem).find("span.output").html(input);
$(block.elem).find("textarea.output").html(input);
},
pageBlock: {
html: "<span class='output'></span>",
html: "<textarea class='output' style='width: 190px; height: 135px;'></textarea>",
js: function(){}
}
}

View File

@ -1,5 +1,5 @@
function getFactors(num){
factors = [];
var factors = [];
for(var i = 2; i <= num; i++){
if(num%i == 0){
factors.push(i);
@ -11,7 +11,7 @@ function getFactors(num){
function coPrime(a, b){
aFactors = getFactors(a);
bFactors = getFactors(b);
common = aFactors.filter((factor)=>(bFactors.indexOf(factor) > -1));
var common = aFactors.filter((factor)=>(bFactors.indexOf(factor) > -1));
return (common.length == 0);
}