PageSourceSearch

https://www.wwf.or.jp/shared/js/libs_2018.js?241206

js wwf.or.jp collected 2026-10-01 10:21:44 UTC 8,065 bytes, 5 lines download raw bytes

1
2
3$(window).on("load",function(){var $window=$(window),$el=$(window.document),$elms={keyVisuals:$el.find(".keyVisual"),oneColumnBoxes:$el.find(".oneColumnsType1"),drawer:$el.find(".drawer"),pcHeader:$el.find(".headerArea-pc"),spHeader:$el.find(".headerArea-sp"),pcHeaderAccordion:$el.find("#headerAccordionPC"),spHeaderAccordion:$el.find("#headerAccordionSP")};var switchPointIPad=768;function initialize(){objectFitImages(".objectFitImage");fitCaptionToImageWidth();switch(device()){case"sp":initSmartPhoneMenu();initSmartPhoneAccordion();break;case"tablet":initIPadAccordion();initSmartPhoneAccordion();initSmartPhoneMenu();break;case"pc":default:initPcAccordion();initSmartPhoneAccordion();initSmartPhoneMenu();break}initSearch();onScrollEvents();onResizeEvents()}function onScrollEvents(){$window.on("scroll",function(){fixedKeyVisualFlicker()})}function onResizeEvents(){$window.on("resize",function(){fitCaptionToImageWidth();fixedSearchPosition()})}function device(){var ua=window.navigator.userAgent;if(ua.indexOf("iPhone")>0||ua.indexOf("iPod")>0||ua.indexOf("Android")>0&&ua.indexOf("Mobile")>0){return"sp"}else if(ua.indexOf("iPad")>0||ua.indexOf("Android")>0){return"tablet"}else{return"pc"}}function fixedKeyVisualFlicker(){if($elms.keyVisuals.length===0)return;$window.scrollTop()>500?$elms.keyVisuals.hide():$elms.keyVisuals.show()}function fitCaptionToImageWidth(){if($elms.oneColumnBoxes.length===0)return;$elms.oneColumnBoxes.each(function(i,elm){var $elm=$(elm);var imageWidth=$elm.find("img").width();if(imageWidth<=0)return true;$elm.find(".caption").width(imageWidth)})}function initSmartPhoneMenu(){if($elms.drawer.length===0)return;$elms.drawer.drawer({"class":{nav:"drawer-nav",toggle:"drawer-toggle",overlay:"drawer-overlay",open:"drawer
3-open",close:"drawer-close",dropdown:"drawer-dropdown"},iscroll:{mouseWheel:true,preventDefault:false},showOverlay:true})}function openPcAccordion(){if($elms.pcHeaderAccordion.length===0)return;$elms.pcHeaderAccordion.addClass("hover")}$("#headerActivities").hover(function(){$(this).addClass("active")},function(){$(this).removeClass("active")});$("#headerAbout").hover(function(){$(this).addClass("active")},function(){$(this).removeClass("active")});function closePcAccordion(){if($elms.pcHeaderAccordion.length===0)return;$elms.pcHeaderAccordion.removeClass("hover")}function isOpenedPcAccordion(){return $elms.pcHeaderAccordion.hasClass("hover")}function initPcAccordion(){if($elms.pcHeaderAccordion.length===0)return;$elms.pcHeaderAccordion.on("mouseenter",function(){openPcAccordion()});$elms.pcHeaderAccordion.on("mouseleave",function(){closePcAccordion()})}function initIPadAccordion(){if($elms.pcHeaderAccordion.length===0)return;$elms.pcHeaderAccordion.on("mouseenter, touchstart",function(e){if(!isOpenedPcAccordion()){e.preventDefault()}e.stopPropagation();openPcAccordion()});$el.on("touchstart",function(e){closePcAccordion()})}function initSearch(){if($elms.pcHeader.length===0)return;var $searchButton=$elms.pcHeader.find(".searchInput__pc-btn"),$searchToggle=$elms.pcHeader.find(".searchInput__pc-toggle"),$searchImg=$searchButton.find("img");$searchtext=$searchButton.find(".searchInput__pc-btn_text");fixedSearchPosition();$searchButton.on("click",function(){$searchToggle.toggle();$searchButton.toggleClass("active");if($searchButton.hasClass("active")){$searchImg.prop("src","/shared/svg/icons_close.svg");$searchtext.html("閉じる")}else{$searchImg.prop("src","/shared/svg/icons_search.svg");$searchtext.html("検索する")}})}function fixedSearchPosition(){if($elms.pcHeader.length===0)return;$elms.pcHeader.find(".searchInput__pc-toggle").css("top",$elms.pcHeader.find(".headerArea-nav__inline-gray").first().innerHeight()+"px")}function initSmartPhoneAccordion(){if($elms.spHeaderAccordion.length===0)return;var $accordions=$elms.spHeaderAccordion.find("dl");if($accordions.length===0)return;$accordions.each(function(i,elm){var $elm=$(elm),$header=$elm.find("dt"),$body=$elm.find("dd");$header.removeClass("active");$body.hide();$header.on("click",function(){if($body.is(":visible")){$body.stop().slideUp(200);$header.removeClass("active")}else{$header.addClass("active");$body.stop().slideDown(200)}})})}if($(".articleBody").hasClass("moreButtonAutoSp")){if(navigator.userAgent.match(/(iPhone|iPad|iPod|Android)/)){$(".moreContent__btn").css("display","block");$(".moreContent__contentArea").css("display","none");$(".moreContent__btn li").click(function(){$(this).parents(".moreContent").addClass("open");var $moreContent=$(this).parent(".moreContent__btn").next(".moreContent__contentArea");var myPromise=$.when($(this).parent(".moreContent__btn").fadeOut("fast"));myPromise.done(function(){$moreContent.fadeIn("slow");if(window.innerWidth<=switchPointIPad){$(".moreContent.open + .detailsBody").css("margin","47px 0 0")}else{$(".moreContent.open + .detailsBody").css("margin","42px 0 0")}fitCaptionToImageWidth()});return false})}else{$(".moreContent__btn").css("display","none");$(".moreContent__contentArea").css("display","block")}}else{$(".moreContent__contentArea").css("display","none");$(".moreContent__btn li").click(function(){$(this).parents(".moreContent").addClass("open");var $moreContent=$(this).parent(".moreContent__btn").next(".moreContent__contentArea");var myPromise=$.when($(this).parent(".moreContent__btn").fadeOut("fast"));myPromise.done(function(){$moreContent.fadeIn("slow");if(window.innerWidth<=switchPointIPad){$(".moreContent.open + .detailsBody").css("margin","47px 0 0")}else{$(".moreContent.open + .detailsBody").css("margin","42px 0 0")}fitCaptionToImageWidth()});return false})}$(".tabType li:nth-child(1)").addClass("current");$(".tab__contents > .tab__content").not(":nth-child(1)").hide();$(".tabType > li").click(function(){var num=$(this).parent().children("li").index(this);$(this).parent(".tabType").each(function(){$(">li",this).removeClass("current").eq(num).addClass("current")});$(this).parent().next().children(".tab__content").hide().eq(num).fadeIn(1e3,"easeInOutCubic");return false}).first().click();$("[name=sort]").change(function(){var browser=document.sort_form.sort.value;window.open(browser,"_blank")});$('a[href^="#"]:not([href$="#"])').not(".defaultScroll").click(function(e){e.preventDefault();var href=$(this).attr("href");if($(this).closest(".contentsList").length>0){var target=$(href=="#"||href==""?"html":href);var pos=target.offset().top;if($(".moreContent__btn").css("display")=="block"){$.when($(".moreContent__btn").fadeOut("fast")).done(function(){$(".moreContent__contentArea").fadeIn("slow",function(){var pos=target.offset().top;$("body, html").animate({scrollTop:pos},500,"easeInOutCubic")});fitCaptionToImageWidth()})}else{$("body, html").animate({scrollTop:pos},500,"easeInOutCubic")}}else if($(this).closest(".backToTopNavigation").length>0){$("body, html").animate({scrollTop:0},500,"easeInOutCubic")}else{var target=$(href=="#"||href==""?"html":href);var pos=target.offset().top-20;$("body,html").animate({scrollTop:pos},500,"easeInOutCubic")}return false});$("a.defaultScroll").click(function(e){e.preventDefault();var href=$(this).attr("href");if($(this).closest(".contentsList").length>0){var target=$(href=="#"||href==""?"html":href);var pos=target.offset().top;if($(".moreContent__btn").css("display")=="block"){$(".moreContent__btn").css("display","none");$(".moreContent__contentArea").css("display","block");var pos=target.offset().top;$("body, html").scrollTop(pos)}else{var pos=target.offset().top;$("body, html").scrollTop(pos)}}fitCaptionToImageWidth();return false});$(".refine_setting dt").click(function(){$(this).next().slideToggle();if($(this).hasClass("open")){$(this).removeClass("open");$(this).addClass("close")}else{$(this).removeClass("close");$(this).addClass("open")}return false});$(".faq .body").css("display","none");$(".faq .accordion").on("click",function(){var $_this=$(this);$_this.addClass("on");if($_this.next("div").is(":visible")){$_this.next("div").slideUp(400);$_this.toggleClass("on")}else{$_this.next("div").slideToggle(400)}});initialize()});
4
5

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.