Spaces:
Running
Running
Download patch_extra.py from bep40/VNEWS: direct link, hf CLI and curl.
- Browser
- Download file 592 Bytes
-
https://huggingface.co/spaces/bep40/VNEWS/resolve/refs%2Fpr%2F3/patch_extra.py
- Command line
-
hf download hf://spaces/bep40/VNEWS@refs/pr/3/patch_extra.py
-
curl -L -o patch_extra.py https://huggingface.co/spaces/bep40/VNEWS/resolve/refs%2Fpr%2F3/patch_extra.py
592 Bytes
| """Extra UI fixes: tiktok-right position, kill duplicate slides, progress toast.""" | |
| EXTRA_FIX = r""" | |
| <script> | |
| (function(){ | |
| // Fix tiktok-right buttons position | |
| var rightBtns = document.querySelectorAll('.tiktok-right'); | |
| rightBtns.forEach(function(el){ el.style.bottom = '100px'; }); | |
| // Kill duplicate slides | |
| var slides = document.querySelectorAll('.tiktok-slide'); | |
| var seen = new Set(); | |
| slides.forEach(function(s){ | |
| var v = s.getAttribute('data-vid') || s.getAttribute('data-src'); | |
| if(v && seen.has(v)){ s.remove(); } else if(v){ seen.add(v); } | |
| }); | |
| })(); | |
| </script> | |
| """ | |