|
Agent Moose
|
 |
« on: September 23, 2007, 06:55:15 pm » |
|
Add this to your Headers if you don't have it already. If you already have it, don't add it: <script src="jquery.js"></script> Headers or Footers: <script> function browser_detect(){ $(function(){ //Created by Agent Moose if ($.browser.mozilla) {$("#b_d").append("<b>Mozilla FireFox</b>")} if ($.browser.msie) {$("#b_d").append("<b>Internet Explorer</b>")} if ($.browser.safari) {$("#b_d").append("<b>Safari</b>")} if ($.browser.opera) {$("#b_d").append("<b>Opera</b>")} $("#bodyarea").before("You're using <span id='b_d'></span>") });}; browser_detect(); </script> This will just detect what browser a your using. SImple, yet awsome.
|
|
|
|
« Last Edit: December 17, 2007, 07:29:55 pm by Agent Moose »
|
Logged
|
|
|
|
|
|
|
Coreeeey
|
 |
« Reply #1 on: September 23, 2007, 07:24:00 pm » |
|
What's the point of it?
|
|
|
|
|
Logged
|
|
|
|
|
Agent Moose
|
 |
« Reply #2 on: September 24, 2007, 02:26:22 pm » |
|
IT will show what browser your using.
|
|
|
|
|
Logged
|
|
|
|
|
Coreeeey
|
 |
« Reply #3 on: September 25, 2007, 08:10:22 am » |
|
Hey Moosie Goosie, in your code you used the wrong form of the word "your" where it says "Your using" in your code, it should say "You're using" That would be the grammatically correct way to spell it for that usage. And I'm not sure but, in this part of your code: if ($.browser.opera) {$("#b_d").append("<b>Operta</b>")} It doesn't match, one says opera but the other says Operta. BTW, how is the opera browser because I've never used it.
|
|
|
|
« Last Edit: September 25, 2007, 11:36:40 am by Coreeeey »
|
Logged
|
|
|
|
|
Agent Moose
|
 |
« Reply #4 on: September 25, 2007, 02:22:29 pm » |
|
Fixed.
I have never used a opera browser. So I wouldn't know.
|
|
|
|
|
Logged
|
|
|
|
|
Kimmie
|
 |
« Reply #5 on: September 25, 2007, 04:42:16 pm » |
|
Hey Moosie Goosie, in your code you used the wrong form of the word "your" where it says "Your using" in your code, it should say "You're using" That would be the grammatically correct way to spell it for that usage. And I'm not sure but, in this part of your code: if ($.browser.opera) {$("#b_d").append("<b>Operta</b>")} It doesn't match, one says opera but the other says Operta. BTW, how is the opera browser because I've never used it. Opera is AWESOME!!!!!!!! It puts FF to shame (and it uses less resources to run). 
|
|
|
|
|
Logged
|
|
|
|
|
Knightcastle
|
 |
« Reply #6 on: November 21, 2007, 08:29:18 am » |
|
Neat Code Agent Moose!
|
|
|
|
|
Logged
|
|
|
|
mr_css
SMF For Free Sr. Member
Offline
Posts: 252
|
 |
« Reply #7 on: November 21, 2007, 09:24:05 am » |
|
you can get opera from download.com
|
|
|
|
|
Logged
|
|
|
|
|
Agent Moose
|
 |
« Reply #8 on: November 21, 2007, 09:48:17 pm » |
|
Neat Code Agent Moose!
Glad ya like it 
|
|
|
|
|
Logged
|
|
|
|
|
trevix
|
 |
« Reply #9 on: November 21, 2007, 10:15:42 pm » |
|
you can get opera from download.com
or from opera.com >.>
|
|
|
|
|
Logged
|
Ad Machine - Free advertising and tips on how to promote your board.
|
|
|
Andrew
Helpers
Offline
Posts: 1792
Andrew at your service
|
 |
« Reply #10 on: December 22, 2008, 06:21:17 pm » |
|
Does it just detect it for YOU, or does it detect for all members? I put this in my headers. All I get from it is, below the ads You're using:, and thats it. Is it the style I'm using or something? Just not sure 
|
|
|
|
« Last Edit: December 22, 2008, 06:27:34 pm by Andrew »
|
Logged
|
|
|
|
Colette Brunel
SMF For Free Sr. Member
Offline
Posts: 423
|
 |
« Reply #11 on: December 22, 2008, 06:55:45 pm » |
|
Does it just detect it for YOU, or does it detect for all members? I put this in my headers. All I get from it is, below the ads You're using:, and thats it. Is it the style I'm using or something? Just not sure  What browser are you running?
|
|
|
|
|
Logged
|
|
|
|
Andrew
Helpers
Offline
Posts: 1792
Andrew at your service
|
 |
« Reply #12 on: December 22, 2008, 11:33:49 pm » |
|
Internet Explorer
|
|
|
|
|
Logged
|
|
|
|
Colette Brunel
SMF For Free Sr. Member
Offline
Posts: 423
|
 |
« Reply #13 on: December 23, 2008, 09:37:43 am » |
|
The code that Moose provided is kinda hacky and reliant on what you add to the if() clause. I've prepared a script that will parse out the name of your browser without having to define what it is... Use this as a replacement for Moose's code: <script type="text/javascript"> var browser_name=navigator.appName; document.write("Browser name: "+ browser_name); </script>
|
|
|
|
|
Logged
|
|
|
|
Andrew
Helpers
Offline
Posts: 1792
Andrew at your service
|
 |
« Reply #14 on: December 23, 2008, 11:16:47 pm » |
|
Awesome! It worked this time, thanks!
|
|
|
|
|
Logged
|
|
|
|
|
|
|