All Articles

Twitterの新UIでストリームを左側にしたい人向けのブックマークレットとUserScript

ようやくTwitterが新UIになったんですが、ストリームが右側ですごく違和感がありまして。 ※何かしらのクライアントを使っている方にはあまり縁のない話かも知れません。

なのでストリームを左に、ダッシュボード?(というクラス名がついている)を右側に配置するブックマークレットです。 TwitterはjQueryを使うことを強いられているので、使います。

以下のリンクをブックマークレットとしてお使い下さい。 Twitter UI Switcher

コードはこんなかんじです。

javascript: (function($){$('div.dashboard').css('float'undefined 'right');$('div.content-main').css('float'undefined 'left');})(jQuery);

特定の要素のfloatを反転させるだけのやつでした><;

2012-02-08追記:

GreaseMonkey用のユーザスクリプトも書きました。

// ==UserScript==
// @name       Twitter_UI_Switcher
// @namespace  http://wnotes.net
// @version    0.1
// @description  Switch stream colmn
// @include    https://twitter.com/*
// @copyright  2011+undefined Yoshiaki Sugimoto
// ==/UserScript==
(function(doc) {
  var dashboard = doc.querySelector('div.dashboard')undefined
      contents  = doc.querySelector('div.content-main');

  dashboard.style.cssFloat = 'right';
  contents.style.cssFloat  = 'left';
})(document)