MediaWiki:Common.js

From Medivia Online Wiki
Revision as of 16:31, 22 September 2025 by Eldrin (talk | contribs)

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
mw.loader.using('mediawiki.util').then(function () {
  var css = `
  /* Hunt card styling */
  #results.grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
      gap: 20px;
  }
  .hunt-card {
      background: #333;
      border: 1px solid #111;
      border-radius: 6px;
      box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      transition: background 0.15s;
  }
  .hunt-card:hover { background: #444; }
  .hunt-card-content { padding: 12px; display: flex; flex-direction: column; flex: 1; }
  .hunt-card h3 {
      margin: 0 0 10px;
      font-size: 1.2em;
      color: #ECECEC;
      border-bottom: 2px solid #14866d;
      padding-bottom: 4px;
  }
  .hunt-box-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 6px;
      margin: 10px 0;
  }
  .hunt-box, .hunt-box-wide {
      background: #222;
      border: 1px solid #111;
      border-radius: 4px;
      padding: 6px;
      font-size: 0.9em;
      color: #ECECEC;
      box-shadow: inset 0 0 4px rgba(0,0,0,0.4);
  }
  .hunt-box-wide { margin: 6px 0; padding: 8px; }
  .hunt-comment {
      background: #1d1d1d;
      border: 1px solid #111;
      border-radius: 4px;
      padding: 8px;
      margin-top: auto;
  }
  .wiki-btn {
      display: block;
      text-align: center;
      margin-top: auto;
      padding: 10px;
      background: #14866d;
      color: #fff !important;
      text-decoration: none;
      font-weight: bold;
      border-radius: 4px;
      transition: background 0.2s;
  }
  .wiki-btn:hover { background: #0f6e57; }
  `;
  
  var style = document.createElement('style');
  style.textContent = css;
  document.head.appendChild(style);
});