Skip to content

Instantly share code, notes, and snippets.

@HelloWorld017
Last active October 23, 2018 12:02
Show Gist options
  • Save HelloWorld017/0ec9ae8cc12111a46a6c9985f15342b4 to your computer and use it in GitHub Desktop.
Save HelloWorld017/0ec9ae8cc12111a46a6c9985f15342b4 to your computer and use it in GitHub Desktop.
티비플을 다운로드해보자!

티비플을 다운로드 하는 방법

  1. 북마크에 아래의 url을 추가한다.
    javascript:var href = $('#video-player video>source').attr('src'); var content = $('meta[property=og\\:title]').attr('content'); if(href !== undefined){ (function(src, title){ var popupContent = $(document.createElement('div')).append( $(document.createElement('h2')).text('%EB%8B%A4%EC%9A%B4%EB%A1%9C%EB%93%9C%EA%B0%80 %EC%A4%80%EB%B9%84%EB%90%90%EC%8A%B5%EB%8B%88%EB%8B%A4!') ).append( $(document.createElement('h4')).text('%EC%95%84%EB%9E%98%EC%9D%98 %EB%A7%81%ED%81%AC%EB%A5%BC %EB%88%8C%EB%9F%AC %EB%8B%A4%EC%9A%B4%EB%A1%9C%EB%93%9C %ED%95%98%EC%8B%AD%EC%8B%9C%EC%98%A4.') ).append( $(document.createElement('a')).attr('href', src).attr('download', title).text('%EB%8F%99%EC%98%81%EC%83%81 %EB%8B%A4%EC%9A%B4%EB%A1%9C%EB%93%9C') ); createPopup(popupContent, '%EB%8F%99%EC%98%81%EC%83%81 %EB%8B%A4%EC%9A%B4%EB%A1%9C%EB%93%9C'); })(href, content); }else{ createPopup( $(document.createElement('h2')).html('%EC%98%A4%EB%A5%98!<br>%EB%8F%99%EC%98%81%EC%83%81 %ED%94%8C%EB%A0%88%EC%9D%B4%EC%96%B4%EA%B0%80 %EC%A4%80%EB%B9%84%EB%90%A0 %EB%95%8C%EA%B9%8C%EC%A7%80 %EC%A1%B0%EA%B8%88%EB%A7%8C %EA%B8%B0%EB%8B%A4%EB%A0%A4%EC%A3%BC%EC%84%B8%EC%9A%94 :D'), '%EC%A1%B0%EA%B8%88%EB%A7%8C %EB%8D%94 %EA%B8%B0%EB%8B%A4%EB%A0%A4%EC%A3%BC%EC%84%B8%EC%9A%94!' ); } function createPopup(content, title){ var modal = $(document.createElement('div')).addClass('modal fade in').attr('role', 'dialog'); modal.append( $(document.createElement('div')).addClass('modal-dialog').append( $(document.createElement('div')).addClass('modal-content').append( $(document.createElement('div')).addClass('modal-header').append( $(document.createElement('button')).addClass('close').append( $(document.createElement('span')).addClass('fa fa-times') ).on('click', function(){ modal.remove(); }) ).append( $(document.createElement('h4')).text(title) ) ).append( $(document.createElement('div')).addClass('modal-body').append(content) ) ) ); modal.css({ display: "block" }); $(document.body).append(modal); } //$('head').append($(document.createElement('script')).attr('src', 'http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js')); //WTF No bootstrap modal? //.attr('data-dismiss', 'modal')   좀 길지만 무시하자.

  2. 티비플 동영상이 재생될 때 해당 북마크를 누른다.

  3. 다운로드 버튼을 누른다.

@HelloWorld017
Copy link
Author

2017-01-23 업데이트: 오류 수정

미리 알고는 있었지만 수정하지 못한 점 죄송합니다ㅠㅠㅠ

@seirian
Copy link

seirian commented Oct 23, 2018

요새는 거의 안 들어가지만.. 그래도 유용하네요 ㅋㅋ 감사합니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment