daily pastebin goal
61%
SHARE
TWEET

Untitled

a guest Jan 21st, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var permalink = function(title, id, permalink){
  2.     var current = siteUrl + type + (order ? '/orderBy/' + order : '');
  3.     var newUrl = current + '/' + permalink + '/';
  4.     if(jQuery.browser.msie){
  5.         newUrl = '/' + permalink + '/';
  6.         jQuery.address.value(newUrl);
  7.     }
  8.     else{
  9.         stateNum++;
  10.         window.history.pushState({state: stateNum}, title, newUrl);
  11.     }
  12.     jQuery('title').html('SITE - ' + title);
  13. }
  14.    
  15. var permalink = function(title, id, permalink){
  16.     var current = siteUrl + type + (order ? '/orderBy/' + order : '');
  17.     var newUrl = '/' + permalink + '/';
  18.     if(jQuery.browser.msie){
  19.         jQuery.address.value(newUrl);
  20.     }
  21.     else{
  22.         current = siteUrl + type + (order ? '/orderBy/' + order : '');
  23.         newUrl = current + '/' + permalink + '/';
  24.         stateNum++;
  25.         window.history.pushState({state: stateNum}, title, newUrl);
  26.     }
  27.     jQuery('title').html('SITE - ' + title);
  28. }
  29. jQuery(document).ready(function(){
  30.     jQuery.address.crawlable(true);
  31.     if(jQuery.browser.msie){
  32.         if(jQuery.address.value() == '/'){
  33.             var currentPermalink = window.location.toString();
  34.             currentPermalink = currentPermalink.split(type);
  35.             if(currentPermalink[1] !== '/'){
  36.                 window.location = siteUrl + type + '/#!' + currentPermalink[1];
  37.                 jQuery.address.value(newUrl);
  38.             }
  39.         }
  40.     }
  41. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top