Guest User

Untitled

a guest
Apr 15th, 2026
78
0
Never
9
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.81 KB | None | 0 0
  1. // ==UserScript==
  2. // @name JVCED 1.2
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.2
  5. // @description Modifie le CSS et certains éléments du forum jeuxvideo.com
  6. // @match *://www.jeuxvideo.com/*
  7. // @grant GM_addStyle
  8. // ==/UserScript==
  9.  
  10. GM_addStyle(`
  11. .messageUser__actionIcon.icon-topic-restore::before {
  12. color: green;
  13. }
  14. .tablesForum__subjectText {
  15. font-size: 13px !important;
  16. }
  17.  
  18. .message__urlImg {
  19. max-width: 140px !important;
  20. }
  21.  
  22. .tablesForum__cellParticipants {
  23. gap: 0 !important;
  24. display: flex !important;
  25. align-items: center !important;
  26. font-size: 13px !important;
  27. white-space: nowrap !important;
  28. }
  29. .tablesForum__cellAuthor {
  30. font-size: 13px !important;
  31. }
  32. .tablesForum__cellLink {
  33. font-size: 13px !important;
  34. }
  35. .sideCardForum__listItemLink {
  36. font-size: 13px !important;
  37. }
  38. .tablesForum__cellText {
  39. font-size: 13px !important;
  40. }
  41. .titleMessagesUsers__title {
  42. font-size: 20px !important;
  43. }
  44. .pagination__item {
  45. font-size: 13px !important;
  46. }
  47. .buttonsNavbar__label {
  48. font-size: 13px !important;
  49. }
  50. .messageUser__label {
  51. font-size: 17px !important;
  52. }
  53. .pagination__button {
  54. font-size: 13px !important;
  55. }
  56. .sideCardForum__body--has-scrollbar {
  57. max-height: 70.25rem !important;
  58. }
  59. .survey__addSurvey {
  60. font-size: 13px !important;
  61. }
  62. .topicTitle__input {
  63. font-size: 13px !important;
  64. }
  65. .forumSearchBar__selectSearchInput {
  66. font-size: 13px !important;
  67. }
  68.  
  69. /* 1. On rend le conteneur du message positionnable */
  70. .bloc-message-forum {
  71. position: relative;
  72. }
  73.  
  74. /* 2. On remonte le footer (boutons) en haut à droite */
  75. .messageUser__footer {
  76. position: absolute;
  77. top: 8px;
  78. right: 45px;
  79. display: flex;
  80. gap: 6px;
  81. padding: 0;
  82. background: none;
  83. border: none;
  84. }
  85.  
  86. /* 1. On rend le conteneur du message positionnable */
  87. .checkboxButton.messageUser__checkbox{
  88. position: absolute;
  89. bottom: -14px;
  90. left: 24px;
  91. }
  92.  
  93. .messageUser__actionIcon::before {
  94. display: block;
  95. position: absolute;
  96. right: 30px;
  97. inset: 0; /* remplit exactement la zone du bouton */
  98. pointer-events: none; /* évite les clics fantômes */
  99. }
  100.  
  101.  
  102.  
  103.  
  104. .tablesForum__bodyRow {
  105. padding-top: 4px;
  106. padding-bottom: 4px;
  107. }
  108.  
  109. /* 3. On enlève l’espace vide laissé en bas */
  110. .messageUser__footer::before {
  111. display: none;
  112. }
  113. .forumSearchBar__formInput {
  114. font-size: 13px !important;
  115. }
  116. .postMessage__label {
  117. font-size: 13px !important;
  118. }
  119. .tablesForum__cellAuthor .tablesForum__separator,
  120. .tablesForum__cellAuthor .tablesForum__remainingAvatars {
  121. display: none !important;
  122. }
  123. `);
  124.  
  125. (function () {
  126. 'use strict';
  127.  
  128. function applyJVCED() {
  129. document.querySelectorAll('.tablesForum__cellParticipants').forEach(block => {
  130. if (block.dataset.jvcedDone === '1') return;
  131.  
  132. const firstAvatar = block.querySelector('.tablesForum__firstAvatar');
  133. if (!firstAvatar) return;
  134.  
  135. const pseudo =
  136. firstAvatar.getAttribute('title') ||
  137. firstAvatar.querySelector('img')?.getAttribute('alt') ||
  138. firstAvatar.textContent.trim();
  139.  
  140. if (!pseudo) return;
  141.  
  142. block.textContent = pseudo;
  143. block.dataset.jvcedDone = '1';
  144. });
  145.  
  146. document.querySelectorAll('.tablesForum__rowParticipants').forEach(el => {
  147. if (el.textContent.trim() === 'Participants') {
  148. el.textContent = 'Auteur';
  149. }
  150. });
  151. }
  152.  
  153. applyJVCED();
  154.  
  155. const observer = new MutationObserver(() => {
  156. applyJVCED();
  157. });
  158.  
  159. observer.observe(document.body, {
  160. childList: true,
  161. subtree: true
  162. });
  163. })();
  164.  
  165. (function() {
  166. 'use strict';
  167.  
  168. function colorerBoutons() {
  169. // 1. Bouton KICK (icon-kick) -> ORANGE
  170. document.querySelectorAll('.messageUser__actionIcon.icon-kick').forEach(icon => {
  171. // Appliquer une teinte orange à l'icône (si c'est une police ou une image SVG)
  172. icon.style.color = '#FF8C00';
  173. icon.style.filter = 'invert(50%) sepia(100%) saturate(2000%) hue-rotate(350deg) brightness(0.9)';
  174.  
  175. // Pour le parent (bouton), juste une bordure subtile
  176. const parentBtn = icon.closest('.messageUser__action');
  177. if (parentBtn && !parentBtn.hasAttribute('data-colored')) {
  178. parentBtn.style.border = 'none';
  179. parentBtn.style.borderRadius = 'none';
  180. parentBtn.style.padding = '2px';
  181. parentBtn.setAttribute('data-colored', 'true');
  182. }
  183. });
  184.  
  185. // 2. Bouton SUPPRIMER (icon-trash) -> ROUGE
  186. document.querySelectorAll('.messageUser__actionIcon.icon-trash').forEach(icon => {
  187. icon.style.color = '#D32F2F';
  188. icon.style.filter = 'invert(30%) sepia(100%) saturate(2000%) hue-rotate(340deg) brightness(0.8)';
  189.  
  190. const parentBtn = icon.closest('.messageUser__action');
  191. if (parentBtn && !parentBtn.hasAttribute('data-colored')) {
  192. parentBtn.style.border = 'none';
  193. parentBtn.style.borderRadius = 'none';
  194. parentBtn.style.padding = '2px';
  195. parentBtn.setAttribute('data-colored', 'true');
  196. }
  197. });
  198. }
  199.  
  200. // Version alternative : juste une bordure colorée autour du bouton
  201. function injecterCSS() {
  202. const style = document.createElement('style');
  203. style.textContent = `
  204.  
  205. `;
  206. document.head.appendChild(style);
  207. }
  208.  
  209. // Exécuter les deux méthodes
  210. injecterCSS();
  211. colorerBoutons();
  212.  
  213. // Observer les changements dynamiques
  214. const observateur = new MutationObserver(colorerBoutons);
  215. observateur.observe(document.body, { childList: true, subtree: true });
  216. })();
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment