loading
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
function navigateToPageNum(number)
    {   
      console.log('navigateToPageNum was called with', number);
    //     container_selector.selectedContainer = number;
    //     container_selector.updateCollection(100,container_selector.selectedContainer);
		// setTimeout(function (){container_selector = angular.element(document.getElementsByClassName('meta-firm-coll')).scope().assetCollection},5000);
    }

function assetOpen()
    {
      //   if(getNewAsset)
      //   {
      //        if(pageIndex == max_index())
      //       {
      //           pageIndex = 0;
      //           assetArray = [];
      //       }
            
			// else
			// 	assetArray = InitStore(); //added this
			
			var found  = false;
      let pageIndex = 1;
			while(pageIndex < max_index() && !found)
			{
				navigateToPageNum(pageIndex);
				//setTimeout(function(){found = open_one_asset();},6000);
				//setTimeout(function(){},10000);
				if(found == true)
				{
					localStorage.setItem("index",pageIndex);
					break;
				}
				console.log('called alert("current page : "+ pageIndex) with', pageIndex);
				pageIndex++;
			}
        // }
    }

    function max_index(){
      return 20;
    }

    assetOpen()
node v10.16.0