Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Change: URLs von Links in Beiträgen werden unterhalb des Beitrags als…
… zusätzliche Fußnoten angezeigt, JS-Code von @MatthiasApsel
  • Loading branch information
auge8472 committed May 3, 2016
1 parent f5bc009 commit 52e32ec
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions selfforum-print.css
Expand Up @@ -8,6 +8,17 @@
/* grundlegende Angaben zum Ausdruck eines Einzelpostings */

.printfootnote {
font-size: 66.6%;
}
.printfootnoteurls {
margin: 1em 0;
padding: 0 0 0 1.25em;
}
.printfootnoteurls li {
list-style: circle;
}

@media print {
body {
font-size: 1rem;
Expand Down
8 changes: 8 additions & 0 deletions selfforum-print.js
Expand Up @@ -13,9 +13,17 @@ $(document).ready(function(){
$(this).parents('.thread-message').toggleClass('print');
$('body').toggleClass('print-preview');
if ($(this).parents('.thread-message').hasClass('print')){
var i = 0;
$('.print .posting-content').append('<ul class="printfootnoteurls"></ul>');
$('.print .posting-content a').each(function(){
i++;
$(this).after('<sup class="printfootnote">[L'+i+']</sup>');
$('.printfootnoteurls').append('<li>[L'+i+'] URL: '+this.href+'</li>');
});
$(this).text('Druckansicht verlassen');
window.print();
} else {
$('.printfootnoteurls, .printfootnote').remove();
$(this).text('Beitrag drucken');
}
event.preventDefault();
Expand Down

0 comments on commit 52e32ec

Please sign in to comment.