Vitality
Exclusive
Offline
Gender:
Posts: 154
Badges: (View All)
|
|
« on: November 27, 2008, 10:53:32 pm » |
|
A simple script that will place a link next to your report to a moderator link, and when it is clicked, it will scroll to the top of the page. I found scrolling back up to read previous posts on certain pages to be a bit tedious, so I wrote this up really quickly. <script> /*Vitality of TCZ || smfsupport || Revolution X*/ if(location.href.match('topic,')){ $("a:contains('Report to moderator')").after(" <a href='javascript:window.scrollTo(0,0);'>Go Up</a>"); } </script> Enjoy!
|
|
« Last Edit: November 28, 2008, 10:02:43 pm by Vitality »
|
Report Spam
Logged
|
CODE
|
|
|
|
Agent Moose
|
|
« Reply #1 on: November 28, 2008, 09:39:19 am » |
|
Nice code You could make it shorter though <script> /*Vitality of TCZ || smfsupport || Revolution X*/ if(location.href.match('topic,')){ $("a:contains('Report to moderator')").after(" <a href='javascript:window.scrollTo(0,0);'>Go Up</a>"); } </script>
|
|
|
|
|
Vitality
Exclusive
Offline
Gender:
Posts: 154
Badges: (View All)
|
|
« Reply #2 on: November 28, 2008, 10:02:55 pm » |
|
Thanks for that Moose!
|
CODE
|
|
|
Mojobojo82
MVP
Offline
Gender:
Posts: 838
Badges: (View All)
|
|
« Reply #3 on: June 22, 2009, 03:53:11 am » |
|
Pretty cool code. And lol @ Moose. I can't even see difference
|
|
|
|
Exilis
|
|
« Reply #4 on: June 22, 2009, 06:34:34 am » |
|
Vitality edited his first post, the original script was longer.
|
|
|
|
Mojobojo82
MVP
Offline
Gender:
Posts: 838
Badges: (View All)
|
|
« Reply #5 on: June 22, 2009, 06:44:21 am » |
|
Ahh, Yes okay Sorry im very St00pid
|
|
|
|
|
|