Created
November 2, 2010 01:14
-
-
Save edvakf/659143 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 favstar_user; | |
| (function() { | |
| var initialized = false; | |
| function showFavstar() { | |
| switchTo('favstar'); | |
| $('tw2c').innerHTML = '<iframe src="http://favstar.fm/users/'+favstar_user+'/recent" style="display:block;border:none;width:100%;height:600px;"></iframe>'; | |
| return false; | |
| } | |
| registerPlugin({ | |
| miscTab: function(ele) { | |
| var div = document.createElement('div'); | |
| div.innerHTML = '<input id="favstar_user" value="'+favstar_user+'"><button onclick="favstar_user=$(\'favstar_user\').value">favstar user</button>'; | |
| var hr = document.createElement('hr'); | |
| hr.className = 'spacer'; | |
| ele.appendChild(hr); | |
| ele.appendChild(div); | |
| }, | |
| update: function() { | |
| if (initialized) return; | |
| initialized = true; | |
| favstar_user = myname; | |
| var a = document.createElement('a'); | |
| a.id = 'favstar'; | |
| a.innerHTML = 'faved'; | |
| a.href = '#'; | |
| a.onclick = showFavstar; | |
| $('menu2').appendChild(a); | |
| } | |
| }); | |
| })() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment