PageSourceSearch

https://tokyo.com/wp-content/plugins/wp-job-manager-locations/assets/js/main.js?ver=20140525

js tokyo.com collected 2026-10-02 11:31:45 UTC 1,777 bytes, 78 lines download raw bytes

1(function($) {
2  'use strict';
3
4  var jobRegions = {
5    cache: {
6      $document: $(document),
7      $window: $(window),
8    },
9
10    init: function() {
11      this.bindEvents();
12    },
13
14    bindEvents: function() {
15      var self = this;
16
17      this.cache.$document.on( 'ready', function() {
18        self.$forms = $( '.search_jobs' );
19
20        self.addSubmission();
21        self.addRegions();
22        self.updateResults();
23        self.resetResults();
24      });
25    },
26
27    addSubmission: function() {
28      $( '#job_region, #resume_region' ).chosen({
29        search_contains: true
30      });
31    },
32
33    addRegions: function() {
34      this.$forms.each(function(i, el) {
35        var $regions = $(el).find( 'select.search_region' );
36
37        if ( ! $regions.length ) {
38          return;
39        }
40
41        var location = $(el).find( '.search_location' );
42        location.html( '' );
43        location.removeClass( 'search_location' ).addClass( 'search_region' );
44
45        $regions.detach().appendTo(location);
46        $regions.chosen({
47          search_contains: true
48        });
49      });
50    },
51
52    updateResults: function() {
53      this.$forms.each(function(i, el) {
54        var region = $(this).find( '.search_region' );
55
56        region.on( 'change', function() {
57          var target = $(this).closest( 'div.job_listings' );
58
59          target.trigger( 'update_results', [ 1, false ] );
60        });
61      });
62    },
63
64    resetResults: function() {
65      var self = this;
66
67      $( '.job_listings' ).on( 'reset', function() {
68        self.$forms.each(function(i, el) {
69          var $regions = $(el).find( 'select.search_region' );
70          $regions.val(0).trigger( 'change' ).trigger( 'chosen:updated' );
71        });
72      });
73    }
74  };
75
76  jobRegions.init();
77
78})(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.