MediaWiki:Common.js
Appearance
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)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* BEGIN HOSAKA SITE BRANDING */
/* Hosaka site title and favicon; original application UI retained. */
(()=>{const brand="Hosaka Wiki",icon="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2353E4FF%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%2224%22%20height%3D%2224%22%20rx%3D%224%22%20fill%3D%22%23090D18%22%20stroke%3D%22none%22%2F%3E%3Cpath%20d%3D%22M4%203h16v18H4ZM8%203v18M11%208h6M11%2012h6M11%2016h4%22%2F%3E%3C%2Fsvg%3E";let pending=false;
function apply(){pending=false;const title=document.querySelector('title');if(title){let text=title.textContent;let next=text.replace(/MediaWiki/g,brand);if(!next.trim())next=brand;if(next!==text)title.textContent=next;}
let link=document.querySelector('link[data-hosaka-favicon]');if(!link){link=document.createElement('link');link.rel='icon';link.type='image/svg+xml';link.setAttribute('data-hosaka-favicon','true');link.href=icon;document.head.appendChild(link);}for(const other of document.querySelectorAll('link[rel="icon"],link[rel="shortcut icon"]')){if(other!==link)other.remove();}}
const schedule=()=>{if(!pending){pending=true;queueMicrotask(apply);}};
if(document.head){new MutationObserver(schedule).observe(document.head,{childList:true,subtree:true,characterData:true});apply();}else document.addEventListener('DOMContentLoaded',apply,{once:true});
})();
/* END HOSAKA SITE BRANDING */