linkedIn learning video download

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

< linkedIn learning video downloadについてのフィードバック

レート:良 – スクリプトは良好に動作する

§
投稿日: 2018/12/13

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(); });

})();

});

返信を投稿

返信を投稿するにはログインしてください。