Advertisement
kopilo

using javascript to load right css for sl

Nov 17th, 2012
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!-- checks if requested from sl -->
  2. <script type="text/javascript">
  3.         var ua = navigator.userAgent;
  4.         if (ua.match(/secondlife/i)) {  document.write("<link src=\"sl.css\" type=\"text\\css\">"); }
  5.         else { document.write("<link src=\"normal.css\" type=\"text\\css\>"); }
  6. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement