server version, minor css fixes and other visual upgrades mostly to standard layout -> glitch css
This commit is contained in:
@@ -215,14 +215,14 @@ if (typeof video !== 'undefined') {
|
||||
|
||||
videoElem.addEventListener('play', animationLoop);
|
||||
|
||||
$(window).keypress(function(e) {
|
||||
if (e.which == 32) {
|
||||
if (videoElem.paused)
|
||||
videoElem.play();
|
||||
else
|
||||
videoElem.pause();
|
||||
}
|
||||
});
|
||||
/*$(window).keypress(function(e) {
|
||||
/* if (e.which == 32) {
|
||||
/* if (videoElem.paused)
|
||||
/* videoElem.play();
|
||||
/* else
|
||||
/* videoElem.pause();
|
||||
/* }
|
||||
});*/
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1315,9 +1315,46 @@ function Copy() {
|
||||
document.execCommand("copy");
|
||||
}
|
||||
|
||||
// Vielen Dank an Flummi!
|
||||
// This code snippet makes full and valid urls clickable in the info box!
|
||||
function formatTextEmoji(tag) {
|
||||
var Field = document.getElementById('cinput');
|
||||
var val = Field.value;
|
||||
var selected_txt = val.substring(Field.selectionStart, Field.selectionEnd);
|
||||
var before_txt = val.substring(0, Field.selectionStart);
|
||||
var after_txt = val.substr(Field.selectionEnd);
|
||||
var str1 = before_txt + ':' + tag + ':' + selected_txt;
|
||||
var len = str1.length;
|
||||
Field.value = str1 + '' + '' + after_txt;
|
||||
Field.focus();
|
||||
Field.setSelectionRange(len, len);
|
||||
}
|
||||
|
||||
const infoboxContent = document.querySelector("button#infobox");
|
||||
if(infoboxContent)
|
||||
infoboxContent.dataset.content = infoboxContent.dataset.content.replace(/(https?:\/\/[^\s]+)/g, "<a href='$1' target='_blank' rel='extern'>$1</a>");
|
||||
/* Floating Video */
|
||||
var $window = $(window);
|
||||
var $videoWrap = $('.video-wrap');
|
||||
var $video = $('.video');
|
||||
var videoHeight = $video.outerHeight();
|
||||
|
||||
$window.on('scroll', function() {
|
||||
var windowScrollTop = $window.scrollTop();
|
||||
var videoBottom = videoHeight + $videoWrap.offset().top;
|
||||
|
||||
if (windowScrollTop > videoBottom) {
|
||||
$videoWrap.height(videoHeight);
|
||||
$video.addClass('stuck');
|
||||
} else {
|
||||
$videoWrap.height('auto');
|
||||
$video.removeClass('stuck');
|
||||
}
|
||||
});
|
||||
$window.on('scroll', function() {
|
||||
var windowScrollTop = $window.scrollTop();
|
||||
var videoBottom = videoHeight + $videoWrap.offset().top;
|
||||
|
||||
if (windowScrollTop > videoBottom) {
|
||||
$videoWrap.height(videoHeight);
|
||||
$video.addClass('stuck');
|
||||
} else {
|
||||
$videoWrap.height('auto');
|
||||
$video.removeClass('stuck');
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user