User:Hefner/Sandbox8: Difference between revisions

From Roat Pkz
Jump to navigation Jump to search
No edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
Line 1: Line 1:
<style>
{| class="wikitable mw-datatable bingo-table"
.bingo-table td {
  cursor: pointer;
  padding: 12px 18px;
  border: 1px solid #aaa;
  text-align: center;
  user-select: none;
}
 
.bingo-selected {
  background-color: #ffe599 !important;
  border: 2px solid #d4af37 !important;
  color: black;
  font-weight: bold;
}
</style>
 
{| class="wikitable bingo-table" style="width: 300px; margin: 1em auto; border-collapse: collapse;"
|-
|-
| {{#tag:td|B1|id=tile-1}} || {{#tag:td|B2|id=tile-2}} || {{#tag:td|B3|id=tile-3}}
| id="tile-1" | Tile 1
| id="tile-2" | Tile 2
| id="tile-3" | Tile 3
|-
|-
| {{#tag:td|I1|id=tile-4}} || {{#tag:td|I2|id=tile-5}} || {{#tag:td|I3|id=tile-6}}
| id="tile-4" | Tile 4
| id="tile-5" | Tile 5
| id="tile-6" | Tile 6
|-
|-
| {{#tag:td|N1|id=tile-7}} || {{#tag:td|N2|id=tile-8}} || {{#tag:td|N3|id=tile-9}}
| id="tile-7" | Tile 7
| id="tile-8" | Tile 8
| id="tile-9" | Tile 9
|}
|}


<script>
document.addEventListener("DOMContentLoaded", function () {
  const cells = document.querySelectorAll(".bingo-table td");


  cells.forEach(function (cell) {
    const id = cell.id;
    if (!id) return;


    // Restore selection from localStorage
Board 1 prior to debuffs:
    if (localStorage.getItem(id) === "selected") {
{| class="wikitable lighttable individual"
      cell.classList.add("bingo-selected");
! colspan="5" |Board 1 - Foot Stuff
    }
|-
|[[File:Pegasian crystal.png|frameless]] [[Pegasian crystal]]
|[[File:Echo crystal.png|frameless]] [[Echo crystal]]
|[[File:Bandos boots.png|frameless]] [[Bandos boots]]
|[[File:Dark flippers.png|frameless]] [[Dark claw]]
|[[File:Holy sandals.png|frameless]] [[Holy sandals]]
|-
|[[File:Spiked manacles.png|frameless]] [[Spiked manacles]]
|[[File:Drake's claw.png|frameless]] [[Drake's claw]]
|[[File:Mole slippers.png|frameless]] [[Mole slippers]]
|[[File:Aranea boots.png|frameless]] [[Aranea boots]]
|[[File:Eternal crystal.png|frameless]] [[Eternal crystal]]
|-
|[[File:Infinity boots.png|frameless]] [[Infinity boots]]
|[[File:Zealot's boots.png|frameless]] [[Zealot's boots]]
|[[File:Wizard boots.png|frameless]] [[Wizard boots]]
|[[File:Vorkath's head.png|frameless]] [[Vorki]]
|[[File:Graceful boots (Agility Arena).png|frameless]] [[Graceful boots (Agility Arena)]]
|-
|[[File:Granite boots.png|frameless]] [[Granite boots]]
|[[File:Climbing boots (g).png|frameless]] [[Climbing boots (g)]]
|[[File:Ancient d'hide boots.png|frameless|width=29x29]] [[Blessed boots|Blessed boots (ANY)]]
|[[File:Ranger boots.png|frameless]] [[Ranger boots]]
|[[File:Drake's tooth.png|frameless]] [[Drake's tooth]]
|-
|[[File:Runner boots.png|frameless]] [[Runner boots]]
|[[File:Black tourmaline core.png|frameless]] [[Black tourmaline core]]
|[[File:Primordial crystal.png|frameless]] [[Primordial crystal]]
|[[File:Dragon boots ornament kit.png|frameless]] [[Dragon boots ornament kit]]
|Free
|}


    // Toggle selection on click
{| class="wikitable mw-datatable"
    cell.addEventListener("click", function () {
! Name
      cell.classList.toggle("bingo-selected");
! Type
 
! Notes
      if (cell.classList.contains("bingo-selected")) {
|-
        localStorage.setItem(id, "selected");
| Dragon
      } else {
| Boss
        localStorage.removeItem(id);
| Dangerous
      }
|-
    });
| Cow
  });
| Passive
});
| Good for training
</script>
|}

Revision as of 23:19, 16 June 2025