JSFiddle - React, Tailwind, and code Playground
by BuriB
JavaScript
var Index2 = (function() {
this.init = function() {
$( document ).on( 'click', '.base .index2_navi.right, .social .index2_navi.left, #social_wrapper .header .logo, #descriptor a', function( e, doPushState ) {
var browser = navigator.appVersion.match( /MSIE (\d)/ );
if( !e.isTrigger && ( ( browser && parseInt( browser[ 1 ] ) < 9 ) || !!( 'ontouchstart' in window ) || !!( 'onmsgesturechange' in window ) ) ) {
return;
}
e.preventDefault();
var alap = !$( 'body' ).hasClass( 'base' ),
t = $( this ),
title,
first,
last;
_gaq.push( [ '_setCustomVar', 1, 'oldal', ( alap ? '' : 'social_' ) + 'cimlap', 3 ] );
_gaq.push( [ '_trackPageview' ] );
_gaq.push( [ '_trackEvent', 'cimlap_lapozas', alap ? 'index' : 'social', t.hasClass( 'index2_navi' ) && !e.isTrigger ? 'lapozo' : 'alternate' ] );
Common.parseUrl( Common.parsed_url.host + Common.parsed_url.user + ( alap ? '' : 'index2/' ) );
// atlapozaskor felcsereljuk az index2 es az index audit adatait
if( alap ) {
title = 'Index';
first = 'last';
last = 'first';
}
else {
title = 'Index2';
first = 'first';
last = 'last';
}
$( 'body' ).toggleClass( 'social' ).toggleClass( 'base' );
setTimeout( function() {
$( '.index_wrapper' )[ last ]().find( '.page_placeholder' ).remove();
$( '.index_wrapper' )[ last ]().html( $( '.index_wrapper' )[ last ]().html().replace( '<!--', '' ).replace( '-->', '' ) );
$( '.index_wrapper' )[ first ]().html( '<!--' + $( '.index_wrapper' )[ first ]().html().replace( /<!--/g, '' ).replace( /-->/g, '' ) + '-->' ).prepend( $( '<div/>' ).addClass( 'page_placeholder' ).html( ' ' ) );
...