Skip to content

Instantly share code, notes, and snippets.

@aikatsukamen
Last active May 20, 2021 09:18
Show Gist options
  • Select an option

  • Save aikatsukamen/52041be267c213fcc38efa4d876db696 to your computer and use it in GitHub Desktop.

Select an option

Save aikatsukamen/52041be267c213fcc38efa4d876db696 to your computer and use it in GitHub Desktop.
ShowRoomの見た目なんとかする
// ==UserScript==
// @name ShowRoomスッキリ
// @namespace http://tampermonkey.net/
// @version 0.1
// @description ごちゃごちゃすぎる
// @author Momoyama Mirai
// @match https://www.showroom-live.com/*
// @grant none
// ==/UserScript==
const sleep = (time) => new Promise((resolve)=> setTimeout(()=> resolve(), time* 1000));
(async function() {
'use strict';
console.log('[UserScript]ShowRoomスッキリ')
await sleep(1);
// どうでもいい要素を削除
const removeTagList = [
'#js-avatar', '#gift-log', '#js-room-footer', '#gift-area', '#js-side-bar', '#flashContent', '#js-onlive-list', '#js-audition-profile', '#js-audition-judgement-submit', '#ranking',
'.l-publicity-banner',
'#dialog-section',
'#telop'
];
for(const tag of removeTagList){
try{
document.querySelector(tag).remove();
}catch(e){
console.error(e);
}
}
// 背景画像消す
document.querySelector('#js-room-section').style="background-image: initial;"
// 動画部分を全画面に
document.querySelector('.l-room-video').style="width: 100vw; left: initial; margin-left: initial; height: initial; top: 50px";
document.querySelector('#js-room-video').style="width: 100%; overflow: initial;"
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment