diff options
| author | 2013-11-28 18:57:22 +0100 | |
|---|---|---|
| committer | 2013-11-28 18:57:22 +0100 | |
| commit | 3f63195c5f2a5dcb1d11b974dd2357b161e377c5 (patch) | |
| tree | 2fef1672c672ac1d24e171c7d284dd308ce42050 /public/scripts | |
| parent | dc2e1dc0817f0818943647d6b005ea35683c9c1b (diff) | |
Première version pour imprimer les articles
Voir #122
Diffstat (limited to 'public/scripts')
| -rw-r--r-- | public/scripts/main.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/public/scripts/main.js b/public/scripts/main.js index d54937600..c2a3b3912 100644 --- a/public/scripts/main.js +++ b/public/scripts/main.js @@ -623,6 +623,21 @@ function init_confirm_action() { }); } +function init_print_action() { + $('.print-article').click(function () { + + var content = $(".flux.current .content"); + var tmp_window = window.open(); + tmp_window.document.writeln(content.html()); + tmp_window.document.close(); + tmp_window.focus(); + tmp_window.print(); + tmp_window.close(); + + return false; + }); +} + function init_all() { if (!(window.$ && window.url_freshrss && ((!full_lazyload) || $.fn.lazyload))) { if (window.console) { @@ -647,6 +662,7 @@ function init_all() { init_persona(); } init_confirm_action(); + init_print_action(); if (window.console) { console.log('FreshRSS init done.'); } |
