Created
February 17, 2012 15:36
-
-
Save rpominov/1854062 to your computer and use it in GitHub Desktop.
basecamp task id shower (показыватель)
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
/*.task-id-text { | |
background: #BADA55; | |
font-size: 10px; | |
border-radius: 5px; | |
padding: 1px 2px; | |
display: inline-block; | |
height: 10px; | |
line-height: 10px; | |
width: 30px; | |
overflow: hidden; | |
position: relative; | |
text-overflow:ellipsis; | |
opacity:.5; | |
} | |
.task-id-text:hover { | |
width:auto; | |
opacity:1; | |
}*/ |
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
var document = window.document; | |
var elements = document.getElementsByClassName('list_widget'); | |
for (var i = elements.length; i--;) { | |
var id = elements[i].getAttribute('id').split('_')[1]; | |
var to_append_to = elements[i].querySelectorAll('.menu_container')[0]; | |
if (id && to_append_to) { | |
var span = document.createElement('span'); | |
span.className = 'task-id-text'; | |
span.innerHTML = '#' + id; | |
to_append_to.appendChild(span); | |
} | |
} |
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
^https://[^.]+\.basecamphq\.com/projects/\d+(-\w+)*/todo_lists.* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment