comparison app/assets/javascripts/init.tabs.js @ 118:e3f3402da5a1

Takeover handling link clicking on dropdown menu. Prevents adding history.
author Edho Arief <edho@myconan.net>
date Mon, 12 Nov 2012 14:13:39 +0700
parents 9ac24e112ea7
children 309238f5b7b1
comparison
equal deleted inserted replaced
117:71fdd9ee5a29 118:e3f3402da5a1
39 $('#paste').data('mode', $(this).prop('href').split('#')[1]); 39 $('#paste').data('mode', $(this).prop('href').split('#')[1]);
40 update_state(); 40 update_state();
41 }); 41 });
42 $('#tab-resize ul a').click(function() { 42 $('#tab-resize ul a').click(function() {
43 paste_resize($(this).data('size')); 43 paste_resize($(this).data('size'));
44 $('.open').removeClass('open');
45 return false;
44 }); 46 });
45 47
46 mode = window.location.search.substr(1).split('.'); 48 mode = window.location.search.substr(1).split('.');
47 if (mode[0] == 'highlight') { $('#paste-tabs li:eq(1) a').click(); } 49 if (mode[0] == 'highlight') { $('#paste-tabs li:eq(1) a').click(); }
48 else if (mode[0] == 'markdown') { $('#paste-tabs li:eq(2) a').click(); } 50 else if (mode[0] == 'markdown') { $('#paste-tabs li:eq(2) a').click(); }