PageSourceSearch

https://4chantoken.github.io/visual.js

js 4chantoken.github.io collected 2026-10-03 08:31:29 UTC 3,427 bytes, 100 lines download raw bytes

1function showSnackbarMessage(message) {
2   // Get the snackbar DIV
3   var x = document.getElementById("snackbar");
4   x.innerHTML = message
5   // Add the "show" class to DIV
6   x.className = "show";
7   // After 3 seconds, remove the show class from DIV
8   setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000);
9}
10
11function showLoadingTx() {
12   // Get the snackbar DIV
13   var x = document.getElementById("load");
14   x.style.display = "block";
15}
16
17function hideLoadingTx() {
18   // Get the snackbar DIV
19   var x = document.getElementById("load");
20   x.style.display = "none";
21}
22
23function showModalWithText(title, txt, type) {
24   var modal = document.getElementById('infoModal');
25   var modalcontent = document.getElementById('infoModalContent');
26
27   if(type=='error') {
28      modalcontent.style.backgroundColor = "#FFD9EF";
29   } else {
30      modalcontent.style.backgroundColor = "#D5D9EF";
31   }
32
33   modalcontent.class = "modal-content animated fadeInUp"
34
35   var modalTitle = document.getElementById("modalTitle");
36   var modalText = document.getElementById("modalText");
37   modalTitle.innerHTML = title;
38   modalText.innerHTML = txt;
39   modal.style.display = "block";
40
41   var x = document.getElementById("load");
42   if (type == 'loading') {
43      x.style.display = "block";
44   } else {
45      x.style.display = "none";
46   }
47
48   var span = document.getElementsByClassName("close");
49
50   // When the user clicks on <span> (x), close the modal
51   span.onclick = function() {
52      var modal = document.getElementById('infoModal');
53      modal.style.display = "none";
54   }
55
56}
57
58function hideModal() {
59   var modal = document.getElementById('infoModal');
60   modal.style.display = "none";
61}
62
63function showHelpModal() {
64   showModalWithText('About 4ChanToken...', 
65		'The 4Chan Token is the first PoR (Proof of Roll) token with a ' +
66		'decentralized distribution mechanism.<br> ' +
67      '<br>' +
68		'The ditribution function is programmed inside the 4ChanToken ' +
69		'smart contract, and each call derives a pseudo-random number ' +
70		'which is used to give you 4Chan Tokens.<br> ' +
71      '<br>' +
72		'For each rolled number, all the digits at the end that are equal ' +
73		'represent the amount of tokens that are assigned to the caller ' +
74		'(The number zero equals to 10).<br><br>' +
75		'Some example rolls:<br>' + 
76	   '<table><tr><th>Number Rolled</th><th>Tokens Obtained</th></tr>' +
77      '<tr><td>1234<em>5</em></td><td>5 4CH tokens</tr>' +
78      '<tr><td>4321<em>0</em></td><td>10 4CH tokens</tr>' +
79      '<tr><td>761<em>44</em></td><td>44 4CH tokens</tr>' +
80      '<tr><td>12<em>000</em></td><td>1000 4CH tokens</tr>' +
81		'</table>' +
82      '<br>' +
83		'The largest quantity of tokens that can be rolled is 100,000, ' +
84		'which requires <em>00000</em> to be rolled.<br> ' +
85      '<br>' +
86		'With all this in mind, we don\'t have control over who calls the ' +
87		'smart-contract or how many tokens are assigned to each person that rolls.<br>' +
88      '<br>' +
89      'The contract does NOT receive any ethereum and will reject any amount sent to it.<br>' +
90      'Don\'t send any transaction with Gas Price above \'Current Gas Price Limit\'.<br>' +
91      'Your transaction will fail if you do so.'
92      , 'help');
93}
94
95// When the user clicks anywhere outside of the modal, close it
96window.onclick = function(event) {
97   if (event.target == document.getElementById('infoModal')) {
98      hideModal();
99   }
100}

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.