Suggestion: Jump to youtube player
|
|
I really like your script. But I think, it would be a good idea to add a new feature. If jumpToPlayer is true the browser jumps directly to the youtube player, so that you can see the title and the whole Player on 1024x768. I used location.replace, so the history is not broken and you can go back to the previous page with the back button. Here's the code. Do, whatever you want with it. :-) Line 24:
jumpToPlayer=true; Line 34:
if(jumpToPlayer) window.location.replace(window.location.href.replace(window.location.hash, "") + "#watch-vid-title"); |
|
|
i don't understand how it works@@ |
|
|
I was first confused with that option like cycyrus^^. But now I understand that this option scrolls the browser window a little bit downwards automatically, so the player is not partly hidden. But this feature is just usefull with resolutions of 1024x768 and less. Higher resolutions will show the player completely without scrolling...^^ |
|
|
Actually, its helpful for me too (I have 1280 x 800 res). |
|
|
@Cylet:
|
|
|
for anyone reading this: location.hash has a setter, so for example, if(jumpToPlayer) location.hash="#watch-vid-title"; instead of : if(jumpToPlayer) window.location.replace(window.location.href.replace(window.location.hash, "") + "#watch-vid-title"); |
|
|
Personally I don't like see an extra long-@$$ crap added into url, so I prefer use this instead:
|