שיתוף | הורדה נוחה מיידיש 24
-
לדוברי היידיש מבנינו החובבים את קול מבשר!
כמו שאנחנו יודעים אין אפשרות רשמית להורדת קבצי שמע מהאתר, @LEVI-H יצר קוד להורדה בפוסט כאן, היות וזה לחלק מאתנו קצת קשה לאתר את הID של הקובץ, יצרתי בעזרתו הנדיבה של GPT קוד משלים לקוד של לוי
הקוד מאתר את הID של הקובץ שמופעל ברקע, מעביר את המשתמש לדף הורדת הקובץכפי שמופיע בקוד, ההורדה לא מתבצעת בלחיצה על הורדה בשלוש הנקודות, אלא קליק ימני ואז 'שמור אודיו בשם...'
אז איך אנחנו עושים את זה?
פשוט מאוד, מעתיקים את הקוד הזהjavascript:(function(){ function showToast(message) { let toast = document.createElement('div'); toast.textContent = message; toast.style.position = 'fixed'; toast.style.bottom = '20px'; toast.style.left = '50%'; toast.style.transform = 'translateX(-50%)'; toast.style.backgroundColor = '#333'; toast.style.color = 'white'; toast.style.padding = '12px 20px'; toast.style.borderRadius = '5px'; toast.style.fontSize = '16px'; toast.style.zIndex = '1000'; toast.style.boxShadow = '0 4px 8px rgba(0, 0, 0, 0.2)'; toast.style.textAlign = 'center'; document.body.appendChild(toast); setTimeout(function() { toast.style.opacity = '0'; setTimeout(function() { document.body.removeChild(toast); }, 500); }, 5000); } let interval = setInterval(function(){ let playingElement = document.querySelector('.playing-panel.audio.playing'); if (playingElement) { clearInterval(interval); let fileID = playingElement.getAttribute('data-id'); if (!fileID) { showToast("❌ לא נמצא ID בשיר המתנגן."); return; } let tempInput = document.createElement('input'); document.body.appendChild(tempInput); tempInput.value = fileID; tempInput.select(); document.execCommand('copy'); document.body.removeChild(tempInput); showToast("🎉 אנחנו כבר מעבירים אותך לדף ההורדה. 📥"); let p = document.querySelector('[data-id="' + fileID + '"]'); if (p) { let c = p.getAttribute('data-song-url'); if (c) { let newWindow = window.open('', '_blank'); newWindow.document.write('<div style="direction: rtl; font-family: Arial, sans-serif; background-color: #fafafa; padding: 40px; text-align: center; border-radius: 10px;">'); newWindow.document.write('<h2 style="font-size: 24px; color: #333; margin-bottom: 20px;">הורדה קלה ומהירה!</h2>'); newWindow.document.write('<p style="font-size: 18px; color: #555; margin-bottom: 20px;">כדי להוריד את הקובץ, יש לבצע קליק ימני על השיר המתנגן, ואז לבחור "שמור אודיו בשם..."</p>'); newWindow.document.write('<p style="font-size: 18px; color: #555; margin-bottom: 20px;">🚀 קרדיט להורדה מגיע ל <a href="https://mitmachim.top/user/levi-h" target="_blank" style="color: #4CAF50; text-decoration: none;">@LEVI H</a> בפוסט הזה: <a href="https://mitmachim.top/post/775406" target="_blank" style="color: #4CAF50; text-decoration: none;">הקישור לפוסט</a> 🎉</p>'); newWindow.document.write('<button id="proceedBtn" style="background-color: #4CAF50; color: white; font-size: 18px; padding: 12px 30px; border: none; border-radius: 5px; cursor: pointer; margin-top: 20px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); transition: background-color 0.3s;">המשך להורדה</button>'); newWindow.document.write('</div>'); let button = newWindow.document.getElementById('proceedBtn'); button.onmouseover = function() { button.style.backgroundColor = '#45a049'; }; button.onmouseout = function() { button.style.backgroundColor = '#4CAF50'; }; button.onclick = function() { let link = newWindow.document.createElement('a'); link.href = c; link.download = fileID + '.mp3'; link.click(); }; newWindow.document.close(); } else { showToast("❌ לא נמצא קובץ להורדה."); } } else { showToast("❌ לא נמצא קובץ להורדה."); } } }, 1000); })();
יוצרים סימניה חדשה, תנו לסימניה שם כלשהו, במקום הURL תעתיקו את הקוד הנ"ל.
כנסו לאתר יידיש 24, בחרו קובץ שאתם רוצים להוריד, הפעילו אותו ולחצו על הסימניה שיצרתם זה עתה.
בהצלחה!