1 2var s, 3 app = { 4 5 settings : { 6 jpm: {} 7 }, 8 init: function() { 9 //Global settings 10 s = this.settings; 11 12 // initalize 13 this.initalizers(); 14 this.bindUiActions(); 15 }, 16 bindUiActions: function (){ 17 // Should include all JS user interactions 18 var self = this; 19 20 $('.select-posts,.select-categories').on('click', function () { 21 self.homePostsCatSwitch(); 22 }); 23 24 $('.social-icon').on('click', function(){ 25 self.socialIconClick( $(this) ); 26 }); 27 28 }, 29 initalizers: function (){ 30 // Initalize any plugins for functions when page loads 31 32 // JPanel Menu Plugin - 33 this.jpm(); 34 35 // Fast Click for Mobile - removes 300ms delay - https://github.com/ftlabs/fastclick 36 FastClick.attach(document.body); 37 38 // Add Bg colour from JS so jPanel has time to initalize 39 //$('body').css("background","#FFF"); 40 41 }, 42 homePostsCatSwitch: function(){ 43 // Toggles between showing the categories and posts on the homepage 44 $('.home-page-posts').toggleClass("hide"); 45 $('.home-page-categories').toggleClass("hide"); 46 $('.select-posts').toggleClass("active"); 47 $('.select-categories').toggleClass("active"); 48 $('.home-footer').toggleClass("hide"); 49 }, 50 socialIconClick: function(el) { 51 // Post page social Icons 52 // When Clicked pop up a share dialog 53 54 var platform = el.data('platform'); 55 var message = el.data('message'); 56 var url = el.data('url'); 57 58 if (platform == 'mail'){ 59 // Let mail use default browser behaviour 60 return true; 61 } else { 62 this.popItUp(platform, message, url); 63 return false; 64 } 65 }, 66 popItUp : function (platform, message, url) { 67 // Create the popup with the correct location URL for sharing 68 var popUrl, 69 newWindow; 70 71 if( platform == 'twitter'){ 72 popUrl = 'http://twitter.com/home?status=' + encodeURI(message) + '+' + url; 73 74 } else if(platform == 'facebook'){ 75 popUrl = 'http://www.facebook.com/share.php?u=' + url + '&title=' + encodeURI(message); 76 } 77 newWindow = window.open(popUrl,'name','height=500,width=600'); 78 if (window.focus) { newWindow.focus(); } 79 return false; 80 81 }, 82 jpm: function(){ 83 // Off Screen Navigation Plugin 84 85 s.jpm = $.jPanelMenu({ 86 menu : '#menu-target', 87 trigger: '.menu-trigger', 88 animated: false, 89 beforeOpen : ( function() { 90 if (matchMedia('only screen and (min-width: 992px)').matches) { 91 $('.sidebar').css("left", "250px"); 92 } 93 }), 94 beforeClose : ( function() { 95 $('.sidebar').css("left", "0"); 96 $('.writer-icon, .side-writer-icon').removeClass("fadeOutUp"); 97 }) 98 }); 99 100 s.jpm.on(); 101 } 102 }; 103 104$(document).ready(function(){ 105 app.init(); 106 setTimeout(function(){ $('.menu-part').fadeTo(800, 1); }, 1000); 107});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.