Skip to content

Instantly share code, notes, and snippets.

@neongreen
Created June 24, 2017 11:41
Show Gist options
  • Save neongreen/8958af3dc0eed313956b708047a19810 to your computer and use it in GitHub Desktop.
Save neongreen/8958af3dc0eed313956b708047a19810 to your computer and use it in GitHub Desktop.
// ==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