1(function ($) { 2 3Drupal.WeebPal = Drupal.WeebPal || {}; 4Drupal.WeebPal.currentWidth = -1; 5Drupal.WeebPal.currentType = -1; 6Drupal.WeebPal.screens = [0, 767.5, 991.5, 989.5]; 7Drupal.WeebPal.mobileThreadHold = 991.5; 8Drupal.WeebPal.clearMinHeight = function(element) { 9 $(element).css('min-height', '0px'); 10} 11 12Drupal.WeebPal.equalHeight = function() { 13} 14 15 16 17Drupal.WeebPal.equalHeightActions = function() { 18 Drupal.WeebPal.equalHeight(); 19} 20 21Drupal.WeebPal.onClickResetDefaultSettings = function() { 22 var answer = confirm(Drupal.t('Are you sure you want to reset your theme settings to default theme settings?')) 23 if (answer){ 24 $("input:hidden[name = light_use_default_settings]").attr("value", 1); 25 return true; 26 } 27 28 return false; 29} 30 31Drupal.WeebPal.eventStopPropagation = function(event) { 32 if (event.stopPropagation) { 33 event.stopPropagation(); 34 } 35 else if (window.event) { 36 window.event.cancelBubble = true; 37 } 38} 39 40Drupal.behaviors.actionWeebPal = { 41 attach: function (context) { 42 $("ul.menu > li > a.fa").each(function() { 43 var icon = $('<i class="' + $(this).attr('class') + '"/>'); 44 if($(this).hasClass('keep-content')) { 45 $(this).prepend('icon'); 46 } 47 else { 48 $(this).html("").append(icon); 49 } 50 var className = $(this).attr('class'); 51 var parts = className.split(" "); 52 var classes = []; 53 for(x in parts) { 54 if(parts[x].indexOf('fa') !== 0) { 55 classes.push(parts[x]); 56 } 57 } 58 $(this).attr('class', classes.join(' ')); 59 }); 60 $(".change-skin-button").click(function() { 61 parts = this.href.split("/"); 62 style = parts[parts.length - 1]; 63 $.cookie("weebpal_skin", style, {path: '/'}); 64 window.location.reload(); 65 return false; 66 }); 67 jQuery(".change-background-button").on("click", function() { 68 parts = this.href.split("/"); 69 style = parts[parts.length - 1]; 70 var current_background = jQuery.cookie("weebpal_background"); 71 jQuery.cookie("weebpal_background", style, {path: "/"}); 72 jQuery("body").removeClass(current_background); 73 jQuery("body").addClass(style); 74 return false; 75 }); 76 $(window).scroll(function() { 77 if($(window).scrollTop() > 200) { 78 $('.btn-btt').show(); 79 } 80 else { 81 $('.btn-btt').hide(); 82 } 83 }); 84 85 $('#change-skin').once('load').on('click', function(){ 86 $('#change-skin i').toggleClass('fa-spin'); 87 $('#change_skin_menu_wrapper').toggleClass('fly-out'); 88 }); 89 90 $(window).load(function() { 91 Drupal.WeebPal.equalHeightActions(); 92 }); 93 94 if($("#block-search-form .search-icon").length == 0) { 95 $("#block-search-form > .content").prepend('<span class="search-icon"> </span>'); 96 } 97 98 $("#block-search-form .search-icon").click(function() { 99 if($(this).closest('#block-search-form').hasClass('hover')) { 100 $(this).closest('#block-search-form').removeClass('hover'); 101 } 102 else { 103 $(this).closest('#block-search-form').addClass('hover'); 104 } 105 }); 106 107 $("#block-search-form").click(function(e) { 108 Drupal.WeebPal.eventStopPropagation(e); 109 }); 110 $('body').click(function() { 111 if($('#block-search-form').hasClass('hover')) { 112 $('#block-search-form').removeClass('hover'); 113 } 114 }); 115 $(window).resize(function() { 116 var width = $(window).innerWidth(); 117 if((width - Drupal.WeebPal.mobileThreadHold) * (Drupal.WeebPal.currentWidth - Drupal.WeebPal.mobileThreadHold) < 0) { 118 if(width > Drupal.WeebPal.mobileThreadHold) { 119 $("#main-menu-inner").css({width: ""}); 120 } 121 } 122 Drupal.WeebPal.currentWidth = width; 123 }); 124 125 } 126}; 127})(jQuery);
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.