No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 26: Line 26:
   });
   });
   element.addEventListener('click', (e) => {
   element.addEventListener('click', (e) => {
     // this will only get triggered on desktop
     // this will only get triggered on desktopg
     // because we call preventDefault for the "touchend" event
     // because we call preventDefault for the "touchend" event
     handler(e);
     handler(e);
Line 118: Line 118:
     var d = Math.floor(h / 24);
     var d = Math.floor(h / 24);
     return d + "d ago";
     return d + "d ago";
  }
  function jakeInjectStyles() {
    if (document.getElementById("jake-rc-style")) return;
    var style = document.createElement("style");
    style.id = "jake-rc-style";
    style.textContent =
      "#p-jake-recentchanges .vector-menu-heading{display:flex;align-items:center;justify-content:space-between;}" +
      "#p-jake-recentchanges .jake-rc-dot{width:8px;height:8px;border-radius:50%;background:#2da44e;box-shadow:0 0 0 2px rgba(45,164,78,.18);flex:0 0 auto;}" +
      "#p-jake-recentchanges .vector-menu-heading{font-size:.95em;}" +
      "#p-jake-recentchanges .vector-menu-content{font-size:.92em;}" +
      "#p-jake-recentchanges .jake-rc-meta{font-size:.85em;opacity:.85;}";
    document.head.appendChild(style);
   }
   }


Line 127: Line 141:
     if (!menu) return null;
     if (!menu) return null;
     if (document.getElementById("p-jake-recentchanges")) return null;
     if (document.getElementById("p-jake-recentchanges")) return null;
    jakeInjectStyles();


     var portlet = document.createElement("div");
     var portlet = document.createElement("div");
Line 134: Line 150:
     var heading = document.createElement("div");
     var heading = document.createElement("div");
     heading.className = "vector-menu-heading";
     heading.className = "vector-menu-heading";
     heading.textContent = "Recent changes";
 
     var headingText = document.createElement("span");
    headingText.textContent = "Recent changes";
 
    var dot = document.createElement("span");
    dot.className = "jake-rc-dot";
    dot.setAttribute("aria-hidden", "true");
    dot.title = "Live";
 
    heading.appendChild(headingText);
    heading.appendChild(dot);


     var content = document.createElement("div");
     var content = document.createElement("div");
Line 263: Line 289:
})();
})();
/* */
/* */
/*
(function () {
(function () {
   function jakeAddFeedbackToNamespaces() {
   function jakeAddFeedbackToNamespaces() {
Line 308: Line 335:
   }
   }
})();
})();
 
*/
/* */
/* */
(function () {
(function () {
Line 336: Line 363:
     }
     }


     add("https://discord.gg/8w5rSNAXRf", "Discord");
     // add("https://discord.gg/8w5rSNAXRf", "Discord");
     add("https://www.linkedin.com/company/fulu-foundation-usa", "LinkedIn");
     add("https://www.linkedin.com/company/consumer-rights-wiki/", "LinkedIn");
     add("https://x.com/FULUFoundation", "X");
     add("https://www.reddit.com/user/ConsumerRightsWiki/", "Reddit");


     places.parentNode.insertBefore(ul, places.nextSibling);
     places.parentNode.insertBefore(ul, places.nextSibling);