Advertisement
webpagefxjared

Untitled

Jun 30th, 2011
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. <script type="text/javascript">
  2. $(document).ready( function() { //seo experiment
  3. var c = $('head link[rel="canonical"]:first'); //get the link element
  4. var h = c.attr('href'); // get the href value
  5. if (typeof(h) == "undefined"){ return false; } // error checking
  6.  
  7. var i = h.indexOf('?page'); //check to see if "?page" is in the href value
  8. if (i > -1){ // if it is then
  9. c.attr('href',h.substring(0,i)); // remove everything up to the "?page" and reset the link attr
  10. }
  11. });
  12. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement