PageSourceSearch

https://www.happiness-movie.jp/news/wp-content/themes/happiness-movie-news/assets/common/js/jquery-compat.js

js happiness-movie.jp collected 2026-10-05 00:45:55 UTC 4,612 bytes, 61 lines download raw bytes

1/*! jQuery4 互換shim (旧プラグイン用)
2   jQuery 4 で削除/廃止された旧APIを復元し、v4公式版の無い旧プラグインを無改変で動作させる薄い互換層。
3   native Function.prototype.bind には干渉しない。冪等(多重読込しても安全)。 */
4(function(window){
5  var $=window.jQuery; if(!$) return;
6  // ---- static utils ----
7  if(!$.isFunction) $.isFunction=function(o){return typeof o==="function";};
8  if(!$.isArray)    $.isArray=Array.isArray;
9  if(!$.isWindow)   $.isWindow=function(o){return o!=null&&o===o.window;};
10  if(!$.trim)       $.trim=function(s){return s==null?"":String(s).replace(/^[\s\xA0]+|[\s\xA0]+$/g,"");};
11  if(!$.type)       $.type=function(o){
12      if(o==null) return o+"";
13      var t=typeof o;
14      if(t==="object"||t==="function"){
15        var s=Object.prototype.toString.call(o);
16        return ({"[object Array]":"array","[object Boolean]":"boolean","[object Date]":"date","[object Number]":"number","[object RegExp]":"regexp","[object String]":"string","[object Function]":"function"})[s]||"object";
17      }
18      return t;
19  };
20  if(!$.isNumeric)  $.isNumeric=function(o){var t=typeof o;return (t==="number"||t==="string")&&!isNaN(o-parseFloat(o));};
21  if(!$.now)        $.now=Date.now;
22  if(!$.parseJSON)  $.parseJSON=function(s){return JSON.parse(s);};
23  if(!$.cssNumber) $.cssNumber={animationIterationCount:true,columnCount:true,fillOpacity:true,flexGrow:true,flexShrink:true,fontWeight:true,gridArea:true,gridColumn:true,gridColumnEnd:true,gridColumnStart:true,gridRow:true,gridRowEnd:true,gridRowStart:true,lineHeight:true,opacity:true,order:true,orphans:true,widows:true,zIndex:true,zoom:true};
24  if(!$.camelCase)  $.camelCase=function(s){return s.replace(/-([a-z])/g,function(_,c){return c.toUpperCase();});};
25  if(!$.proxy)      $.proxy=function(fn,ctx){ if(typeof ctx==="string"){var tmp=fn[ctx];ctx=fn;fn=tmp;} var a=Array.prototype.slice.call(arguments,2); return function(){return fn.apply(ctx,a.concat(Array.prototype.slice.call(arguments)));}; };
26  if(!$.browser){ // 非常に古いプラグイン(jquery.tools等)向け
27    var ua=navigator.userAgent.toLowerCase(); var m=/(chrome)|(webkit)|(opera)|(msie)|(trident)|(mozilla)/.exec(ua)||[];
28    $.browser={};
29  }
30  // ---- fn methods ----
31  if($.fn){
32    if(!$.fn.bind)       $.fn.bind=function(){return this.on.apply(this,arguments);};
33    if(!$.fn.unbind)     $.fn.unbind=function(){return this.off.apply(this,arguments);};
34    if(!$.fn.delegate)   $.fn.delegate=function(sel,ev,data,fn){return this.on(ev,sel,data,fn);};
35    if(!$.fn.undelegate) $.fn.undelegate=function(sel,ev,fn){return arguments.length===0?this.off():this.off(ev,sel||"**",fn);};
36    if(!$.fn.size)       $.fn.size=function(){return this.length;};
37    if(!$.fn.andSelf&&$.fn.addBack) $.fn.andSelf=$.fn.addBack;
38    if(!$.fn.hover)      {/* hoverはv4に存在 */}
39    // .load(fn)/.unload/.error イベントショートカット(v4で削除。v4の$.fn.loadはAJAX専用のため関数渡しでindexOfエラーになる)
40    if(!$.fn.load||!$.fn.load._compat){ var _aload=$.fn.load; $.fn.load=function(u){ if(typeof u==="string") return _aload?_aload.apply(this,arguments):this; return this.on("load",u); }; $.fn.load._compat=true; }
41    if(!$.fn.unload)     $.fn.unload=function(fn){return this.on("unload",fn);};
42    if(!$.fn.error)      $.fn.error=function(fn){return this.on("error",fn);};
43    // .live()/.die()(v4で削除。旧プラグインのイベント委譲用)
44    // jQueryは3.0で .selector を廃止したため、文字列セレクタを薄く復元保持し document へ委譲する。
45    if(!$.fn.live){
46      var _init=$.fn.init;
47      if(_init && !_init._cbSelCap){
48        var NewInit=function(s,c,r){ var o=new _init(s,c,r); if(typeof s==="string"){ try{o.selector=s;}catch(e){} } return o; };
49        NewInit._cbSelCap=true; NewInit.prototype=$.fn; $.fn.init=NewInit;
50      }
51      $.fn.live=function(types,data,fn){ var sel=this.selector; if(sel){$(document).on(types,sel,data,fn);} else {this.on(types,data,fn);} return this; };
52      $.fn.die =function(types,fn){ var sel=this.selector; if(sel){$(document).off(types,sel,fn);} else {this.off(types,fn);} return this; };
53    }
54  }
55  // $.support 旧フラグ(極古プラグインのIE分岐判定用。v4では未定義 → modern扱いに固定)
56  if($.support){
57    if($.support.noCloneEvent===undefined) $.support.noCloneEvent=true;
58    if($.support.opacity===undefined)      $.support.opacity=true;
59    if($.support.style===undefined)        $.support.style=true;
60  }
61})(window);

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.