22012202var hostUrl = window.location.protocol + '//' + window.location.hostname;2203// Cut out protocol and host from post url and collect pathname2204var postPathname = post.url.split('/').slice(3).join('/');2205var url = hostUrl + '/' + postPathname;22062207var newPageTitle = document.title + '-' + post.title;22082209if (curUrl.indexOf('/tpost/') === -1 && curUrl.indexOf('%2Ftpost%2F') === -1) {2210if (typeof history.pushState != 'undefined') {2211window.history.pushState(
{ postData: 'open', obj: obj, post: post, }, newPageTitle, url ); } }}function t_feed_drawWholePostPopup(obj, post, opts, lid_post, recid) { var rec = document.querySelector('#rec' + recid); var feed = rec.querySelector('.js-feed'); var gridType = feed.getAttribute('data-feed-grid-type'); var statAttr = opts.popup_opts.popupStat ? 'data-track-popup="' + opts.popup_opts.popupStat + '"' : ''; var popupStyle = opts.popup_opts.overlayBgColorRgba ? 'style="background-color:' + opts.popup_opts.overlayBgColorRgba + '"' : ''; var popupStyleClose = opts.popup_opts.overlayBgColorRgba ? 'style="background-color:' + opts.popup_opts.overlayBgColorRgba.replace('1)', '0.9)') + '"' : ''; var inOneColumnHTML = { open: !opts.popup_opts.inTwoColumns ? '<div class="t-feed__post-popup__content t-col t-col_8">' : '', close: !opts.popup_opts.inTwoColumns ? '</div>' : '', }; var inTwoColumnsHTML = { open: opts.popup_opts.inTwoColumns ? '<div class="t-feed__post-popup__content t-feed__post-popup__content_half t-feed__post-popup__content-col t-col t-col_6">' : '', close: opts.popup_opts.inTwoColumns ? '</div>' : '', }; var str = ''; var panelClass = gridType === 'side-panel' ? ' t-feed__post-popup_panel ' : ' '; str += '<div class="t-feed__post-popup' + panelClass + 't-popup" data-feed-popup-feeduid="' + obj.feeduid + '" data-feed-popup-postuid="' + lid_post + '" ' + statAttr + ' ' + popupStyle + '>' + '<div class="t-feed__post-popup__close-wrapper t-feed__post-popup__close-wrapper_loading" ' + popupStyleClose + '>' + '' + t_feed_drawPostPopupCloseIcon(recid, opts) + '' + t_feed_drawPopupTitle(obj, opts) + '' + t_feed_drawSharing(opts) + '</div>'; var containerClass = gridType === 'side-panel' ? ' t-feed__post-popup__container_panel ' : ' '; str += '<div class="t-feed__post-popup__container' + containerClass + 't-feed__post-popup__container_loading t-container t-popup__container t-popup__container-static t-popup__container-animated">' + '<div class="t-feed__post-popup__content-wrapper">'; str += inOneColumnHTML.open; if (!opts.popup_opts.inTwoColumns) { if (opts.popup_opts.imagePos == 'aftertitle') { str += '' + t_feed_addPostPopupHeading(opts, post, recid); str += '' + t_feed_drawPostPopupCover(recid, 'aftertitle', opts, post); } else { str += '' + t_feed_drawPostPopupCover(recid, 'beforetitle', opts, post); str += '' + t_feed_addPostPopupHeading(opts, post, recid); } } if (opts.popup_opts.inTwoColumns) { str += inTwoColumnsHTML.open; str += '' + t_feed_drawPostPopupCover(recid, 'beforetitle', opts, post); str += inTwoColumnsHTML.close; } str += inTwoColumnsHTML.open; if (opts.popup_opts.inTwoColumns) { str += '' + t_feed_addPostPopupHeading(opts, post, recid); } str += '' + t_feed_drawPostPopupText(opts, post); if (post.authorname) { str += '' + t_feed_drawPostPopupAuthor(opts, post); } str += '' + t_feed_drawPostPopupDateAndParts('aftertext', opts, post, recid);