Sandbox: Difference between revisions

From Hidden Mickey Wiki

No edit summary
(Blanked the page)
Tags: Blanking Manual revert
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
<htmltag tagname="script" type="text/javascript">
(function() {
  // IDs to check
  var ids = ['Sandbox1','Sandbox2','Sandbox3'];


  // Create a table
  var table = document.createElement('table');
  table.style.borderCollapse = 'collapse';
  table.style.margin = '10px 0';
  table.style.width = '300px';
 
  // Table header
  var header = table.insertRow();
  header.insertCell().innerText = 'ID';
  header.insertCell().innerText = 'Checkbox State';
  header.insertCell().innerText = 'Timestamp';
 
  // Style header
  for (var i=0;i<header.cells.length;i++) {
    header.cells[i].style.border = '1px solid black';
    header.cells[i].style.padding = '4px';
    header.cells[i].style.fontWeight = 'bold';
    header.cells[i].style.textAlign = 'center';
  }
  // Fill rows
  ids.forEach(function(id) {
    var row = table.insertRow();
   
    // ID column
    var cellId = row.insertCell();
    cellId.innerText = id;
    cellId.style.border = '1px solid black';
    cellId.style.padding = '4px';
   
    // Checkbox column
    var cellCheckbox = row.insertCell();
    cellCheckbox.innerText = localStorage.getItem(id) || '(none)';
    cellCheckbox.style.border = '1px solid black';
    cellCheckbox.style.padding = '4px';
    cellCheckbox.style.textAlign = 'center';
   
    // Timestamp column
    var cellTs = row.insertCell();
    cellTs.innerText = localStorage.getItem(id + '-ts') || '(none)';
    cellTs.style.border = '1px solid black';
    cellTs.style.padding = '4px';
    cellTs.style.textAlign = 'center';
  });
  // Append table to body
  document.body.appendChild(table);
})();
</htmltag>

Latest revision as of 10:53, 8 October 2025