Inbox button canardpc.com

12/03/2025 19:04:17

  1. // ==UserScript==
  2. // @name Inbox button canardpc.com
  3. // @name:fr Bouton "Tableau de bord" canardpc.com
  4. // @description:fr 12/03/2025 19:04:17
  5. // @namespace Violentmonkey Scripts
  6. // @match https://forum.canardpc.com/*
  7. // @grant none
  8. // @version 1.0
  9. // @author sangoon
  10. // @license MIT
  11. // @description 12/03/2025 19:04:17
  12. // ==/UserScript==;;
  13. const i = document.createElement('i');
  14. i.className = 'b-icon-fa b-icon-fa--32 fa-solid fa-inbox';
  15. const a = document.createElement('a');
  16. a.href = 'https://forum.canardpc.com/search?searchJSON=%7B%22view%22%3A%22topic%22%2C%22unread_only%22%3A1%2C%22sort%22%3A%7B%22lastcontent%22%3A%22desc%22%7D%2C%22exclude_type%22%3A%5B%22vBForum_PrivateMessage%22%5D%2C%22my_following%22%3A%221%22%7D';
  17. a.appendChild(i);
  18. const li = document.createElement('li');
  19. li.className = 'b-top-menu__item js-shrink-event-child';
  20. li.appendChild(a);
  21. document.querySelector("#vb-page-body > nav > div > ul").prepend(li);
  22.  
  23. const stickTopMenuBtn = document.querySelector("#stick-topmenu-btn")
  24. stickTopMenuBtn.className = 'b-icon-fa b-icon-fa--32 fa-solid fa-thumbtack';
  25. stickTopMenuBtn.style = 'opacity: 1; cursor: pointer;';