1/** 2 * Plugin Name: WP Notification Bars by MyThemeShop 3 * Author URI: https://mythemeshop.com/ 4 */ 5(function( $ ) { 6 7 'use strict'; 8 9 $( 10 function() { 11 12 var barHeight; 13 14 // Show notification bar 15 if ( $( '.mtsnb' ).length > 0 ) { 16 barHeight = $( '.mtsnb' ).outerHeight(); 17 $( 'body' ).css( 'padding-top', barHeight ).addClass( 'has-mtsnb' ); 18 } 19 20 // Hide Button 21 $( document ).on( 22 'click', 23 '.mtsnb-hide', 24 function(e) { 25 26 e.preventDefault(); 27 28 var $this = $( this ); 29 30 if ( ! $this.hasClass( 'active' ) ) { 31 $this.closest( '.mtsnb' ).removeClass( 'mtsnb-shown' ).addClass( 'mtsnb-hidden' ); 32 $( 'body' ).css( 'padding-top', 0 ); 33 } 34 } 35 ); 36 37 // Show Button 38 $( document ).on( 39 'click', 40 '.mtsnb-show', 41 function(e) { 42 43 e.preventDefault(); 44 45 var $this = $( this ); 46 47 if ( ! $this.hasClass( 'active' ) ) { 48 barHeight = $( '.mtsnb' ).outerHeight(); 49 $this.closest( '.mtsnb' ).removeClass( 'mtsnb-hidden' ).addClass( 'mtsnb-shown' ); 50 $( 'body' ).css( 'padding-top', barHeight ); 51 } 52 } 53 ); 54 } 55 ); 56 57})( 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.