-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrello_viewer.js
50 lines (47 loc) · 1.74 KB
/
trello_viewer.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// ==UserScript==
// @name Better Viewer for Trello
// @namespace http://weibo.com/gsavl
// @version 0.1.3
// @description better trello userage
// @match https://trello.com/*
// @noframes
// @require mixpanel-2.2.min.js
// @require quant.js
// @require all.js
// @run-at document-end
// @copyright 2013.11.21 Cooper
// ==/UserScript==
// 1. update width of card to 300px
// 2. update width of card popout window to 75%(default) of window width
// 3. update width of card popout left column
// 4. update height of active comment input control to 200px
// 5. update heidht of active editable input control to 200px
// percentage width of card popout
var pet = 0.75;
var tw = window.screen.width;
var w_width = tw * pet;
var w_left = tw * (1 - pet) / 2;
var w_main_width = tw * pet - 250;
setInterval(function() {
if (location.pathname === '/') {
return;
}
/*jshint multistr: true */
if ($('#css-tm').length === 0 && (location.pathname.indexOf('/b/') === 0 || location.pathname.indexOf('/c/') === 0)) {
var css_script = $('<style/>', {
'type': 'text/css',
'id': 'css-tm',
'html': 'div.list{width: 300px !important;}\
.list-area{width: 3500px !important;}\
.window{width: ' + w_width + 'px!important;left: ' + w_left + 'px!important;}\
.window-main-col{width: ' + w_main_width + 'px!important;}\
.new-comment.focus .new-comment-input{ height: 200px !important;}\
.phenom.editing textarea{height: 200px !important;}'
});
$('head').append(css_script);
}
}, 1000);
/*
* 2013-11-21 10:03:00 the updated css will not effect trello index page
* 2013-11-22 17:38:00 the updated css will not effect trello borad page
*/