Update tampermonkey_plugin.js

This commit is contained in:
Theenoro 2017-10-01 03:09:48 +02:00
parent 1155acf718
commit 82d2cc5bd6

View File

@ -1,25 +1,61 @@
// ==UserScript== // ==UserScript==
// @name Tampermonkey Plugin for Cyb3r Downloader // @name Cyber Downloader ADD
// @version 1.0 // @namespace http://tampermonkey.net/
// @description Tampermonkey Plugin for Cyb3r Downloader // @version 0.1
// @author Theenoro // @description try to take over the world!
// @require http://code.jquery.com/jquery-latest.js // @author You
// @require http://code.jquery.com/jquery-latest.js
// @require https://rawgit.com/notifyjs/notifyjs/master/dist/notify.js
// @match https://www.youtube.com/watch?v=* // @match https://www.youtube.com/watch?v=*
// @grant none // @grant none
// ==/UserScript== // ==/UserScript==
var css = `
<style>.notifyjs-corner {
top: 57px !important;
z-index: 99999;
}</style>
<button id="cb3_send" style="
background-color: transparent;
color: #FFF;
border: none;
cursor: pointer;
"><yt-iconx style=" display: inline-flex;
-ms-flex-align: center;
transform: rotate(180deg);
-webkit-align-items: center;
align-items: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
position: relative;
vertical-align: middle;
fill: var(--iron-icon-fill-color, currentcolor);
stroke: none;
width: var(--iron-icon-width, 24px);
height: var(--iron-icon-height, 24px);
margin-right: var(--iron-icon_-_margin-right);
width: var(--iron-icon_-_width, var(--iron-icon-width, 24px));
height: var(--iron-icon_-_height, var(--iron-icon-height, 24px));
margin-bottom: var(--iron-icon_-_margin-bottom);" class="style-scope ytd-button-renderer"><svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" class="style-scope yt-icon" style="pointer-events: none; display: block; width: 100%; height: 100%;"><g class="style-scope yt-icon">
<path d="M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z" class="style-scope yt-icon"></path>
</g></svg>
</yt-iconx> Send To Cyber</button>
`;
(function() { (function() {
'use strict'; 'use strict';
var s = jQuery.noConflict(); var s = jQuery.noConflict();
console.log('loaded'); console.log('loaded');
setTimeout(function(){ setTimeout(function(){
s('#end').prepend('<button id="cb3_send">Send To Cyber</button>'); s('#end').prepend(css);
},1000); },1000);
// Your code here... // Your code here...
s('body').delegate('#cb3_send','click',function(){ s('body').delegate('#cb3_send','click',function(){
var sy = window.location; var sy = window.location;
s.notify("Start Download", "info");
s.post( "http://127.0.0.1:54167/download?url="+encodeURI(sy),function() { s.post( "http://127.0.0.1:54167/download?url="+encodeURI(sy),function() {
}); });
}); });
})(); })();