resizeable columns in mastodon
当前为
// ==UserScript==
// @name resize-o-don
// @license DWTFYW
// @namespace http://pureandapplied.com.au/resizodon
// @version 0.2
// @description resizeable columns in mastodon
// @author You
// @match https://*.social/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=aus.social
// @grant none
// ==/UserScript==
(function() {
function makeResizable () {
let cols =[];
for (let a = 0; a < arguments.length; a++){
console.log(arguments[a]);
let divs = document.getElementsByClassName(arguments[a]);
for (let d = 0; d < divs.length; d++){
cols.push(divs[d]);
}
console.log(cols.length);
}
for(let i=0; i< cols.length - 1; i++){
console.log(cols[i]);
cols[i].style.resize = "horizontal";
cols[i].style.flexShrink = 0;
//cols[i].style.width = '350px';
}
// make last column shrinky
cols[cols.length -1].resize = "horizontal";
cols[cols.length -1].style.flex = "1 1 auto";
};
// do the thing
makeResizable('drawer', 'column');
})();