Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Youtube
- // @namespace Youtube
- // @description +
- // @version 0.1
- // @author anon
- // @grant none
- // @include http://www.youtube.com/*
- // @include https://www.youtube.com/*
- // ==/UserScript==
- function ready() {
- if (document.getElementsByClassName('message')[0].innerHTML.indexOf('Видео удалено')!=-1) {
- document.location.href='https://webcache.googleusercontent.com/search?q=cache:'+document.location.href;
- }
- if (document.location.href.indexOf('/watch?')!=-1) {
- //Удаление плейлистов
- if (document.location.href.indexOf('list=')!=-1) {
- var video_id=window.location.search.split('v=')[1];
- document.location.href='https://www.youtube.com/watch?v='+video_id.substring(0, video_id.indexOf('&'));
- }
- //Добавление кнопок
- document.getElementById('watch-uploader-info').innerHTML='<form style="padding:0;float:left;"><button onclick="javascript:document.location=\'http://convert2mp3.net/addon_call.php?url=\'+document.location.href+\'&format=mp3\'" style="margin-bottom:8px;" role="button" type="button" class="under-movie-div-button yt-uix-button yt-uix-button-text yt-uix-tooltip"><span>Скачать аудио</span></button></form>'+
- '<form action="http://www.vidtomp3.com/process.php" method="post" style="padding:0;float:left;"><input style="display:none;" type="text" name="url" value='+document.location.href+'><button style="margin-bottom:8px;" role="button" type="submit" class="under-movie-div-button yt-uix-button yt-uix-button-text yt-uix-tooltip"><span>Скачать аудио 2</span></button></form>'+
- '<button onclick="javascript:window.location=\'http://ru.savefrom.net/#url='+document.URL+'\';" style="margin-bottom:8px;" role="button" class="under-movie-div-button yt-uix-button yt-uix-button-text yt-uix-tooltip"><span>Скачать видео</span></button><div style="float:none;"></div>'+document.getElementById('watch-uploader-info').innerHTML;
- }
- }
- document.addEventListener("DOMContentLoaded", ready);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement