Greasy Fork is available in English.

Highlight accounts whose questions or answers count > 0 on Stack Exchange profiles

Highlight divs with questions count>0 or answers count > 0 on Stack Exchange profiles

  1. // ==UserScript==
  2. // @name Highlight accounts whose questions or answers count > 0 on Stack Exchange profiles
  3. // @description Highlight divs with questions count>0 or answers count > 0 on Stack Exchange profiles
  4. // @name:ar إبراز الحسابات التي تحتوي على عدد أسئلة أو إجابات > 0 في ملفات Stack Exchange
  5. // @description:ar إبراز العناصر التي تحتوي على عدد أسئلة > 0 أو عدد إجابات > 0 في ملفات Stack Exchange
  6. // @name:cs Zvýraznění účtů s počtem otázek nebo odpovědí > 0 na profilech Stack Exchange
  7. // @description:cs Zvýrazňuje divy s počtem otázek > 0 nebo počtem odpovědí > 0 na profilech Stack Exchange
  8. // @name:da Fremhæv konti med antal spørgsmål eller svar > 0 på Stack Exchange-profiler
  9. // @description:da Fremhæver divs med antal spørgsmål > 0 eller antal svar > 0 på Stack Exchange-profiler
  10. // @name:de Hervorheben von Konten mit Fragen- oder Antwortzahlen > 0 auf Stack Exchange-Profilen
  11. // @description:de Hebt Divs mit Fragenanzahl > 0 oder Antwortanzahl > 0 auf Stack Exchange-Profilen hervor
  12. // @name:en Highlight accounts whose questions or answers count > 0 on Stack Exchange profiles
  13. // @description:en Highlight divs with questions count>0 or answers count > 0 on Stack Exchange profiles
  14. // @name:eo Emfazi Kontojn kun Demandoj aŭ Respondoj > 0 en Stack Exchange Profiloj
  15. // @description:eo Emfazas div-ojn kun nombro da demandoj > 0 aŭ nombro da respondoj > 0 en Stack Exchange-profiloj
  16. // @name:es Resaltar cuentas con conteo de preguntas o respuestas > 0 en perfiles de Stack Exchange
  17. // @description:es Resalta divs con conteo de preguntas > 0 o conteo de respuestas > 0 en perfiles de Stack Exchange
  18. // @name:fi Korosta tilejä, joilla on kysymyksiä tai vastauksia > 0 Stack Exchange -profiileissa
  19. // @description:fi Korostaa div-elementtejä, joissa kysymysten määrä > 0 tai vastausten määrä > 0 Stack Exchange -profiileissa
  20. // @name:he הדגש חשבונות שבהם מספר השאלות או התשובות > 0 בפרופילי Stack Exchange
  21. // @description:he הדגש divs עם מספר שאלות > 0 או מספר תשובות > 0 בפרופילי Stack Exchange
  22. // @name:hr Istakni račune s brojem pitanja ili odgovora > 0 na profilima Stack Exchange
  23. // @description:hr Istakni divove s brojem pitanja > 0 ili brojem odgovora > 0 na profilima Stack Exchange
  24. // @name:hu Kiemelje azokat a fiókokat, amelyeknek kérdései vagy válaszai száma > 0 a Stack Exchange profilokon
  25. // @description:hu Kiemeli a div-eket, ahol a kérdések száma > 0 vagy a válaszok száma > 0 a Stack Exchange profilokon
  26. // @name:id Sorot akun dengan jumlah pertanyaan atau jawaban > 0 di profil Stack Exchange
  27. // @description:id Sorot div dengan jumlah pertanyaan > 0 atau jumlah jawaban > 0 di profil Stack Exchange
  28. // @name:it Evidenzia account con conteggio domande o risposte > 0 sui profili Stack Exchange
  29. // @description:it Evidenzia i div con conteggio domande > 0 o conteggio risposte > 0 sui profili Stack Exchange
  30. // @name:ja Stack Exchangeプロフィールで質問または回答数が0を超えるアカウントを強調表示
  31. // @description:ja Stack Exchangeプロフィールで質問数が0を超えるか回答数が0を超えるdivを強調表示します
  32. // @name:ko Stack Exchange 프로필에서 질문 또는 답변 수가 0보다 큰 계정 강조
  33. // @description:ko Stack Exchange 프로필에서 질문 수가 0보다 크거나 답변 수가 0보다 큰 div를 강조 표시
  34. // @name:nb Uthev kontoer med antall spørsmål eller svar > 0 på Stack Exchange-profiler
  35. // @description:nb Uthever divs med antall spørsmål > 0 eller antall svar > 0 på Stack Exchange-profiler
  36. // @name:nl Markeer accounts met een aantal vragen of antwoorden > 0 op Stack Exchange-profielen
  37. // @description:nl Markeert divs met een aantal vragen > 0 of een aantal antwoorden > 0 op Stack Exchange-profielen
  38. // @name:pl Podświetl konta z liczbą pytań lub odpowiedzi > 0 na profilach Stack Exchange
  39. // @description:pl Podświetla divy z liczbą pytań > 0 lub liczbą odpowiedzi > 0 na profilach Stack Exchange
  40. // @name:pt-BR Destaque contas com contagem de perguntas ou respostas > 0 em perfis do Stack Exchange
  41. // @description:pt-BR Destaca divs com contagem de perguntas > 0 ou contagem de respostas > 0 em perfis do Stack Exchange
  42. // @name:ro Evidențiază conturile cu număr de întrebări sau răspunsuri > 0 pe profilurile Stack Exchange
  43. // @description:ro Evidențiază div-urile cu număr de întrebări > 0 sau număr de răspunsuri > 0 pe profilurile Stack Exchange
  44. // @name:sk Zvýraznenie účtov s počtom otázok alebo odpovedí > 0 na profiloch Stack Exchange
  45. // @description:sk Zvýrazňuje divy s počtom otázok > 0 alebo počtom odpovedí > 0 na profiloch Stack Exchange
  46. // @name:sv Markera konton med antal frågor eller svar > 0 på Stack Exchange-profiler
  47. // @description:sv Markerar divs med antal frågor > 0 eller antal svar > 0 på Stack Exchange-profiler
  48. // @name:th เน้นบัญชีที่มีจำนวนคำถามหรือคำตอบ > 0 บนโปรไฟล์ Stack Exchange
  49. // @description:th เน้น div ที่มีจำนวนคำถาม > 0 หรือจำนวนคำตอบ > 0 บนโปรไฟล์ Stack Exchange
  50. // @name:tr Stack Exchange profillerinde soru veya cevap sayısı > 0 olan hesapları vurgula
  51. // @description:tr Stack Exchange profillerinde soru sayısı > 0 veya cevap sayısı > 0 olan div’leri vurgular
  52. // @name:vi Làm nổi bật các tài khoản có số câu hỏi hoặc câu trả lời > 0 trên hồ sơ Stack Exchange
  53. // @description:vi Làm nổi bật các div có số câu hỏi > 0 hoặc số câu trả lời > 0 trên hồ sơ Stack Exchange
  54. // @name:zh 在 Stack Exchange 个人资料中高亮显示提问或回答数 > 0 的账户
  55. // @description:zh 在 Stack Exchange 个人资料中高亮显示提问数 > 0 或回答数 > 0 的 div
  56. // @name:zh-CN 在 Stack Exchange 个人资料中高亮显示提问或回答数 > 0 的账户
  57. // @description:zh-CN 在 Stack Exchange 个人资料中高亮显示提问数 > 0 或回答数 > 0 的 div
  58. // @name:zh-HK 喺 Stack Exchange 個人資料中突出顯示提問或回答數 > 0 嘅帳戶
  59. // @description:zh-HK 喺 Stack Exchange 個人資料中突出顯示提問數 > 0 或回答數 > 0 嘅 div
  60. // @name:zh-SG 在 Stack Exchange 个人资料中高亮显示提问或回答数 > 0 的账户
  61. // @description:zh-SG 在 Stack Exchange 个人资料中高亮显示提问数 > 0 或回答数 > 0 的 div
  62. // @name:zh-TW 在 Stack Exchange 個人資料中高亮顯示提問或回答數 > 0 的帳戶
  63. // @description:zh-TW 在 Stack Exchange 個人資料中高亮顯示提問數 > 0 或回答數 > 0 的 div
  64. // @namespace http://tampermonkey.net/
  65. // @version 0.1.2
  66. // @author aspen138
  67. // @match https://stackexchange.com/users/*/*?tab=accounts
  68. // @icon https://www.google.com/s2/favicons?sz=64&domain=stackexchange.com
  69. // @grant none
  70. // @license MIT
  71. // ==/UserScript==
  72.  
  73.  
  74. (function() {
  75. 'use strict';
  76.  
  77. // Define the highlight style
  78. const highlightStyle = 'background-color: yellow;'; // Change this to your preferred highlight style
  79.  
  80. // Function to check and highlight the div for questions or answers
  81. function highlightIfActive() {
  82. // Select all the account containers
  83. const accountContainers = document.querySelectorAll('.account-container');
  84.  
  85. accountContainers.forEach(container => {
  86. // Select the questions and answers counts based on their position
  87. const questions = container.querySelector('.account-stat:nth-last-child(3) .account-number');
  88. const answers = container.querySelector('.account-stat:nth-last-child(2) .account-number');
  89.  
  90. // Check if the questions or answers count is greater than 0 and apply the highlight
  91. if ((questions && parseInt(questions.textContent, 10) > 0) ||
  92. (answers && parseInt(answers.textContent, 10) > 0)) {
  93. container.style.cssText = highlightStyle;
  94. }
  95. else{
  96. // container.style.cssText = highlightStyle;
  97. }
  98. });
  99. }
  100.  
  101. // Run the highlight function
  102. highlightIfActive();
  103. })();