דילוג לתוכן
  • חוקי הפורום
  • פופולרי
  • לא נפתר
  • משתמשים
  • חיפוש גוגל בפורום
  • צור קשר
עיצובים
  • בהיר
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • כהה
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • ברירת מחדל (ללא עיצוב (ברירת מחדל))
  • ללא עיצוב (ברירת מחדל)
כיווץ
מתמחים טופ
  1. דף הבית
  2. אזור המערכת
  3. אופן השימוש בפורום
  4. המלצה | סקריפט לטמפרמונקי לסינון הנושאים לפי סוג! (מדריך, בעיה וכו')

המלצה | סקריפט לטמפרמונקי לסינון הנושאים לפי סוג! (מדריך, בעיה וכו')

מתוזמן נעוץ נעול הועבר אופן השימוש בפורום
8 פוסטים 3 כותבים 57 צפיות 5 עוקבים
  • מהישן לחדש
  • מהחדש לישן
  • הכי הרבה הצבעות
תגובה
  • תגובה כנושא
התחברו כדי לפרסם תגובה
נושא זה נמחק. רק משתמשים עם הרשאות מתאימות יוכלו לצפות בו.
  • מחנה ידידיםמ מנותק
    מחנה ידידיםמ מנותק
    מחנה ידידים
    כתב נערך לאחרונה על ידי מחנה ידידים
    #1

    תודה לperplexity 😄

    // ==UserScript==
    // @name         מתמחים טופ - סינון נושאים לפי תגיות (ריבוי תגיות + טעינה דינמית)
    // @namespace    http://tampermonkey.net/
    // @version      3.0
    // @description  סינון <li class="category-item"> בדף user/*/topics לפי תגיות span (המלצה, בקשה וכו'), כולל נושאים שנוספים בגלילה/דפדוף.‏
    // @match        https://mitmachim.top/user/*/topics
    // @match        https://www.mitmachim.top/user/*/topics
    // @grant        none
    // ==/UserScript==
    
    (function () {
      'use strict';
    
      // --- עזר בסיסי ---
    
      function getTagFromRow(row) {
        const link = row.querySelector('h3[component="topic/header"] a.text-reset');
        if (!link) return '';
        const span = link.querySelector('span');
        if (!span) return '';
        const clone = span.cloneNode(true);
        clone.querySelectorAll('i, svg').forEach(el => el.remove());
        return clone.textContent.replace(/\s+/g, ' ').trim();
      }
    
      function slugifyTag(tag) {
        return tag
          .replace(/\s+/g, '-')                 // רווחים -> מקף
          .replace(/[^\w\u0590-\u05FF-]/g, ''); // מסיר תווים בעייתיים (משאיר אותיות/ספרות/עברית/מקף)
      }
    
      // --- מצב גלובלי ---
    
      let currentRows = [];
      let currentTagInfos = [];
      let filterPanel = null;
    
      function getSelectedSlugs() {
        if (!filterPanel) return [];
        return Array.from(filterPanel.querySelectorAll('input[type="checkbox"]:checked'))
          .map(chk => chk.value);
      }
    
      // --- תיוג שורות לפי תגיות ---
    
      function addTagClasses(rows) {
        const tagSet = new Set();
    
        rows.forEach(row => {
          const tag = getTagFromRow(row);
          if (!tag) return;
    
          const slug = slugifyTag(tag);
          row.classList.add('topic-tag-' + slug);
          tagSet.add(JSON.stringify({ tag, slug }));
        });
    
        return Array.from(tagSet).map(str => JSON.parse(str));
      }
    
      // --- יצירת / עדכון פאנל סינון ---
    
      function ensureGlobalCSS() {
        if (document.getElementById('topics-tag-filter-css')) return;
    
        const css = `
          li.category-item[component="category/topic"] {
            display: flex;
          }
    
          body.has-topic-filter li.category-item[component="category/topic"] {
            display: none !important;
          }
    
          body.has-topic-filter li.category-item[component="category/topic"].topic-tag-selected {
            display: flex !important;
          }
        `;
        const style = document.createElement('style');
        style.id = 'topics-tag-filter-css';
        style.textContent = css;
        document.documentElement.appendChild(style);
      }
    
      function createOrUpdateFilterPanel(list, tagInfos) {
        ensureGlobalCSS();
    
        if (!filterPanel) {
          // יצירה ראשונית
          const panel = document.createElement('div');
          panel.style.margin = '10px 0';
          panel.style.padding = '10px';
          panel.style.border = '1px solid #ccc';
          panel.style.background = '#f9f9f9';
          panel.style.display = 'flex';
          panel.style.flexWrap = 'wrap';
          panel.style.alignItems = 'center';
          panel.style.gap = '8px';
          panel.style.direction = 'rtl';
    
          const title = document.createElement('span');
          title.textContent = 'סינון לפי תגיות נושא:';
          title.style.fontWeight = 'bold';
          panel.appendChild(title);
    
          const clearBtn = document.createElement('button');
          clearBtn.type = 'button';
          clearBtn.textContent = 'הכול';
          clearBtn.style.marginInlineStart = '8px';
          clearBtn.style.padding = '2px 6px';
          clearBtn.style.fontSize = '12px';
          clearBtn.addEventListener('click', () => {
            panel.querySelectorAll('input[type="checkbox"]').forEach(chk => chk.checked = false);
            applyFilter([]); // אין תגיות מסומנות
          });
          panel.appendChild(clearBtn);
    
          const tagsContainer = document.createElement('div');
          tagsContainer.className = 'tags-container';
          tagsContainer.style.display = 'flex';
          tagsContainer.style.flexWrap = 'wrap';
          tagsContainer.style.gap = '6px';
          tagsContainer.style.alignItems = 'center';
          panel.appendChild(tagsContainer);
    
          const note = document.createElement('span');
          note.textContent = ' (אפשר לבחור כמה תגיות; מוצגים נושאים שיש להם לפחות אחת מהן)';
          note.style.fontSize = '11px';
          note.style.color = '#666';
          note.style.width = '100%';
          panel.appendChild(note);
    
          list.parentElement.insertBefore(panel, list);
    
          panel.addEventListener('change', () => {
            const selected = getSelectedSlugs();
            applyFilter(selected);
          });
    
          filterPanel = panel;
        }
    
        // עדכון רשימת הצ'קבוקסים (איחוד תגיות מכל העמוד/גלילות)
        const tagsContainer = filterPanel.querySelector('.tags-container');
        const existingSlugs = new Set(Array.from(tagsContainer.querySelectorAll('input[type="checkbox"]')).map(chk => chk.value));
        const selectedBefore = new Set(getSelectedSlugs());
    
        tagInfos.forEach(info => {
          if (existingSlugs.has(info.slug)) return;
          const wrapper = document.createElement('label');
          wrapper.style.display = 'flex';
          wrapper.style.alignItems = 'center';
          wrapper.style.gap = '4px';
          wrapper.style.fontSize = '12px';
    
          const chk = document.createElement('input');
          chk.type = 'checkbox';
          chk.value = info.slug;
          if (selectedBefore.has(info.slug)) chk.checked = true;
    
          const span = document.createElement('span');
          span.textContent = info.tag;
    
          wrapper.appendChild(chk);
          wrapper.appendChild(span);
          tagsContainer.appendChild(wrapper);
        });
      }
    
      // --- סינון בפועל ---
    
      function applyFilter(selectedSlugs) {
        const rows = currentRows;
        if (!rows.length) return;
    
        if (!selectedSlugs || !selectedSlugs.length) {
          document.body.classList.remove('has-topic-filter');
          rows.forEach(row => {
            row.classList.remove('topic-tag-selected');
            row.style.display = 'flex';
          });
          return;
        }
    
        document.body.classList.add('has-topic-filter');
    
        rows.forEach(row => {
          const hasAny = selectedSlugs.some(slug => row.classList.contains('topic-tag-' + slug));
          if (hasAny) {
            row.classList.add('topic-tag-selected');
          } else {
            row.classList.remove('topic-tag-selected');
          }
        });
      }
    
      // --- סריקה מחדש של הדף (לדף חדש / גלילה חדשה) ---
    
      function rescan() {
        const root = document.querySelector('#ajaxify') || document.querySelector('#content') || document.body;
        if (!root) return;
    
        const rows = Array.from(root.querySelectorAll('li.category-item[component="category/topic"]'));
        if (!rows.length) return;
    
        currentRows = rows;
    
        const tagInfos = addTagClasses(rows);
        currentTagInfos = mergeTagInfos(currentTagInfos, tagInfos);
    
        const list = rows[0].parentElement;
        createOrUpdateFilterPanel(list, currentTagInfos);
    
        // להחיל מחדש את הסינון לפי מה שכבר מסומן
        const selected = getSelectedSlugs();
        if (selected.length) {
          applyFilter(selected);
        }
      }
    
      function mergeTagInfos(oldInfos, newInfos) {
        const map = new Map();
        [...oldInfos, ...newInfos].forEach(info => {
          map.set(info.slug, info);
        });
        return Array.from(map.values());
      }
    
      // --- התחלה + MutationObserver לטעינה דינמית ---
    
      function start() {
        rescan();
    
        const ajaxify = document.querySelector('#ajaxify') || document.querySelector('#content') || document.body;
        if (!ajaxify) return;
    
        const observer = new MutationObserver((mutations) => {
          // כל שינוי משמעותי ב־childList גורר rescan
          if (mutations.some(m => m.type === 'childList' && m.addedNodes.length)) {
            rescan();
          }
        });
    
        observer.observe(ajaxify, { childList: true, subtree: true });
      }
    
      if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', start);
      } else {
        start();
      }
    })();
    

    @הנני-העני

    ח מ 2 תגובות תגובה אחרונה
    3
    • מחנה ידידיםמ מחנה ידידים

      תודה לperplexity 😄

      // ==UserScript==
      // @name         מתמחים טופ - סינון נושאים לפי תגיות (ריבוי תגיות + טעינה דינמית)
      // @namespace    http://tampermonkey.net/
      // @version      3.0
      // @description  סינון <li class="category-item"> בדף user/*/topics לפי תגיות span (המלצה, בקשה וכו'), כולל נושאים שנוספים בגלילה/דפדוף.‏
      // @match        https://mitmachim.top/user/*/topics
      // @match        https://www.mitmachim.top/user/*/topics
      // @grant        none
      // ==/UserScript==
      
      (function () {
        'use strict';
      
        // --- עזר בסיסי ---
      
        function getTagFromRow(row) {
          const link = row.querySelector('h3[component="topic/header"] a.text-reset');
          if (!link) return '';
          const span = link.querySelector('span');
          if (!span) return '';
          const clone = span.cloneNode(true);
          clone.querySelectorAll('i, svg').forEach(el => el.remove());
          return clone.textContent.replace(/\s+/g, ' ').trim();
        }
      
        function slugifyTag(tag) {
          return tag
            .replace(/\s+/g, '-')                 // רווחים -> מקף
            .replace(/[^\w\u0590-\u05FF-]/g, ''); // מסיר תווים בעייתיים (משאיר אותיות/ספרות/עברית/מקף)
        }
      
        // --- מצב גלובלי ---
      
        let currentRows = [];
        let currentTagInfos = [];
        let filterPanel = null;
      
        function getSelectedSlugs() {
          if (!filterPanel) return [];
          return Array.from(filterPanel.querySelectorAll('input[type="checkbox"]:checked'))
            .map(chk => chk.value);
        }
      
        // --- תיוג שורות לפי תגיות ---
      
        function addTagClasses(rows) {
          const tagSet = new Set();
      
          rows.forEach(row => {
            const tag = getTagFromRow(row);
            if (!tag) return;
      
            const slug = slugifyTag(tag);
            row.classList.add('topic-tag-' + slug);
            tagSet.add(JSON.stringify({ tag, slug }));
          });
      
          return Array.from(tagSet).map(str => JSON.parse(str));
        }
      
        // --- יצירת / עדכון פאנל סינון ---
      
        function ensureGlobalCSS() {
          if (document.getElementById('topics-tag-filter-css')) return;
      
          const css = `
            li.category-item[component="category/topic"] {
              display: flex;
            }
      
            body.has-topic-filter li.category-item[component="category/topic"] {
              display: none !important;
            }
      
            body.has-topic-filter li.category-item[component="category/topic"].topic-tag-selected {
              display: flex !important;
            }
          `;
          const style = document.createElement('style');
          style.id = 'topics-tag-filter-css';
          style.textContent = css;
          document.documentElement.appendChild(style);
        }
      
        function createOrUpdateFilterPanel(list, tagInfos) {
          ensureGlobalCSS();
      
          if (!filterPanel) {
            // יצירה ראשונית
            const panel = document.createElement('div');
            panel.style.margin = '10px 0';
            panel.style.padding = '10px';
            panel.style.border = '1px solid #ccc';
            panel.style.background = '#f9f9f9';
            panel.style.display = 'flex';
            panel.style.flexWrap = 'wrap';
            panel.style.alignItems = 'center';
            panel.style.gap = '8px';
            panel.style.direction = 'rtl';
      
            const title = document.createElement('span');
            title.textContent = 'סינון לפי תגיות נושא:';
            title.style.fontWeight = 'bold';
            panel.appendChild(title);
      
            const clearBtn = document.createElement('button');
            clearBtn.type = 'button';
            clearBtn.textContent = 'הכול';
            clearBtn.style.marginInlineStart = '8px';
            clearBtn.style.padding = '2px 6px';
            clearBtn.style.fontSize = '12px';
            clearBtn.addEventListener('click', () => {
              panel.querySelectorAll('input[type="checkbox"]').forEach(chk => chk.checked = false);
              applyFilter([]); // אין תגיות מסומנות
            });
            panel.appendChild(clearBtn);
      
            const tagsContainer = document.createElement('div');
            tagsContainer.className = 'tags-container';
            tagsContainer.style.display = 'flex';
            tagsContainer.style.flexWrap = 'wrap';
            tagsContainer.style.gap = '6px';
            tagsContainer.style.alignItems = 'center';
            panel.appendChild(tagsContainer);
      
            const note = document.createElement('span');
            note.textContent = ' (אפשר לבחור כמה תגיות; מוצגים נושאים שיש להם לפחות אחת מהן)';
            note.style.fontSize = '11px';
            note.style.color = '#666';
            note.style.width = '100%';
            panel.appendChild(note);
      
            list.parentElement.insertBefore(panel, list);
      
            panel.addEventListener('change', () => {
              const selected = getSelectedSlugs();
              applyFilter(selected);
            });
      
            filterPanel = panel;
          }
      
          // עדכון רשימת הצ'קבוקסים (איחוד תגיות מכל העמוד/גלילות)
          const tagsContainer = filterPanel.querySelector('.tags-container');
          const existingSlugs = new Set(Array.from(tagsContainer.querySelectorAll('input[type="checkbox"]')).map(chk => chk.value));
          const selectedBefore = new Set(getSelectedSlugs());
      
          tagInfos.forEach(info => {
            if (existingSlugs.has(info.slug)) return;
            const wrapper = document.createElement('label');
            wrapper.style.display = 'flex';
            wrapper.style.alignItems = 'center';
            wrapper.style.gap = '4px';
            wrapper.style.fontSize = '12px';
      
            const chk = document.createElement('input');
            chk.type = 'checkbox';
            chk.value = info.slug;
            if (selectedBefore.has(info.slug)) chk.checked = true;
      
            const span = document.createElement('span');
            span.textContent = info.tag;
      
            wrapper.appendChild(chk);
            wrapper.appendChild(span);
            tagsContainer.appendChild(wrapper);
          });
        }
      
        // --- סינון בפועל ---
      
        function applyFilter(selectedSlugs) {
          const rows = currentRows;
          if (!rows.length) return;
      
          if (!selectedSlugs || !selectedSlugs.length) {
            document.body.classList.remove('has-topic-filter');
            rows.forEach(row => {
              row.classList.remove('topic-tag-selected');
              row.style.display = 'flex';
            });
            return;
          }
      
          document.body.classList.add('has-topic-filter');
      
          rows.forEach(row => {
            const hasAny = selectedSlugs.some(slug => row.classList.contains('topic-tag-' + slug));
            if (hasAny) {
              row.classList.add('topic-tag-selected');
            } else {
              row.classList.remove('topic-tag-selected');
            }
          });
        }
      
        // --- סריקה מחדש של הדף (לדף חדש / גלילה חדשה) ---
      
        function rescan() {
          const root = document.querySelector('#ajaxify') || document.querySelector('#content') || document.body;
          if (!root) return;
      
          const rows = Array.from(root.querySelectorAll('li.category-item[component="category/topic"]'));
          if (!rows.length) return;
      
          currentRows = rows;
      
          const tagInfos = addTagClasses(rows);
          currentTagInfos = mergeTagInfos(currentTagInfos, tagInfos);
      
          const list = rows[0].parentElement;
          createOrUpdateFilterPanel(list, currentTagInfos);
      
          // להחיל מחדש את הסינון לפי מה שכבר מסומן
          const selected = getSelectedSlugs();
          if (selected.length) {
            applyFilter(selected);
          }
        }
      
        function mergeTagInfos(oldInfos, newInfos) {
          const map = new Map();
          [...oldInfos, ...newInfos].forEach(info => {
            map.set(info.slug, info);
          });
          return Array.from(map.values());
        }
      
        // --- התחלה + MutationObserver לטעינה דינמית ---
      
        function start() {
          rescan();
      
          const ajaxify = document.querySelector('#ajaxify') || document.querySelector('#content') || document.body;
          if (!ajaxify) return;
      
          const observer = new MutationObserver((mutations) => {
            // כל שינוי משמעותי ב־childList גורר rescan
            if (mutations.some(m => m.type === 'childList' && m.addedNodes.length)) {
              rescan();
            }
          });
      
          observer.observe(ajaxify, { childList: true, subtree: true });
        }
      
        if (document.readyState === 'loading') {
          document.addEventListener('DOMContentLoaded', start);
        } else {
          start();
        }
      })();
      

      @הנני-העני

      ח מנותק
      ח מנותק
      חייא שיאומי
      כתב נערך לאחרונה על ידי
      #2

      @מחנה-ידידים אפשר טיפה יותר פירוט מה הסקריפט הזה עושה?

      מחנה ידידיםמ תגובה 1 תגובה אחרונה
      1
      • ח חייא שיאומי

        @מחנה-ידידים אפשר טיפה יותר פירוט מה הסקריפט הזה עושה?

        מחנה ידידיםמ מנותק
        מחנה ידידיםמ מנותק
        מחנה ידידים
        כתב נערך לאחרונה על ידי מחנה ידידים
        #3

        מוסיף תיבת סינון
        8d4c4d81-8aad-4ee1-b6d0-85368fda5549-image.jpeg

        ח תגובה 1 תגובה אחרונה
        1
        • מחנה ידידיםמ מחנה ידידים

          מוסיף תיבת סינון
          8d4c4d81-8aad-4ee1-b6d0-85368fda5549-image.jpeg

          ח מנותק
          ח מנותק
          חייא שיאומי
          כתב נערך לאחרונה על ידי
          #4

          @מחנה-ידידים יפה!
          האמת שחשבתי על זה למה אין את זה...
          בכ"א אין שם להורדה... למה?

          מחנה ידידיםמ תגובה 1 תגובה אחרונה
          0
          • ח חייא שיאומי

            @מחנה-ידידים יפה!
            האמת שחשבתי על זה למה אין את זה...
            בכ"א אין שם להורדה... למה?

            מחנה ידידיםמ מנותק
            מחנה ידידיםמ מנותק
            מחנה ידידים
            כתב נערך לאחרונה על ידי
            #5

            @חייא-שיאומי זה מציג לפי הנושאים שלך... אין לי נושא עם תג "להורדה"

            תגובה 1 תגובה אחרונה
            1
            • מחנה ידידיםמ מחנה ידידים

              תודה לperplexity 😄

              // ==UserScript==
              // @name         מתמחים טופ - סינון נושאים לפי תגיות (ריבוי תגיות + טעינה דינמית)
              // @namespace    http://tampermonkey.net/
              // @version      3.0
              // @description  סינון <li class="category-item"> בדף user/*/topics לפי תגיות span (המלצה, בקשה וכו'), כולל נושאים שנוספים בגלילה/דפדוף.‏
              // @match        https://mitmachim.top/user/*/topics
              // @match        https://www.mitmachim.top/user/*/topics
              // @grant        none
              // ==/UserScript==
              
              (function () {
                'use strict';
              
                // --- עזר בסיסי ---
              
                function getTagFromRow(row) {
                  const link = row.querySelector('h3[component="topic/header"] a.text-reset');
                  if (!link) return '';
                  const span = link.querySelector('span');
                  if (!span) return '';
                  const clone = span.cloneNode(true);
                  clone.querySelectorAll('i, svg').forEach(el => el.remove());
                  return clone.textContent.replace(/\s+/g, ' ').trim();
                }
              
                function slugifyTag(tag) {
                  return tag
                    .replace(/\s+/g, '-')                 // רווחים -> מקף
                    .replace(/[^\w\u0590-\u05FF-]/g, ''); // מסיר תווים בעייתיים (משאיר אותיות/ספרות/עברית/מקף)
                }
              
                // --- מצב גלובלי ---
              
                let currentRows = [];
                let currentTagInfos = [];
                let filterPanel = null;
              
                function getSelectedSlugs() {
                  if (!filterPanel) return [];
                  return Array.from(filterPanel.querySelectorAll('input[type="checkbox"]:checked'))
                    .map(chk => chk.value);
                }
              
                // --- תיוג שורות לפי תגיות ---
              
                function addTagClasses(rows) {
                  const tagSet = new Set();
              
                  rows.forEach(row => {
                    const tag = getTagFromRow(row);
                    if (!tag) return;
              
                    const slug = slugifyTag(tag);
                    row.classList.add('topic-tag-' + slug);
                    tagSet.add(JSON.stringify({ tag, slug }));
                  });
              
                  return Array.from(tagSet).map(str => JSON.parse(str));
                }
              
                // --- יצירת / עדכון פאנל סינון ---
              
                function ensureGlobalCSS() {
                  if (document.getElementById('topics-tag-filter-css')) return;
              
                  const css = `
                    li.category-item[component="category/topic"] {
                      display: flex;
                    }
              
                    body.has-topic-filter li.category-item[component="category/topic"] {
                      display: none !important;
                    }
              
                    body.has-topic-filter li.category-item[component="category/topic"].topic-tag-selected {
                      display: flex !important;
                    }
                  `;
                  const style = document.createElement('style');
                  style.id = 'topics-tag-filter-css';
                  style.textContent = css;
                  document.documentElement.appendChild(style);
                }
              
                function createOrUpdateFilterPanel(list, tagInfos) {
                  ensureGlobalCSS();
              
                  if (!filterPanel) {
                    // יצירה ראשונית
                    const panel = document.createElement('div');
                    panel.style.margin = '10px 0';
                    panel.style.padding = '10px';
                    panel.style.border = '1px solid #ccc';
                    panel.style.background = '#f9f9f9';
                    panel.style.display = 'flex';
                    panel.style.flexWrap = 'wrap';
                    panel.style.alignItems = 'center';
                    panel.style.gap = '8px';
                    panel.style.direction = 'rtl';
              
                    const title = document.createElement('span');
                    title.textContent = 'סינון לפי תגיות נושא:';
                    title.style.fontWeight = 'bold';
                    panel.appendChild(title);
              
                    const clearBtn = document.createElement('button');
                    clearBtn.type = 'button';
                    clearBtn.textContent = 'הכול';
                    clearBtn.style.marginInlineStart = '8px';
                    clearBtn.style.padding = '2px 6px';
                    clearBtn.style.fontSize = '12px';
                    clearBtn.addEventListener('click', () => {
                      panel.querySelectorAll('input[type="checkbox"]').forEach(chk => chk.checked = false);
                      applyFilter([]); // אין תגיות מסומנות
                    });
                    panel.appendChild(clearBtn);
              
                    const tagsContainer = document.createElement('div');
                    tagsContainer.className = 'tags-container';
                    tagsContainer.style.display = 'flex';
                    tagsContainer.style.flexWrap = 'wrap';
                    tagsContainer.style.gap = '6px';
                    tagsContainer.style.alignItems = 'center';
                    panel.appendChild(tagsContainer);
              
                    const note = document.createElement('span');
                    note.textContent = ' (אפשר לבחור כמה תגיות; מוצגים נושאים שיש להם לפחות אחת מהן)';
                    note.style.fontSize = '11px';
                    note.style.color = '#666';
                    note.style.width = '100%';
                    panel.appendChild(note);
              
                    list.parentElement.insertBefore(panel, list);
              
                    panel.addEventListener('change', () => {
                      const selected = getSelectedSlugs();
                      applyFilter(selected);
                    });
              
                    filterPanel = panel;
                  }
              
                  // עדכון רשימת הצ'קבוקסים (איחוד תגיות מכל העמוד/גלילות)
                  const tagsContainer = filterPanel.querySelector('.tags-container');
                  const existingSlugs = new Set(Array.from(tagsContainer.querySelectorAll('input[type="checkbox"]')).map(chk => chk.value));
                  const selectedBefore = new Set(getSelectedSlugs());
              
                  tagInfos.forEach(info => {
                    if (existingSlugs.has(info.slug)) return;
                    const wrapper = document.createElement('label');
                    wrapper.style.display = 'flex';
                    wrapper.style.alignItems = 'center';
                    wrapper.style.gap = '4px';
                    wrapper.style.fontSize = '12px';
              
                    const chk = document.createElement('input');
                    chk.type = 'checkbox';
                    chk.value = info.slug;
                    if (selectedBefore.has(info.slug)) chk.checked = true;
              
                    const span = document.createElement('span');
                    span.textContent = info.tag;
              
                    wrapper.appendChild(chk);
                    wrapper.appendChild(span);
                    tagsContainer.appendChild(wrapper);
                  });
                }
              
                // --- סינון בפועל ---
              
                function applyFilter(selectedSlugs) {
                  const rows = currentRows;
                  if (!rows.length) return;
              
                  if (!selectedSlugs || !selectedSlugs.length) {
                    document.body.classList.remove('has-topic-filter');
                    rows.forEach(row => {
                      row.classList.remove('topic-tag-selected');
                      row.style.display = 'flex';
                    });
                    return;
                  }
              
                  document.body.classList.add('has-topic-filter');
              
                  rows.forEach(row => {
                    const hasAny = selectedSlugs.some(slug => row.classList.contains('topic-tag-' + slug));
                    if (hasAny) {
                      row.classList.add('topic-tag-selected');
                    } else {
                      row.classList.remove('topic-tag-selected');
                    }
                  });
                }
              
                // --- סריקה מחדש של הדף (לדף חדש / גלילה חדשה) ---
              
                function rescan() {
                  const root = document.querySelector('#ajaxify') || document.querySelector('#content') || document.body;
                  if (!root) return;
              
                  const rows = Array.from(root.querySelectorAll('li.category-item[component="category/topic"]'));
                  if (!rows.length) return;
              
                  currentRows = rows;
              
                  const tagInfos = addTagClasses(rows);
                  currentTagInfos = mergeTagInfos(currentTagInfos, tagInfos);
              
                  const list = rows[0].parentElement;
                  createOrUpdateFilterPanel(list, currentTagInfos);
              
                  // להחיל מחדש את הסינון לפי מה שכבר מסומן
                  const selected = getSelectedSlugs();
                  if (selected.length) {
                    applyFilter(selected);
                  }
                }
              
                function mergeTagInfos(oldInfos, newInfos) {
                  const map = new Map();
                  [...oldInfos, ...newInfos].forEach(info => {
                    map.set(info.slug, info);
                  });
                  return Array.from(map.values());
                }
              
                // --- התחלה + MutationObserver לטעינה דינמית ---
              
                function start() {
                  rescan();
              
                  const ajaxify = document.querySelector('#ajaxify') || document.querySelector('#content') || document.body;
                  if (!ajaxify) return;
              
                  const observer = new MutationObserver((mutations) => {
                    // כל שינוי משמעותי ב־childList גורר rescan
                    if (mutations.some(m => m.type === 'childList' && m.addedNodes.length)) {
                      rescan();
                    }
                  });
              
                  observer.observe(ajaxify, { childList: true, subtree: true });
                }
              
                if (document.readyState === 'loading') {
                  document.addEventListener('DOMContentLoaded', start);
                } else {
                  start();
                }
              })();
              

              @הנני-העני

              מ מנותק
              מ מנותק
              מוצ'
              כתב נערך לאחרונה על ידי
              #6
              פוסט זה נמחק!
              מחנה ידידיםמ תגובה 1 תגובה אחרונה
              🤔
              0
              • מ מוצ'

                פוסט זה נמחק!

                מחנה ידידיםמ מנותק
                מחנה ידידיםמ מנותק
                מחנה ידידים
                כתב נערך לאחרונה על ידי מחנה ידידים
                #7

                @מוצ תרענן את https://mitmachim.top/me/topics

                מ תגובה 1 תגובה אחרונה
                🤓
                3
                • מחנה ידידיםמ מחנה ידידים

                  @מוצ תרענן את https://mitmachim.top/me/topics

                  מ מנותק
                  מ מנותק
                  מוצ'
                  כתב נערך לאחרונה על ידי
                  #8

                  @מחנה-ידידים יפה תודה!

                  תגובה 1 תגובה אחרונה
                  0

                  שלום! נראה שהשיחה הזו מעניינת אותך, אבל עדיין אין לך חשבון.

                  נמאס לכם לגלול בין אותם הפוסטים בכל ביקור? כשנרשמים לחשבון, תמיד תחזרו בדיוק למקום שבו הייתם קודם, ותוכלו לבחור לקבל התראות על תגובות חדשות (בין אם במייל, ובין אם בהתראת פוש). תוכלו גם לשמור סימניות ולפרגן ב-upvote לפוסטים כדי להביע הערכה לחברי קהילה אחרים.

                  בעזרת התרומה שלך, הפוסט הזה יכול להיות אפילו טוב יותר 💗

                  הרשמה התחברות

                  • התחברות

                  • אין לך חשבון עדיין? הרשמה

                  • התחברו או הירשמו כדי לחפש.
                  • פוסט ראשון
                    פוסט אחרון
                  0
                  • חוקי הפורום
                  • פופולרי
                  • לא נפתר
                  • משתמשים
                  • חיפוש גוגל בפורום
                  • צור קשר