Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Fix BitChute Video play Bug
- // @author nilk || https://bitchute.com/nilk
- // @version 1.0
- // @grant none
- // @include *://*.bitchute.com/video/*
- // ==/UserScript==
- //If a video doesn't play, reload the page and the fix will be applied.
- var videoTag = document.querySelector('video');
- var srcTag = videoTag.firstElementChild;
- var link = srcTag.src;
- //alternative seeds/subdomains //you can add some yourself, if these don't work
- var seedArray = [111, 118, 122, 124, 125, 126, 128, 129, 131, 132, 154, 305, 306, 'xvj21'];
- const regx = /https:\/\/([^"'.]*[^"'.]*).*?(?=.|$)/g;
- errorHandler();
- function errorHandler(){
- srcTag.remove();
- seedArray.forEach(seed => addSrc(seed));
- videoTag.appendChild(srcTag);
- videoTag.load();
- videoTag.play();
- }
- function addSrc(seed){
- let url = 'https://seed' + seed + link.replace(regx, '');
- let source = document.createElement('source');
- source.setAttribute('src', url);
- source.setAttribute('type', 'video/mp4');
- videoTag.appendChild(source);
- }
Advertisement
Add Comment
Please, Sign In to add comment