PageSourceSearch

https://www.laskurini.fi/scripts-built/app/MultiplicationTable.js?v=1.0.9679.26429

js laskurini.fi collected 2026-09-24 20:45:41 UTC 3,653 bytes, 1 lines download raw bytes

1define("lib/domReady",[],function(){"use strict";function e(e){var t;for(t=0;t<e.length;t+=1)e[t](l)}function t(){var t=s;d&&t.length&&(s=[],e(t))}function n(){d||(d=!0,c&&clearInterval(c),t())}function r(e){return d?e(l):s.push(e),r}var a,o,c,i="undefined"!=typeof window&&window.document,d=!i,l=i?document:null,s=[];if(i){if(document.addEventListener)document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1);else if(window.attachEvent){window.attachEvent("onload",n),o=document.createElement("div");try{a=null===window.frameElement}catch(e){}o.doScroll&&a&&window.external&&(c=setInterval(function(){try{o.doScroll(),n()}catch(e){}},30))}"complete"===document.readyState&&n()}return r.version="2.0.1",r.load=function(e,t,n,a){a.isBuild?n(null):r(n)},r}),define("MultiplicationTable",["require","exports","Common/Common","lib/domReady!"],function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.init();var r=10,a=$(".c-calcContainer #multiplicationTable");new(function(){function e(){var e=this;screen.width<768&&(r=5,$("#tableCount").val(5));for(var t=this.create2DArray(101),n=0;n<=100;n++)for(var o=0;o<=100;o++)t[n][o]=n*o;this.createExercise1(2),this.createExercise2(5),$("#check1").click(function(){$("#exerciseContainer1 table tr").each(function(e,n){var r=$(n);parseInt(r.find("input").val())==t[r.data("x")][r.data("y")]?(r.addClass("correct"),r.removeClass("notCorrect")):(r.addClass("notCorrect"),r.removeClass("correct"))})}),$("#check2").click(function(){$("#exerciseContainer2 table tr").each(function(e,n){var r=$(n);parseInt(r.find("input").val())==t[r.data("x")][r.data("y")]?(r.addClass("correct"),r.removeClass("notCorrect")):(r.addClass("notCorrect"),r.removeClass("correct"))})}),a.html("").append(this.createTable()),$("#tableCount").change(function(t){r=$(t.target).val(),a.html("").append(e.createTable())}),$("#level").change(function(t){e.createExercise1($(t.target).val())}),$("#level2").change(function(t){e.createExercise2($(t.target).val())}),$("#btnRandomize").click(function(){e.createExercise2($("#level2").val())}),a.on("mouseover","td",function(t){e.toggleSelection(t,!0)}),a.on("mouseout","td",function(t){e.toggleSelection(t,!1)})}return e.prototype.createExercise1=function(e){for(var t="",n=2;n<=10;n++)t+='<tr data-x="'+n+'" data-y="'+e+'"><td>'+n+"x"+e+' =</td><td><input type="text" inputmode="numeric" /></td></tr>';$("#exerciseContainer1 table").html("").append(t)},e.prototype.createExercise2=function(e){var t,n;e<10?(t=this.generateRange(5,0,e),n=this.generateRange(5,0,e),t=t.concat(this.generateRange(5,0,e)),n=n.concat(this.generateRange(5,0,e))):(t=this.generateRange(9,0,e),n=this.generateRange(9,0,e));for(var r="",a=0;a<9;a++){var o=t[a],c=n[a];r+='<tr data-x="'+o+'" data-y="'+c+'"><td>'+o+"x"+c+' =</td><td><input type="text" inputmode="numeric" /></td></tr>'}$("#exerciseContainer2 table").html("").append(r)},e.prototype.generateRange=function(e,t,n){for(var r,a=t<n?t:n,o=n>t?n:t,c=[];e>0;)r=Math.round(a+Math.random()*(o-a)),-1==c.indexOf(r)&&(c.push(r),e--);return c},e.prototype.toggleSelection=function(e,t){var n=$(e.target),r=n.parent(),o=a.find("tr:lt("+r.index()+")").find("td:eq("+n.index()+")"),c=r.find("td:lt("+(n.index()+1)+")");t?(c.addClass("selected"),o.addClass("selected")):(c.removeClass("selected"),o.removeClass("selected"))},e.prototype.createTable=function(){for(var e="",t=1;t<=r;t++)e+="<tr>"+this.createCells(t)+"</tr>";return e},e.prototype.createCells=function(e){for(var t="",n=1;n<=r;n++)t+="<td>"+n*e+"</td>";return t},e.prototype.create2DArray=function(e){for(var t=[],n=0;n<e;n++)t[n]=[];return t},e}())});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.