PageSourceSearch

https://consignmate.com/wp-content/plugins/consignmate-calculator/script.js

js consignmate.com collected 2026-09-24 11:40:42 UTC 1,602 bytes, 47 lines download raw bytes

1jQuery(document).ready(function($) {
2    function showCMToast(message) {
3        var toast = $('#cm-toast');
4        if (!toast.length) return;
5        toast.text(message).fadeIn(200).css('opacity', '0.95');
6        setTimeout(function() {
7            toast.fadeOut(400);
8        }, 2200);
9    }
10
11    $('#calculate_savings').on('click', function() {
12        let jobsVal = $('#jobs_per_day').val();
13        let costVal = $('#avg_cost').val();
14        if (!jobsVal || !costVal) {
15            showCMToast('Please fill in Jobs per day and Cost fields.');
16            $('#results').hide();
17            return;
18        }
19        let jobs = parseFloat(jobsVal);
20        let cost = parseFloat(costVal);
21        if (isNaN(jobs) || isNaN(cost)) {
22            showCMToast('Please enter valid numbers.');
23            $('#results').hide();
24            return;
25        }
26        let result = jobs * cost * 21.6 * 0.15;
27        let monthly = result.toLocaleString('en-US', { style: 'currency', currency: 'USD' });
28        let yearly = (result * 12).toLocaleString('en-US', { style: 'currency', currency: 'USD' });
29        $('#monthly_saving').text(monthly);
30        $('#annual_saving').text(yearly);
31        $('#results').fadeIn();
32    });
33
34    // Modal logic
35    let modal = $('#benefits_modal');
36    $('#benefits_btn').on('click', function() {
37        modal.show();
38    });
39    $('.close').on('click', function() {
40        modal.hide();
41    });
42    $(window).on('click', function(e) {
43        if ($(e.target).is(modal)) {
44            modal.hide();
45        }
46    });
47});

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.