diff options
| author | 2019-07-25 16:51:48 +0200 | |
|---|---|---|
| committer | 2019-07-25 16:51:48 +0200 | |
| commit | 82611c9622ed23b0e9fcf5f9f651ddffa1fd7706 (patch) | |
| tree | fc2c97fd8dd84ec30473cb85b889d8326c9a831a /p/scripts/main.js | |
| parent | 744a9e8cf00aef7dec0acfa5f90f0dcfa2ef8837 (diff) | |
| parent | 042b40eeeea77db854daab1bec96fce5c2cdd4b2 (diff) | |
Merge pull request #2451 from FreshRSS/dev1.14.3
FreshRSS 1.14.3
Diffstat (limited to 'p/scripts/main.js')
| -rw-r--r-- | p/scripts/main.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js index d85a3ae15..4fd91235e 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -859,15 +859,11 @@ function init_stream(stream) { el = ev.target.closest('.item.share > a[href="#"]'); if (el) { //Print - const content = '<html><head><style>' + - 'body { font-family: Serif; text-align: justify; }' + - 'a { color: #000; text-decoration: none; }' + - 'a:after { content: " [" attr(href) "]"}' + - '</style></head><body>' + - el.closest('.flux_content').querySelector('.content').innerHTML + - '</body></html>'; const tmp_window = window.open(); - tmp_window.document.writeln(content); + for (var i = 0; i < document.styleSheets.length; i++) { + tmp_window.document.writeln('<link href="' + document.styleSheets[i].href + '" rel="stylesheet" type="text/css" />'); + } + tmp_window.document.writeln(el.closest('.flux_content').querySelector('.content').innerHTML); tmp_window.document.close(); tmp_window.focus(); tmp_window.print(); |
