Mildom layout deformer

It change Mildom's layout.(ミルダムのレイアウトを変えます)

目前为 2020-02-09 提交的版本。查看 最新版本

// ==UserScript==
// @name         Mildom layout deformer
// @namespace    Mildom layout deformer
// @version      0.1
// @description  It change Mildom's layout.(ミルダムのレイアウトを変えます)
// @author       meguru
// @match        https://www.mildom.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    setTimeout(function() {
        console.log('-------- start tamper ------------')

        const playerArea = document.getElementsByClassName('room__body sidebar-collpase')[0]
        playerArea.style.flexDirection = 'column'

        const player = document.getElementsByClassName('room__player-container')[0]
        playerArea.appendChild(player)

        const myRows = document.createElement('div')
        myRows.style.flexDirection = 'row'
        myRows.style.display = 'flex'
        myRows.style.overflow = 'scroll'
        playerArea.appendChild(myRows)

        const chat = document.getElementsByClassName('room__chat')[0]
        myRows.appendChild(chat)

        const myColumns = document.createElement('div')
        myColumns.style.flexDirection = 'column'
        myColumns.style.display = 'flex'
        myRows.appendChild(myColumns)

        const anchor = document.getElementsByClassName('room-anchor-panel')[0]
        myColumns.appendChild(anchor)

        const gift = document.getElementsByClassName('gift-panel')[0]
        myColumns.appendChild(gift)

        const relative = document.getElementsByClassName('room-relative')[0]
        myColumns.appendChild(relative)

        console.log('--------- end tamper -------------')
    }, 3000)

})();