Allows to download learning videos you see on LinkedIn. Must be logged in.
< Opinie na linkedIn learning video download
Move the download button to the bottom menu
Why didn't you move the DL button to the bottom menu, so that we can watch full screen? Here is the code, simplified and changed:
$('body').ready(function(){ (function() { var downloadbutton = `<div class="video-playertoolbar-menu"> <button id="dlbtn" title="Download video" class="add-menu-dropdowntrigger btn-tertiary btn-large dropdown-trigger ember-view"> DL DL Vid `; addDownloadButton = function(){ $('.ssplayer-right-actions').prepend(downloadbutton); $('#dlbtn').wrap(''); $('#dlbtn').unbind(); $('#dlbtn').children().unbind(); }; checkIfReadyToLoad = function(){ if($('.ssplayer-right-actions').length && $('#dlbtn').length == 0){ addDownloadButton(); } else{ setTimeout(checkIfReadyToLoad,1000); } }; checkIfReadyToLoad(); checkForVideoPlayer = function(){ if($('.video-container video').length){ var vidsource = $('video').attr('src'); $('#dllink').attr('href', vidsource); var vidname = vidsource; $('#dllink').attr('download', vidname); } else { } }; $('body').on('mouseover', '#dlbtn', function(){ checkForVideoPlayer(); }); $('body').on('mouseover', '.course-body_content', function(){ checkIfReadyToLoad(); });
})();
});
Zaloguj się, by odpowiedzieć.
Move the download button to the bottom menu
Why didn't you move the DL button to the bottom menu, so that we can watch full screen? Here is the code, simplified and changed:
$('body').ready(function(){ (function() { var downloadbutton = `<div class="video-playertoolbar-menu"> <button id="dlbtn" title="Download video" class="add-menu-dropdowntrigger btn-tertiary btn-large dropdown-trigger ember-view"> DL DL Vid `; addDownloadButton = function(){ $('.ssplayer-right-actions').prepend(downloadbutton); $('#dlbtn').wrap(''); $('#dlbtn').unbind(); $('#dlbtn').children().unbind(); }; checkIfReadyToLoad = function(){ if($('.ssplayer-right-actions').length && $('#dlbtn').length == 0){ addDownloadButton(); } else{ setTimeout(checkIfReadyToLoad,1000); } }; checkIfReadyToLoad(); checkForVideoPlayer = function(){ if($('.video-container video').length){ var vidsource = $('video').attr('src'); $('#dllink').attr('href', vidsource); var vidname = vidsource; $('#dllink').attr('download', vidname); } else { } }; $('body').on('mouseover', '#dlbtn', function(){ checkForVideoPlayer(); }); $('body').on('mouseover', '.course-body_content', function(){ checkIfReadyToLoad(); });
})();
});