2016-12-18 14:20:39 +00:00
|
|
|
import emojify from './components/emoji'
|
|
|
|
|
|
|
|
$(() => {
|
2017-01-10 03:40:45 +00:00
|
|
|
$.each($('.emojify'), (_, content) => {
|
2016-12-18 14:20:39 +00:00
|
|
|
const $content = $(content);
|
|
|
|
$content.html(emojify($content.html()));
|
|
|
|
});
|
2016-12-18 18:47:11 +00:00
|
|
|
|
|
|
|
$('.video-player video').on('click', e => {
|
|
|
|
if (e.target.paused) {
|
|
|
|
e.target.play();
|
|
|
|
} else {
|
|
|
|
e.target.pause();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2017-01-13 04:54:26 +00:00
|
|
|
$.each($('.spoiler'), (_, content) => {
|
|
|
|
$(content).on('click', e => {
|
|
|
|
var hasClass = $(content).hasClass('spoiler-on');
|
|
|
|
if (hasClass || e.target === content) {
|
|
|
|
e.preventDefault();
|
|
|
|
$(content).siblings(".spoiler").andSelf().toggleClass('spoiler-on', !hasClass);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2016-12-18 18:47:11 +00:00
|
|
|
$('.media-spoiler').on('click', e => {
|
|
|
|
$(e.target).hide();
|
|
|
|
});
|
2016-12-20 23:13:13 +00:00
|
|
|
|
|
|
|
$('.webapp-btn').on('click', e => {
|
|
|
|
if (e.button === 0) {
|
|
|
|
e.preventDefault();
|
|
|
|
window.location.href = $(e.target).attr('href');
|
|
|
|
}
|
|
|
|
});
|
2016-12-18 14:20:39 +00:00
|
|
|
});
|