미디어위키:Gadget-insignia.js

참고: 설정을 저장한 후에 바뀐 점을 확인하기 위해서는 브라우저의 캐시를 새로 고쳐야 합니다.

  • 파이어폭스 / 사파리: Shift 키를 누르면서 새로 고침을 클릭하거나, Ctrl-F5 또는 Ctrl-R을 입력 (Mac에서는 ⌘-R)
  • 구글 크롬: Ctrl-Shift-R키를 입력 (Mac에서는 ⌘-Shift-R)
  • 엣지: Ctrl 키를 누르면서 새로 고침을 클릭하거나, Ctrl-F5를 입력.
(function () {
   const imageMap = {
    'project-cheonggwang': ['Project_晴光_휘장.png', 'b', 'c'],
    'lisianthus': ['리시안서스_휘장.png', '7', 'f'],
    'gengojiro': ['지로_휘장.png', 'b', '2'],
    'halvfjerde': ['삼쩌모_휘장.png', 'd', '1'],
    'cenia': ['천휘국_휘장.png', '8', '6'],
  };

  const appendafterthis = document.querySelector('.vh-notifications');
  if (!appendafterthis) return;

  Object.keys(imageMap).forEach(function (key) {
    const existing = document.querySelector('span.' + key + '-insignia');
    if (!existing) return;

    const newDiv = document.createElement('div');
    newDiv.className = 'vh-sidebar-section';
    newDiv.setAttribute(
      'style',
      `
      margin-top: 1rem;
      background: url(https://w.halv.kr/images/${encodeURIComponent(imageMap[key][1])}/${encodeURIComponent(imageMap[key][1])}${encodeURIComponent(imageMap[key][2])}/${encodeURIComponent(imageMap[key][0])}) center no-repeat, light-dark(#fff,#1c1d1f) !important;
      background-size: contain !important;
      height: 2.34rem !important;
      `
    );
    appendafterthis.insertAdjacentElement('afterend', newDiv);
  });
})();