• 1.
    Find the following block of code:
  • 2.
     
  • 3.
    	$mainnavItems.not('.active').children('a').each(function() {
  • 4.
    		var $link = $(this);
  • 5.
    		var request = $.ajax({
  • 6.
    			url: $link.attr('href'),
  • 7.
    			dataType: 'html'
  • 8.
    		}).done(function(html) {
  • 9.
    			var subpageIndex = $link.parent().index(),
  • 10.
    				$pageBody = $('<div>' + html.replace(/^[\s\S]*<body.*?>|<\/body>[\s\S]*$/g, '') + '</div>'),
  • 11.
    				pageTitle = html.match(/<title[^>]*>([^<]+)<\/title>/)[1],
  • 12.
    				$subpageContent = $('<div class="page-content hidden" data-menu-item="'+subpageIndex+'" data-title="'+pageTitle+'"/>');
  • 13.
    			$subpageContent.append($pageBody.find('#container').find('#mainnav').remove().end().children());
  • 14.
    			$subpageContent.appendTo($pageContentWrapper);
  • 15.
    			pagesLoaded++;
  • 16.
    			if (pagesLoaded == $mainnavItems.not('.active').length) {
  • 17.
    				initContent();
  • 18.
    			}
  • 19.
    		});
  • 20.
    	});
  • 21.
    	
  • 22.
    And replace it with:
  • 23.
     
  • 24.
    	/*
  • 25.
    	$mainnavItems.not('.active').children('a').each(function() {
  • 26.
    		var $link = $(this);
  • 27.
    		var request = $.ajax({
  • 28.
    			url: $link.attr('href'),
  • 29.
    			dataType: 'html'
  • 30.
    		}).done(function(html) {
  • 31.
    			var subpageIndex = $link.parent().index(),
  • 32.
    				$pageBody = $('<div>' + html.replace(/^[\s\S]*<body.*?>|<\/body>[\s\S]*$/g, '') + '</div>'),
  • 33.
    				pageTitle = html.match(/<title[^>]*>([^<]+)<\/title>/)[1],
  • 34.
    				$subpageContent = $('<div class="page-content hidden" data-menu-item="'+subpageIndex+'" data-title="'+pageTitle+'"/>');
  • 35.
    			$subpageContent.append($pageBody.find('#container').find('#mainnav').remove().end().children());
  • 36.
    			$subpageContent.appendTo($pageContentWrapper);
  • 37.
    			pagesLoaded++;
  • 38.
    			if (pagesLoaded == $mainnavItems.not('.active').length) {
  • 39.
    				initContent();
  • 40.
    			}
  • 41.
    		});
  • 42.
    	});
  • 43.
    	*/
  • 44.
    	
  • 45.
    Find:
  • 46.
     
  • 47.
    searchForPageLinks();
  • 48.
     
  • 49.
    You should find 2 occurrences. Replace these with:
  • 50.
     
  • 51.
    //searchForPageLinks();
  • 52.
     
  • 53.
    Find:
  • 54.
     
  • 55.
    	if (localChrome) {
  • 56.
    		initContent();
  • 57.
    	}
  • 58.
    	
  • 59.
    And replace it with:
  • 60.
     
  • 61.
    	initContent();
Find the following block of code: $mainnavItems.not('.active').children('a').each(function() { var $link = $(this); var request = $.ajax({ url: $link.attr('href'), dataType: 'html' }).done(function(html) { var subpageIndex = $link.parent().index(), $pageBody = $('<div>' + html.replace(/^[\s\S]*<body.*?>|<\/body>[\s\S]*$/g, '') + '</div>'), pageTitle = html.match(/<title[^>]*>([^<]+)<\/title>/)[1], $subpageContent = $('<div class="page-content hidden" data-menu-item="'+subpageIndex+'" data-title="'+pageTitle+'"/>'); $subpageContent.append($pageBody.find('#container').find('#mainnav').remove().end().children()); $subpageContent.appendTo($pageContentWrapper); pagesLoaded++; if (pagesLoaded == $mainnavItems.not('.active').length) { initContent(); } }); }); And replace it with: /* $mainnavItems.not('.active').children('a').each(function() { var $link = $(this); var request = $.ajax({ url: $link.attr('href'), dataType: 'html' }).done(function(html) { var subpageIndex = $link.parent().index(), $pageBody = $('<div>' + html.replace(/^[\s\S]*<body.*?>|<\/body>[\s\S]*$/g, '') + '</div>'), pageTitle = html.match(/<title[^>]*>([^<]+)<\/title>/)[1], $subpageContent = $('<div class="page-content hidden" data-menu-item="'+subpageIndex+'" data-title="'+pageTitle+'"/>'); $subpageContent.append($pageBody.find('#container').find('#mainnav').remove().end().children()); $subpageContent.appendTo($pageContentWrapper); pagesLoaded++; if (pagesLoaded == $mainnavItems.not('.active').length) { initContent(); } }); }); */ Find: searchForPageLinks(); You should find 2 occurrences. Replace these with: //searchForPageLinks(); Find: if (localChrome) { initContent(); } And replace it with: initContent();

Copy Code to Clipboard Raw

Sign-in or Create a Free Account.

Snippi uses Twitter or Facebook to register and create accounts. Registration will enable you to keep track of your snippets. We never spam your timeline or wall. Ever.

Sign-in with Facebook Sign-in with Twitter