1jQuery( function ( $ ) { 2 'use strict' ; 3 var SRPScripts = { 4 init : function () { 5 $( document ).on( 'click' , '#rs_enable_earn_points_for_user' , this.allow_user_to_earn_points ) ; 6 } , 7 allow_user_to_earn_points : function ( event ) { 8 event.preventDefault() ; 9 var checkbox_value = jQuery( '#rs_enable_earn_points_for_user' ).is( ':checked' ) == true ? 'yes' : 'no' ; 10 var con = checkbox_value == 'yes' ? confirm( srpscripts_params.checked_alert_msg ) : confirm( srpscripts_params.unchecked_alert_msg ) ; 11 if ( con ) { 12 SRPScripts.block( '.enable_reward_points' ) ; 13 var data = { 14 action : 'enable_reward_program' , 15 enable_reward_points : checkbox_value , 16 sumo_security : srpscripts_params.enable_option_nonce 17 } ; 18 $.post( srpscripts_params.ajaxurl , data , function ( response ) { 19 if ( true === response.success ) { 20 SRPScripts.unblock( '.enable_reward_points' ) ; 21 window.location.reload( true ) ; 22 } else { 23 window.alert( response.data.error ) ; 24 SRPScripts.unblock( '.enable_reward_points' ) ; 25 } 26 } ) ; 27 } 28 return false ; 29 } , 30 block : function ( id ) { 31 $( id ).block( { 32 message : null , 33 overlayCSS : { 34 background : '#fff' , 35 opacity : 0.6 36 } 37 } ) ; 38 } , 39 unblock : function ( id ) { 40 $( id ).unblock() ; 41 } , 42 43 } ; 44 SRPScripts.init() ; 45} ) ;
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.