PageSourceSearch

https://www.subaru.co.jp/assets/js/press_components.js

js subaru.co.jp collected 2026-10-01 11:57:26 UTC 2,291 bytes, 85 lines download raw bytes

1
2
3(function($){
4    // script for wordpress.
5    // require vue.js
6    var vueYearIndex = '.vue_year_index';
7  
8    $(function(){
9       //$(vueYearIndex).hide();
10       //$('.press-listup').listupper();
11    });
12  
13    $.fn.listupper = function(options){
14      var _opt = $.extend({
15  
16      }, options);
17  
18      return this.each(function(){
19        var self = this;
20        var $self = $(this);
21        var url = $self.data('url');
22  
23        var vue = new Vue({
24          el: self,
25          data: {
26            items: [],
27            recalls: [],
28            services: [],
29            others: [],
30            years: [],
31            loaded: false
32          },
33          updated: function(){
34            $(vueYearIndex).show();
35            addClassToCurrentLocalNav();
36          },
37          computed:{
38            irNewses: function(){
39              return this.items.filter(function(item, index){
40                return index < 4;
41              })
42            },
43            newestYear: function(){
44              if( this.loaded ){
45                return this.years[0];
46              }else{
47                return '';
48              }
49            }
50          }
51        });
52  
53        var promise = $.ajax({
54          url: url
55        });
56  
57        promise.done(function(data){
58          //console.log('ajax response: ', data, data.loaded );
59          vue.loaded = true;
60          vue.items = data.entries;
61          // 記事があれば
62          if( typeof data.entries !== 'undefined'){
63            // 記事ループ
64            $.each(data.entries,(function(index, item){
65              // 外部リンクなら別窓にするための処理
66              var reg = new RegExp('^(https?://)?' + location.host );
67              //console.log( item.url, reg.test(item.url));
68              if(reg.test( item.url )){
69                item.trg = "_self";
70              }else{
71                item.trg = "_blank";
72              }
73            }));
74          }
75          if( data.recall ) vue.recalls = data.recall;
76          if( data.service ) vue.services = data.service;
77          if( data.other ) vue.others = data.other;
78          vue.years = data.years;
79        });
80      });
81    };
82  })(jQuery);
83  
84
85

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.