User:Ilikecomputers/cosmos.js

Everything About Fiction You Never Wanted to Know.
Revision as of 22:22, 24 January 2023 by Ilikecomputers (talk | contribs) (testing new JS)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Note: After saving, changes may not occur immediately. Click here to learn how to bypass your browser's cache.
  • Google Chrome / Mozilla / Firefox / Safari: hold down Shift while clicking Reload, or press Ctrl-Shift-R (Cmd-Shift-R on Apple Mac);
  • Internet Explorer: hold Ctrl while clicking Refresh, or press Ctrl-F5;
  • Konqueror: simply click the Reload button, or press F5;
  • Opera users may need to completely clear their cache in Tools→Preferences.
//A very hackey way to fix a niche styling issue: 
//example markup:
// * this is a bullet point
//** this is a quote
// **this is a bullet point after a quote <-- this will have double bullet points
document.querySelectorAll('table').forEach(function (e) {
   if (e.nextElementSibling && e.nextElementSibling.nodeName === 'UL') {
    var sibling = e.nextElementSibling;
    if (sibling.childNodes[0].childNodes[0].nodeName === 'UL') {
    sibling.childNodes[0].classList.add('nodoublebullet');
    }
   }
})
document.styleSheets[0].insertRule(".nodoublebullet::marker {content: ''}")