Greasy Fork is available in English.

linkedIn learning video download

Allows to download learning videos you see on LinkedIn. Must be logged in.

< Feedback on linkedIn learning video download

مراجعة: Good - script works

§
Posted: 13-12-2018

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 download_button = <div class="video-player__toolbar-menu"> <button id="dlbtn" title="Download video" class="add-menu-dropdown__trigger btn-tertiary btn-large dropdown-trigger ember-view"> <span class="text" aria-hidden="true">DL</span> <span class="visually-hidden">DL Vid</span> </button></div>; addDownloadButton = function(){ $('.ssplayer-right-actions').prepend(download_button); $('#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 vid_source = $('video').attr('src'); $('#dllink').attr('href', vid_source); var vid_name = vid_source; $('#dllink').attr('download', vid_name); } else { } }; $('body').on('mouseover', '#dlbtn', function(){ checkForVideoPlayer(); }); $('body').on('mouseover', '.course-body__content', function(){ checkIfReadyToLoad(); });

})();

});

Post reply

تسجيل الدخول إلى مرحلة ما بعد الرد.