Created
June 24, 2017 11:41
-
-
Save neongreen/8958af3dc0eed313956b708047a19810 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name twist-threads | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Move threads to the right | |
// @author You | |
// @match https://twistapp.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var timerVar = setInterval (function() { | |
let threads = document.getElementsByClassName("center_col")[0]; | |
if (threads.nextElementSibling) | |
threads.parentNode.insertBefore(threads.nextElementSibling, threads); | |
let msgs = document.getElementsByClassName("right_col")[0]; | |
var newDiv = document.createElement("div"); | |
newDiv.style.flex = "1"; | |
if (!msgs) | |
threads.parentNode.insertBefore(newDiv, threads); | |
}, 50); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment