Skip to content

Instantly share code, notes, and snippets.

@vladdancer
Last active August 30, 2019 21:52
Show Gist options
  • Save vladdancer/0c422f68c8f98d565afc06e278ec9760 to your computer and use it in GitHub Desktop.
Save vladdancer/0c422f68c8f98d565afc06e278ec9760 to your computer and use it in GitHub Desktop.
How to print an entire Upwork message thread
$ = $ || wmjQuery || jQuery
setTimeout(function(){
$('nav').remove();
$('.composer-panel').remove();
$('div[target-selector=".main-container"]').remove();
$('nav.primary-navbar').remove();
$('#room-chat-nav').remove();
$('#room-nav').remove();
$('body').css('overflow-y', 'scroll');
$('body').css('height', '10000px');
$('.story-panel').attr('style', 'height: 100% !important');
$('#room-main-body').attr('style', 'width: 100% !important');
$('.viewport .content.minimal-content').attr('style', 'top: 100px !important');
$(window).resize(function () {
setTimeout(function(){
$('.viewport .content.minimal-content').attr('style', 'top: 100px !important');
}, 200);
});
window.print();
}, 3000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment