torrent-online 1.7.6 → 1.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/package.json +1 -1
- package/wtui.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Формат — [Keep a Changelog](https://keepachangelog.com/ru/1.1.0/), версии — [Semantic Versioning](https://semver.org/lang/ru/).
|
|
4
4
|
|
|
5
|
+
## [1.7.7] — 2026-10-04
|
|
6
|
+
**RU:** Поиск снова живой. Страница больше не падает с `Invalid regular expression: /+/g`.
|
|
7
|
+
**EN:** Search works again. The page no longer dies on `Invalid regular expression: /+/g`.
|
|
8
|
+
- 🐛 С 1.7.3 имя из magnet писалось через `/+/g` внутри шаблона, слэш съедался, и браузер отказывался выполнять весь скрипт страницы. Кнопка «Искать» из-за этого молчала и в Chrome, и в Safari
|
|
9
|
+
|
|
5
10
|
## [1.7.6] — 2026-10-04
|
|
6
11
|
**RU:** Браузер играет как обычный ролик: стабильное время, перемотка, смена дорожки. Окно с поиском открывается само. Кэш стирает кнопка.
|
|
7
12
|
**EN:** The browser plays a normal VOD title: stable duration, seek, and audio-track switch. The search window opens on launch. Cache is cleared by a button.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "torrent-online",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Stream .torrent / magnet to VLC or browser — torrent streaming for macOS/Linux without a torrent client. Стрим торрентов в VLC или браузер.",
|
|
6
6
|
"keywords": [
|
package/wtui.js
CHANGED
|
@@ -605,7 +605,7 @@ function esc(s){return String(s).replace(/[&<>"']/g,function(c){return {'&':'&am
|
|
|
605
605
|
function api(p,body){var o=body?{method:'POST',headers:{'content-type':'application/json'},body:JSON.stringify(body)}:undefined;return fetch(BASE+p,o).then(function(r){return r.json();});}
|
|
606
606
|
function addTorrent(mag){
|
|
607
607
|
var box=document.getElementById('torrents');
|
|
608
|
-
var dn=(/dn=([^&]*)/.exec(mag)||[,''])[1];try{dn=decodeURIComponent(dn.replace(
|
|
608
|
+
var dn=(/dn=([^&]*)/.exec(mag)||[,''])[1];try{dn=decodeURIComponent(dn.replace(/\\+/g,' '))}catch(e){}
|
|
609
609
|
var ph=document.createElement('div');ph.className='card';
|
|
610
610
|
ph.innerHTML='<div class=tname>⏳ '+esc(dn||'торрент')+'</div><div class=tmeta>добавляю в клиент…</div>';
|
|
611
611
|
box.prepend(ph);
|
|
@@ -632,9 +632,9 @@ document.addEventListener('dragover',function(e){e.preventDefault();document.bod
|
|
|
632
632
|
document.addEventListener('dragleave',function(e){if(e.target===document.body||e.relatedTarget===null)document.body.classList.remove('drop');});
|
|
633
633
|
document.addEventListener('drop',function(e){e.preventDefault();document.body.classList.remove('drop');
|
|
634
634
|
var fs=e.dataTransfer.files||[];
|
|
635
|
-
for(var i=0;i<fs.length;i++){if(
|
|
635
|
+
for(var i=0;i<fs.length;i++){if(/\\.torrent$/i.test(fs[i].name)){uploadFile(fs[i]);return;}}
|
|
636
636
|
var t=(e.dataTransfer.getData('text/uri-list')||'')+(e.dataTransfer.getData('text/plain')||'');
|
|
637
|
-
var mm=t.match(/magnet
|
|
637
|
+
var mm=t.match(/magnet:\\?[^\\s]+/);if(mm){addTorrent(mm[0]);}
|
|
638
638
|
});
|
|
639
639
|
function render(list){var box=document.getElementById('torrents');
|
|
640
640
|
if(!list.length){box.innerHTML='<div class=note>Пусто. Найди торрент и кликни по строке.</div>';return;}
|