Telegram: View @SeafarersSalaries
location.hash=''
try{if(window.parent!=null&&window!=window.parent){window.parent.postMessage(JSON.stringify({eventType:'web_app_open_tg_link',eventData:{path_full:"\/SeafarersSalaries\/9"}}),'https://web.telegram.org');}}catch(e){}
window.matchMedia&&window.matchMedia('(prefers-color-scheme: dark)').matches&&document.documentElement&&document.documentElement.classList&&document.documentElement.classList.add('theme_dark');
var protoUrl = "tg:\/\/resolve?domain=SeafarersSalaries&post=9";
if (true) {
var iframeContEl = document.getElementById('tgme_frame_cont') || document.body;
var iframeEl = document.createElement('iframe');
iframeContEl.appendChild(iframeEl);
var pageHidden = false;
window.addEventListener('pagehide', function () {
pageHidden = true;
}, false);
window.addEventListener('blur', function () {
pageHidden = true;
}, false);
if (iframeEl !== null) {
iframeEl.src = protoUrl;
}
!false && setTimeout(function() {
if (!pageHidden) {
window.location = protoUrl;
}
}, 2000);
}
else if (protoUrl) {
setTimeout(function() {
window.location = protoUrl;
}, 100);
}
var tme_bg = document.getElementById('tgme_background');
if (tme_bg) {
TWallpaper.init(tme_bg);
TWallpaper.animate(true);
window.onfocus = function(){ TWallpaper.update(); };
}
document.body.classList.remove('no_transition');
function toggleTheme(dark) {
document.documentElement.classList.toggle('theme_dark', dark);
window.Telegram && Telegram.setWidgetOptions({dark: dark});
}
if (window.matchMedia) {
var darkMedia = window.matchMedia('(prefers-color-scheme: dark)');
toggleTheme(darkMedia.matches);
darkMedia.addListener(function(e) {
toggleTheme(e.matches);
});
}
function toggleEmbed() {
var widget_actions = document.getElementById('widget_actions');
if (widget_actions.classList.contains('embed_opened')) {
widget_actions.classList.remove('embed_opened');
var widget_copy = document.getElementById('widget_copy');
if (widget_copy.classList.contains('pressed')) {
widget_copy.classList.remove('pressed');
}
} else {
widget_actions.classList.add('embed_opened');
if (!document.body.classList.contains('fixed_actions')) {
window.scrollTo(0, document.body.offsetHeight);
}
selectEmbedCode();
}
checkActionsPosition();
return false;
}
function selectEmbedCode() {
var field = document.getElementById('embed_code_field');
field.focus();
field.setSelectionRange(0, field.value.length);
}
function copyEmbedCode(btn) {
if (btn.classList.contains('pressed')) {
btn.classList.remove('pressed');
btn.offsetTop + 1;
}
btn.classList.add('pressed');
selectEmbedCode();
document.execCommand('copy');
return false;
}
function pauseWallpaper(el) {
var animEnd = function() {
el.removeEventListener('transitionend', animEnd);
TWallpaper.animate(true);
}
TWallpaper.animate(false);
el.addEventListener('transitionend', animEnd);
}
function checkActionsPosition() {
var widget = document.getElementById('widget');
var widget_actions_wrap = document.getElementById('widget_actions_wrap');
var widget_actions = document.getElementById('widget_actions');
var widget_rect = widget.getBoundingClientRect();
var actions_bottom = widget_rect.bottom + widget_actions_wrap.offsetHeight;
var client_bottom = window.innerHeight || html.clientHeight;
var body_classlist = document.body.classList;
if (actions_bottom > client_bottom) {
if (!body_classlist.contains('fixed_actions')) {
widget.style.marginBottom = widget_actions_wrap.offsetHeight + 'px';
pauseWallpaper(widget_actions);
body_classlist.add('fixed_actions');
}
} else {
if (body_classlist.contains('fixed_actions')) {
widget.style.marginBottom = '';
pauseWallpaper(widget_actions);
body_classlist.remove('fixed_actions');
}
}
}
function postMessageHandler(event) {
try { var data = JSON.parse(event.data); }
catch(e) { var data = {}; }
if (data.event == 'resize') {
setTimeout(checkActionsPosition, 50);
}
}
if (!CSS || !CSS.supports || !CSS.supports('position', 'sticky') || !IntersectionObserver) {
window.addEventListener('resize', checkActionsPosition);
window.addEventListener('scroll', checkActionsPosition);
window.addEventListener('message', postMessageHandler);
} else {
document.body.classList.add('sticky_actions');
var observer = new IntersectionObserver(function(records, observer) {
for (var i = 0; i < records.length; i++) {
var record = records[i];
var widget_actions_wrap = document.getElementById('widget_actions_wrap');
var widget_actions = document.getElementById('widget_actions');
if (widget_actions_wrap) {
pauseWallpaper(widget_actions);
widget_actions_wrap.classList.toggle('stuck', !record.isIntersecting);
}
}
}, {threshold: [0], root: document});
observer.observe(document.getElementById('widget_actions_helper'));
}
x server