Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var permalink = function(title, id, permalink){
- var current = siteUrl + type + (order ? '/orderBy/' + order : '');
- var newUrl = current + '/' + permalink + '/';
- if(jQuery.browser.msie){
- newUrl = '/' + permalink + '/';
- jQuery.address.value(newUrl);
- }
- else{
- stateNum++;
- window.history.pushState({state: stateNum}, title, newUrl);
- }
- jQuery('title').html('SITE - ' + title);
- }
- var permalink = function(title, id, permalink){
- var current = siteUrl + type + (order ? '/orderBy/' + order : '');
- var newUrl = '/' + permalink + '/';
- if(jQuery.browser.msie){
- jQuery.address.value(newUrl);
- }
- else{
- current = siteUrl + type + (order ? '/orderBy/' + order : '');
- newUrl = current + '/' + permalink + '/';
- stateNum++;
- window.history.pushState({state: stateNum}, title, newUrl);
- }
- jQuery('title').html('SITE - ' + title);
- }
- jQuery(document).ready(function(){
- jQuery.address.crawlable(true);
- if(jQuery.browser.msie){
- if(jQuery.address.value() == '/'){
- var currentPermalink = window.location.toString();
- currentPermalink = currentPermalink.split(type);
- if(currentPermalink[1] !== '/'){
- window.location = siteUrl + type + '/#!' + currentPermalink[1];
- jQuery.address.value(newUrl);
- }
- }
- }
- });
Add Comment
Please, Sign In to add comment