Skip to content

Instantly share code, notes, and snippets.

@lusingander
Created April 5, 2019 12:58
Show Gist options
  • Save lusingander/172c8bfa90823a094dbcc19832fce728 to your computer and use it in GitHub Desktop.
Save lusingander/172c8bfa90823a094dbcc19832fce728 to your computer and use it in GitHub Desktop.
ブックマークレット

PC Twitter 検索画面を見やすくする

javascript:document.getElementsByClassName('SidebarCommonModules')[0].remove();document.getElementsByClassName('topbar')[0].remove();document.getElementsByClassName('SearchNavigation')[0].appendChild(document.getElementsByClassName('SidebarFilterModule')[0]);Array.prototype.forEach.call(document.getElementsByClassName('SearchNavigation'),function(e){e.classList.add('u-size1of3');e.classList.add('u-lg-size1of4');e.classList.add('Grid-cell');e.style.margin='0 10px'});
// おすすめユーザ等の情報を削除
document.getElementsByClassName('SidebarCommonModules')[0].remove();

// 画面上部の検索バー等を削除
document.getElementsByClassName('topbar')[0].remove();

// 検索条件パネルを移動
document.getElementsByClassName('SearchNavigation')[0]
    .appendChild(document.getElementsByClassName('SidebarFilterModule')[0]);

// 位置を調整
Array.prototype.forEach.call(document.getElementsByClassName('SearchNavigation'),function(e){
    e.classList.add('u-size1of3');
    e.classList.add('u-lg-size1of4');
    e.classList.add('Grid-cell');
    e.style.margin='0 10px'
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment