Calculate adds sizes

Trim white-spaces for share buttons
Increase header with 1 pixel
This commit is contained in:
Jorit Tijsen
2024-04-19 15:25:00 +02:00
parent e7459cf026
commit 4db20ca296
7 changed files with 22 additions and 7 deletions

View File

@@ -1,3 +1,11 @@
function calculateSize(targetId) {
setTimeout(function(){
$('#' + targetId).height($('#' + targetId).children(":first").height());
$('#' + targetId).width($('#' + targetId).children(":first").width());
}, 500);
$('#' + targetId).css({backgroundColor: 'transparent'});
}
$(document).ready(function(){
$('#changePreferences, .cc_b_cp').click(function(){
$('#title_targeting').parent('li').hide();
@@ -181,7 +189,7 @@ $(function () {
if (type !== undefined) {
var extra = '';
if (type.textOption) {
var text = $('.' + options.excerptClass).text();
var text = $('.' + options.excerptClass).text().trim();
if (text.length + location.href.length > 278) {
text = text.substring(0, 278 - (location.href.length + 3)) + '...';
}