Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name TJ audio enabler
- // @version 1
- // @author Ebanit
- // @include https://tjournal.ru/*/*
- // @grant none
- // @run-at document-idle
- // ==/UserScript==
- (function() {
- 'use strict';
- let video = document.querySelector('video');
- let v_new = document.createElement('video');
- v_new.autoplay = true;
- v_new.controls = true;
- let source = document.createElement('source');
- source.setAttribute('src', video.childNodes[0].src);
- v_new.appendChild(source);
- video.parentNode.appendChild(v_new);
- video.parentNode.removeChild(video);
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement