PageSourceSearch

https://ps39.co.jp/wp-content/themes/socio/js/jquery.film_roll.min.js

js ps39.co.jp collected 2026-10-05 18:20:59 UTC 9,138 bytes, 15 lines download raw bytes

1// Generated by CoffeeScript 1.6.3
2/*
3  FilmRoll (for jQuery)
4  version: 0.1.8 (12/23/13)
5  @requires jQuery >= v1.4
6
7  By Noel Peden
8  Examples at http://straydogstudio.github.io/film_roll
9
10  Licensed under the MIT:
11    http://www.opensource.org/licenses/mit-license.php
12
13  Usage:
14    var film_troll = new FilmRoll({container: '#container_id', OPTIONS});
15*/(function(){var e=function(e,t){return function(){return e.apply(t,arguments)}};this.FilmRoll=function(){function t(t){this.options=t!=null?t:{};this.rotateRight=e(this.rotateRight,this);this.rotateLeft=e(this.rotateLeft,this);this.moveRight=e(this.moveRight,this);this.moveLeft=e(this.moveLeft,this);this.clearScroll=e(this.clearScroll,this);this.configureScroll=e(this.configureScroll,this);this.configureWidths=e(this.configureWidths,this);this.configureLoad=e(this.configureLoad,this);this.configureHover=e(this.configureHover,this);if(this.options.container){this.div=jQuery(this.options.container);this.div.length&&this.configure()}}t.prototype.configure=function(){var e,t=this;this.children=this.div.children();this.children.wrapAll('<div class="film_roll_wrapper"></div>');this.children.wrapAll('<div class="film_roll_shuttle"></div>');this.wrapper=this.div.find(".film_roll_wrapper");this.shuttle=this.div.find(".film_roll_shuttle");this.rotation=[];this.shuttle.width(this.options.shuttle_width?parseInt(this.options.shuttle_width,10):1e4);this.options.start_height&&this.wrapper.height(parseInt(this.options.start_height,10));this.options.vertical_center&&this.shuttle.addClass("vertical_center");if(this.options.no_css!==!0&&!document.film_roll_styles_added){jQuery("<style type='text/css'>.film_roll_wrapper{display:block;text-align:center;float:none;position:relative;top:auto;right:auto;bottom:auto;left:auto;z-index:auto;width:100%;height:100%;margin:0 !important;padding:0 !important;overflow:hidden;}.film_roll_shuttle{text-align:left;float:none;position:absolute;top:0;left:0;right:auto;bottom:auto;height:100%;margin:0 !important;padding:0 !important;z-index:auto;}.film_roll_shuttle.vertical_center:before{content:'';display:inline-block;height:100%;vertical-align:middle;margin-right:-0.25em;}.film_roll_child{position:relative;display:inline-block;*display:inline;vertical-align:middle;zoom:1;}.film_roll_prev,.film_roll_next{position:absolute;top:48%;left:15px;width:40px;height:40px;margin:-20px 0 0 0;padding:0;font-size:60px;font-weight:100;line-height:30px;color:white;text-align:center;background:#222;border:3px solid white;border-radius:23px;opacity:0.5}.film_roll_prev:hover,.film_roll_next:hover{color:white;text-decoration:none;opacity:0.9}.film_roll_next{left:auto;right:15px}.film_roll_pager{text-align:center;}.film_roll_pager a{width:5px;height:5px;border:2px solid #333;border-radius:5px;display:inline-block;margin:0 5px 0 0;transition:all 1s ease}.film_roll_pager a:hover{background:#666}.film_roll_pager a.active{background:#333}.film_roll_pager span{display:none}.film_roll_pager a,a.film_roll_prev,a.film_roll_next{-webkit-box-sizing: content-box;-moz-box-sizing: content-box;box-sizing: content-box;}</style>").appendTo("head");document.film_roll_styles_added=!0}if(this.options.pager!==!1){this.pager=jQuery('<div class="film_roll_pager">');this.div.append(this.pager);this.children.each(function(e,n){var r;r=jQuery("<a href='' data-id='"+(e+1)+"'><span>"+(e+1)+"</span></a>");t.pager.append(r);return r.mouseover(function(){t.index=e;t.moveToIndex(t.index,"best",!0);return!1})})}this.pager_links=this.div.find(".film_roll_pager a");this.mouse_catcher=jQuery('<div style="position:absolute; top:0; left: 0; height: 100%; width: 100%;" class="film_roll_mouse_catcher"></div>');this.mouse_catcher.appendTo(this.wrapper).mousemove(function(){t.clearScroll();return t.mouse_catcher.remove()});e=null;this.children.each(function(e,n){var r;r=jQuery(n);r.attr("data-film-roll-child-id",e);r.addClass("film_roll_child");return t.rotation.push(n)});if(this.options.prev&&this.options.next){this.prev=jQuery(this.options.prev);this.next=jQuery(this.options.next)}else{this.wrapper.append('<a class="film_roll_prev" href="#">&lsaquo;</a>');this.wrapper.append('<a class="film_roll_next" href="#">&rsaquo;</a>');this.prev=this.div.find(".film_roll_prev");this.next=this.div.find(".film_roll_next")}this.prev.click(function(){return t.moveRight()});this.next.click(function(){return t.moveLeft()});this.index=this.options.start_index||0;this.interval=this.options.interval||4e3;this.animation=this.options.animation||this.interval/4;this.options.resize!==!1&&jQuery(window).resize(function(){return t.resize()});this.options.configure_load?this.configureLoad():jQuery(window).load(this.configureLoad);this.div.trigger(jQuery.Event("film_roll:dom_ready"));return this};t.prototype.bestDirection=function(e,t){t||(t=jQuery.inArray(e,this.rotation));return t<this.children.length/2?"right":"left"};t.prototype.configureHover=function(){this.div.hover(this.clearScroll,this.configureScroll);if(this.options.prev&&this.options.next){this.prev.hover(this.clearScroll,this.configureScroll);return this.next.hover(this.clearScroll,this.configureScroll)}};t.prototype.configureLoad=function(){this.configureWidths();this.moveToIndex(this.index,"right",!0);if(this.options.scroll!==!1){this.configureScroll();if(this.options.hover!==!1)return this.configureHover()}};t.prototype.configureWidths=function(){var e,t=this;this.width=e=0;this.wrapper.css({height:"","min-height":0});this.shuttle.width("").removeClass("film_roll_shuttle").addClass("film_roll_resizing");this.children.width("");this.div.trigger(jQuery.Event("film_roll:resizing"));this.children.each(function(n,r){var i,s,o;i=jQuery(r);o=i.outerWidth(!0);i.width(o);t.width+=o;if(!t.options.height){s=i.outerHeight(!0);s>e&&(e=s)}return r});if(this.options.height)this.wrapper.height(this.options.height);else{this.wrapper.height("");this.wrapper.css("min-height",e)}this.real_width=this.width;this.shuttle.width(this.real_width*2).removeClass("film_roll_resizing").addClass("film_roll_shuttle");return this};t.prototype.configureScroll=function(){var e=this;if(this.scrolled!==!0){this.timer=setInterval(function(){return e.moveLeft()},this.interval);this.scrolled=!0}return this};t.prototype.clearScroll=function(){if(this.scrolled!==!1){clearInterval(this.timer);this.scrolled=!1}return this};t.prototype.marginLeft=function(e,t){var n,r,i,s,o,u;t==null&&(t=0);i=0;u=this.rotation;for(r=s=0,o=u.length;s<o;r=++s){n=u[r];r<e&&r>=t&&(i+=jQuery(n).outerWidth(!0))}return i};t.prototype.marginRight=function(e,t){var n,r,i,s,o,u;t==null&&(t=0);t=this.rotation.length-t-1;i=0;u=this.rotation;for(r=s=0,o=u.length;s<o;r=++s){n=u[r];r>e&&r<=t&&(i+=jQuery(n).outerWidth(!0))}return i};t.prototype.moveLeft=function(){this.index=(this.index+1)%this.children.length;this.moveToIndex(this.index,"left",!0);return!1};t.prototype.moveRight=function(){this.index-=1;this.index<0&&(this.index=this.children.length-1);this.moveToIndex(this.index,"right",!0);return!1};t.prototype.moveToChild=function(e){var t;t=jQuery.inArray(jQuery(e)[0],this.children);if(t>-1)return this.moveToIndex(t)};t.prototype.moveToIndex=function(e,t,n){var r,i,s,o,u,a,f=this;n==null&&(n=!0);this.index=e;this.clearScroll();r=this.children[e];o=jQuery.inArray(r,this.rotation);if(!t||t==="best")t=this.bestDirection(r,o);this.children.removeClass("active");jQuery(r).addClass("active").trigger(jQuery.Event("film_roll:activate"));this.pager_links.removeClass("active");jQuery(this.pager_links[e]).addClass("active");a=this.wrapper.width();if(a<this.real_width){u=(a-jQuery(r).outerWidth(!0))/2;if(t==="right")while(o===0||this.marginLeft(o)<u){this.rotateRight();o=jQuery.inArray(r,this.rotation)}else while(o===this.children.length-1||this.marginRight(o)<u){this.rotateLeft();o=jQuery.inArray(r,this.rotation)}s=-1*(this.marginLeft(o)-u);if(n){i="moving_"+t;this.shuttle.addClass(i);this.div.trigger(jQuery.Event("film_roll:moving"));this.shuttle.stop().animate({left:s},this.animation,"swing",function(){f.shuttle.removeClass(i);return f.div.trigger(jQuery.Event("film_roll:moved"))})}else{this.shuttle.css("left",s);this.div.trigger(jQuery.Event("film_roll:moved"))}}else this.shuttle.css("left",(a-this.width)/2);this.options.scroll!==!1&&this.configureScroll();return this};t.prototype.resize=function(){var e=this;this.clearScroll();clearTimeout(this.resize_timer);this.resize_timer=setTimeout(function(){e.options.scroll!==!1&&e.configureScroll();e.configureWidths();e.moveToIndex(e.index,"best");return e.div.trigger(jQuery.Event("film_roll:resized"))},200);return this};t.prototype.rotateLeft=function(){var e,t,n;e=this.shuttle.css("left");n=e?parseInt(e,10):0;t=this.rotation.shift();this.rotation.push(t);this.shuttle.css("left",n+jQuery(t).outerWidth(!0));return this.shuttle.append(this.shuttle.children().first().detach())};t.prototype.rotateRight=function(){var e,t,n;e=this.shuttle.css("left");n=e?parseInt(e,10):0;t=this.rotation.pop();this.rotation.unshift(t);this.shuttle.css("left",n-jQuery(t).outerWidth(!0));
15return this.shuttle.prepend(this.shuttle.children().last().detach())};return t}()}).call(this);

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.