Greasy Fork

Greasy Fork is available in English.

Toggle Messenger Sidebar

Button to hide messengers list of conversations

< 脚本 Toggle Messenger Sidebar 的反馈

评价:好评 - 脚本运行良好

§
发布于:2019-12-23

Just what I needed

I play a text-based game in messenger, this really opens up the page making all buttons available without scrolling most of the time. You can easily toggle the infopanel on the right at the same time for even more space by adding in lines 3, 6 & 10:

$("#showHideButton").click(function(){
    var convThreads = document.getElementsByClassName("_1enh")[0];
    var infoPanel = document.getElementsByClassName("_4_j5")[0];
    if(convThreads.style.display == 'none'){
        convThreads.style.display = 'block';
        infoPanel.style.display = 'block';
        showHideButton.value = "Hide Sidebar";
    }else {
        convThreads.style.display = 'none';
        infoPanel.style.display = 'none';
        showHideButton.value = "Show Sidebar";
    }

发布留言

登录以发布留言。