PageSourceSearch

https://sciencevsmagic.net/tiles/js/domcontrols.js

js sciencevsmagic.net collected 2026-09-24 10:26:16 UTC 1,007 bytes, 34 lines download raw bytes

1(function(){
2  //everything that references the dom contols.
3  platform=modules.platform;
4  if (platform.dom===false){
5    return;
6  }
7  var chain=modules.chain;
8  var world=modules.world;
9  var addcontrol=function(id,fn){
10    var element=document.getElementById(id);
11    element.addEventListener('click',fn);
12
13    var element2=document.getElementById(id+'2');
14    element2.addEventListener('click',fn);
15  };
16  addcontrol('undolink',chain.undo);
17  addcontrol('redolink',chain.redo);
18  addcontrol('resetlink',chain.reset);
19
20  addcontrol('togglelink',function(){
21    world.state.handler('del');
22  });
23  addcontrol('colordownlink',function(){
24    world.state.handler('q');
25  });
26  addcontrol('coloruplink',function(){
27    world.state.handler('e');
28  });
29
30  if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
31    document.getElementById('desktopcontrols').style.display='none';
32    document.getElementById('phonecontrols').style.display='block';
33  }
34}());//links

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.