├── motiontable_files └── go ├── _config.yml ├── 总图.png ├── 动效周期表 ├── 总图.png ├── motiontable_files │ ├── Bend.gif │ ├── Blind.gif │ ├── Blur.gif │ ├── Dot.gif │ ├── Flare.gif │ ├── Glow.gif │ ├── Grid.gif │ ├── Link.gif │ ├── Loop.gif │ ├── Move.gif │ ├── Orbit.gif │ ├── Scale.gif │ ├── Shade.gif │ ├── Sin.gif │ ├── Slide.gif │ ├── Text.gif │ ├── Tiler.gif │ ├── Twirl.gif │ ├── Vegas.gif │ ├── Wave.gif │ ├── title.gif │ ├── Easing.gif │ ├── Integar.gif │ ├── Load002.gif │ ├── Median.gif │ ├── Mosaic.gif │ ├── Offset.gif │ ├── Opacity.gif │ ├── Reshape.gif │ ├── Rhythm.gif │ ├── Rotate.gif │ ├── Scatter.gif │ ├── Shatter.gif │ ├── SymMove.gif │ ├── TrimPie.gif │ ├── twitter.png │ ├── AudioWave.gif │ ├── CardDance.gif │ ├── CrossBlur.gif │ ├── DelayMove.gif │ ├── Lightning.gif │ ├── LineSweep.gif │ ├── LineWeight.gif │ ├── MaskWipe.gif │ ├── MotionBlur.gif │ ├── NoiseAlpha.gif │ ├── Particle.gif │ ├── RadialBlur.gif │ ├── RandomMove.gif │ ├── RepeatMove.gif │ ├── RepeatTrim.gif │ ├── RoughEdge.gif │ ├── Scribble.gif │ ├── SpinFade.gif │ ├── SymRotate.gif │ ├── SymScale.gif │ ├── TipShape.gif │ ├── TrimCircle.gif │ ├── TrimLine.gif │ ├── WaveWarp.gif │ ├── WiggleMove.gif │ ├── WigglePath.gif │ ├── facebook.png │ ├── FieldOfDepth.gif │ ├── FlowingLine.gif │ ├── OutlineBlur.gif │ ├── RepeatRotate.gif │ ├── RepeatScale.gif │ ├── TimeDisplace.gif │ ├── WiggleRotate.gif │ ├── WiggleScale.gif │ ├── FractalNoise3.gif │ ├── RepeatTransform.gif │ ├── ShapeTransform.gif │ ├── SolidRotation.gif │ ├── PolarCoordinates.gif │ ├── TurbulentDisplace.gif │ ├── wbhack.js │ ├── timestamp.js │ ├── graph-calc.js │ ├── a.xhtml │ ├── iconochive.css │ ├── design.css │ ├── banner-styles.css │ ├── auto-complete.js │ ├── analytics.js │ ├── ait-client-rewrite.js │ ├── toolbar.js │ └── server-html.js └── motiontable.html ├── README.md └── motiontable.html /motiontable_files/go: -------------------------------------------------------------------------------- 1 | 阿斯顿发 2 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /总图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/总图.png -------------------------------------------------------------------------------- /动效周期表/总图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/总图.png -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Bend.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Bend.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Blind.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Blind.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Blur.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Blur.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Dot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Dot.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Flare.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Flare.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Glow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Glow.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Grid.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Grid.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Link.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Link.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Loop.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Loop.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Move.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Move.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Orbit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Orbit.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Scale.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Scale.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Shade.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Shade.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Sin.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Sin.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Slide.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Slide.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Text.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Text.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Tiler.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Tiler.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Twirl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Twirl.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Vegas.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Vegas.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Wave.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Wave.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/title.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/title.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Easing.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Easing.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Integar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Integar.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Load002.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Load002.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Median.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Median.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Mosaic.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Mosaic.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Offset.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Offset.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Opacity.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Opacity.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Reshape.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Reshape.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Rhythm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Rhythm.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Rotate.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Rotate.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Scatter.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Scatter.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Shatter.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Shatter.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/SymMove.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/SymMove.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/TrimPie.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/TrimPie.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/twitter.png -------------------------------------------------------------------------------- /动效周期表/motiontable_files/AudioWave.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/AudioWave.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/CardDance.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/CardDance.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/CrossBlur.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/CrossBlur.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/DelayMove.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/DelayMove.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Lightning.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Lightning.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/LineSweep.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/LineSweep.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/LineWeight.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/LineWeight.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/MaskWipe.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/MaskWipe.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/MotionBlur.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/MotionBlur.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/NoiseAlpha.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/NoiseAlpha.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Particle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Particle.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/RadialBlur.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/RadialBlur.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/RandomMove.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/RandomMove.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/RepeatMove.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/RepeatMove.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/RepeatTrim.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/RepeatTrim.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/RoughEdge.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/RoughEdge.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/Scribble.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/Scribble.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/SpinFade.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/SpinFade.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/SymRotate.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/SymRotate.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/SymScale.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/SymScale.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/TipShape.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/TipShape.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/TrimCircle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/TrimCircle.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/TrimLine.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/TrimLine.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/WaveWarp.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/WaveWarp.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/WiggleMove.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/WiggleMove.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/WigglePath.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/WigglePath.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/facebook.png -------------------------------------------------------------------------------- /动效周期表/motiontable_files/FieldOfDepth.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/FieldOfDepth.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/FlowingLine.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/FlowingLine.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/OutlineBlur.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/OutlineBlur.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/RepeatRotate.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/RepeatRotate.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/RepeatScale.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/RepeatScale.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/TimeDisplace.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/TimeDisplace.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/WiggleRotate.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/WiggleRotate.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/WiggleScale.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/WiggleScale.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/FractalNoise3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/FractalNoise3.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/RepeatTransform.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/RepeatTransform.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/ShapeTransform.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/ShapeTransform.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/SolidRotation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/SolidRotation.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/PolarCoordinates.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/PolarCoordinates.gif -------------------------------------------------------------------------------- /动效周期表/motiontable_files/TurbulentDisplace.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/overmind1980/motiontable/master/动效周期表/motiontable_files/TurbulentDisplace.gif -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Welcome to GitHub Pages 2 | 3 | You can use the [editor on GitHub](https://github.com/overmind1980/motiontable/edit/master/README.md) to maintain and preview the content for your website in Markdown files. 4 | 5 | Whenever you commit to this repository, GitHub Pages will run [Jekyll](https://jekyllrb.com/) to rebuild the pages in your site, from the content in your Markdown files. 6 | 7 | ### Markdown 8 | 9 | Markdown is a lightweight and easy-to-use syntax for styling your writing. It includes conventions for 10 | 11 | ```markdown 12 | Syntax highlighted code block 13 | 14 | # Header 1 15 | ## Header 2 16 | ### Header 3 17 | 18 | - Bulleted 19 | - List 20 | 21 | 1. Numbered 22 | 2. List 23 | 24 | **Bold** and _Italic_ and `Code` text 25 | 26 | [Link](url) and ![Image](src) 27 | ``` 28 | 29 | For more details see [GitHub Flavored Markdown](https://guides.github.com/features/mastering-markdown/). 30 | 31 | ### Jekyll Themes 32 | 33 | Your Pages site will use the layout and styles from the Jekyll theme you have selected in your [repository settings](https://github.com/overmind1980/motiontable/settings). The name of this theme is saved in the Jekyll `_config.yml` configuration file. 34 | 35 | ### Support or Contact 36 | 37 | Having trouble with Pages? Check out our [documentation](https://help.github.com/categories/github-pages-basics/) or [contact support](https://github.com/contact) and we’ll help you sort it out. 38 | -------------------------------------------------------------------------------- /动效周期表/motiontable_files/wbhack.js: -------------------------------------------------------------------------------- 1 | // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0 2 | // Wayback Machine hacks 3 | var __wbhack = new function(){ 4 | var prefix; 5 | var orig_document = { 6 | createElementNS: document.createElementNS 7 | }; 8 | this.init = function(_prefix) { 9 | this.checkCookiesNumber(); 10 | prefix = _prefix; 11 | document.createElementNS = function(ns,name) { 12 | if (ns.indexOf(prefix)==0) { 13 | ns = ns.substring(prefix.length).replace(/\/?[0-9]+\//, ''); 14 | } 15 | return orig_document.createElementNS.call(this, ns, name); 16 | }; 17 | }; 18 | this.createCookie = function(name,value,days) { 19 | if (days) { 20 | var date = new Date(); 21 | date.setTime(date.getTime()+(days*24*60*60*1000)); 22 | var expires = "; expires="+date.toGMTString(); 23 | } 24 | else var expires = ""; 25 | document.cookie = name+"="+value+expires+"; path=/"; 26 | }; 27 | this.eraseCookie = function(name) { 28 | this.createCookie(name, "", -1); 29 | }; 30 | this.checkCookiesNumber = function() { 31 | var cookies = document.cookie.split(";"); 32 | if(cookies.length > 40) { 33 | for(var i=0; i= len ? v : "00000000".substring(0, len - v.length) + v; 25 | } 26 | 27 | /** 28 | * Check if the difference between the max and the min non zero capture numbers 29 | * is larger than 3 orders of magnitude. If yes, we need to scale. 30 | **/ 31 | function capturegraph_scale_is_required(captures) { 32 | var max = 0; 33 | var min = 1000; 34 | for (var i = 0; i < captures.length; i++) { 35 | var year = captures[i]; 36 | max = Math.max(max, Math.max.apply(null, year[1])); 37 | min = Math.min(min, Math.min.apply(null, 38 | year[1].filter(Boolean))); 39 | } 40 | return (Math.log1p(max) - Math.log1p(min) > 3); 41 | } 42 | 43 | /** 44 | * Scale captugraph counts and max maxcount using log1p if necessary. 45 | */ 46 | function capturegraph_scale(captures) { 47 | var maxcount = 0; 48 | for (var i = 0; i < captures.length; i++) { 49 | maxcount = Math.max(maxcount, Math.max.apply(null, captures[i][1])); 50 | } 51 | if (capturegraph_scale_is_required(captures)) { 52 | var scaled = []; 53 | for (var i = 0; i < captures.length; i++) { 54 | var year = captures[i]; 55 | // XXX map may not be available on all platforms 56 | scaled.push([year[0], year[1].map(Math.log1p)]); 57 | } 58 | captures = scaled; 59 | maxcount = Math.log1p(maxcount); 60 | } 61 | return [captures, maxcount]; 62 | } 63 | 64 | /** 65 | * Draw years, highlight current year, draw capture frequency per month 66 | */ 67 | function sparkline(captures, width, height, canvas, start_year, 68 | cur_year, cur_month) { 69 | var ctx = canvas.getContext("2d"); 70 | if (!ctx) return; 71 | ctx.fillStyle = "#FFF"; 72 | var end_year = new Date().getUTCFullYear(); 73 | var year_width = width / (end_year - start_year + 1); 74 | 75 | var scaled = capturegraph_scale(captures.years); 76 | var years = scaled[0]; 77 | var maxcount = scaled[1]; 78 | 79 | var yscale = height / maxcount; 80 | 81 | function year_left(year) { 82 | return Math.ceil((year - start_year) * year_width) + 0.5; 83 | } 84 | 85 | if (cur_year >= start_year) { 86 | var x = year_left(cur_year); 87 | ctx.fillStyle = "#FFFFA5"; 88 | ctx.fillRect(x, 0, year_width, height); 89 | } 90 | for (var year = start_year; year <= end_year; year++) { 91 | var x = year_left(year); 92 | ctx.beginPath(); 93 | ctx.moveTo(x, 0); 94 | ctx.lineTo(x, height); 95 | ctx.lineWidth = 1; 96 | ctx.strokeStyle = "#CCC"; 97 | ctx.stroke(); 98 | } 99 | cur_month = parseInt(cur_month) - 1; 100 | var month_width = (year_width - 1) / 12; 101 | for (var i = 0; i < years.length; i++) { 102 | var year = years[i][0]; 103 | var months = years[i][1]; 104 | var left = year_left(year) + 1.0; 105 | for (var month = 0; month < 12; month++) { 106 | var count = months[month]; 107 | if (count > 0) { 108 | var h = Math.ceil(count * yscale); 109 | if (year == cur_year && month == cur_month) { 110 | ctx.fillStyle = "#EC008C"; 111 | } else { 112 | ctx.fillStyle = "#000"; 113 | } 114 | // must note that when I use width=Math.round(month_width+1), 115 | // the replay toolbar looks more accurate whereas the 116 | // bubble calendar looks somehow different. 117 | ctx.fillRect(Math.round(left), Math.ceil(height - h), 118 | Math.ceil(month_width), Math.round(h)); 119 | } 120 | left += month_width; 121 | } 122 | } 123 | } 124 | 125 | function clear_canvas(canvas_id) { 126 | var c = document.getElementById(canvas_id); 127 | if (!c || !c.getContext) return; 128 | var ctx = c.getContext("2d"); 129 | if (!ctx) return; 130 | ctx.clearRect(0, 0, c.width, c.height); 131 | } 132 | // @license-end 133 | -------------------------------------------------------------------------------- /动效周期表/motiontable_files/a.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 页面载入出错 11 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | 28 |
29 |

建立安全连接失败

30 |
31 | 32 | 33 |
34 | 35 | 36 |
37 |

连接到 archive.org 时发生错误。PR_END_OF_FILE_ERROR

38 |
39 | 40 |
41 |

42 |
43 | 44 |
45 |

46 |
47 | 48 |
49 | 50 |

51 |
52 | 53 |
54 |

55 | 56 |
57 | 58 | 59 |
    60 |
  • 由于不能验证所收到的数据是否可信,无法显示您想要查看的页面。
  • 61 |
  • 建议向此网站的管理员反馈这个问题。
  • 62 |
63 | 64 |
65 |

详细了解…

66 |
67 |
68 | 69 | 71 |
72 |

此网站可能不支持 TLS 1.2 协议,该协议现为 Firefox 的最低支持版本。启用 TLS 1.0 和 TLS 1.1 可能会成功连接。

73 |

未来的版本中将永久禁用 TLS 1.0 和 TLS 1.1。

74 | 75 |
76 | 77 | 79 |
80 |

看来可能是您的网络安全设置造成了此问题。您想还原到默认设置吗?

81 | 82 |
83 | 84 |
85 | 86 | 87 | 88 | 89 |
90 |
91 | 92 |
93 | 94 |
95 | 96 |
97 |
98 |

99 | 查看证书 100 |
101 | 102 | 103 |
104 | 105 |
106 |
107 |
108 | 109 |
110 |

111 | 112 | 113 |

114 |
115 | 116 |
117 | 118 |
119 | 120 |
121 |
122 |
123 | 124 | 125 | -------------------------------------------------------------------------------- /动效周期表/motiontable_files/iconochive.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:'Iconochive-Regular';src:url('https://archive.org/includes/fonts/Iconochive-Regular.eot?-ccsheb');src:url('https://archive.org/includes/fonts/Iconochive-Regular.eot?#iefix-ccsheb') format('embedded-opentype'),url('https://archive.org/includes/fonts/Iconochive-Regular.woff?-ccsheb') format('woff'),url('https://archive.org/includes/fonts/Iconochive-Regular.ttf?-ccsheb') format('truetype'),url('https://archive.org/includes/fonts/Iconochive-Regular.svg?-ccsheb#Iconochive-Regular') format('svg');font-weight:normal;font-style:normal} 2 | [class^="iconochive-"],[class*=" iconochive-"]{font-family:'Iconochive-Regular'!important;speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale} 3 | .iconochive-Uplevel:before{content:"\21b5"} 4 | .iconochive-exit:before{content:"\1f6a3"} 5 | .iconochive-beta:before{content:"\3b2"} 6 | .iconochive-logo:before{content:"\1f3db"} 7 | .iconochive-audio:before{content:"\1f568"} 8 | .iconochive-movies:before{content:"\1f39e"} 9 | .iconochive-software:before{content:"\1f4be"} 10 | .iconochive-texts:before{content:"\1f56e"} 11 | .iconochive-etree:before{content:"\1f3a4"} 12 | .iconochive-image:before{content:"\1f5bc"} 13 | .iconochive-web:before{content:"\1f5d4"} 14 | .iconochive-collection:before{content:"\2211"} 15 | .iconochive-folder:before{content:"\1f4c2"} 16 | .iconochive-data:before{content:"\1f5c3"} 17 | .iconochive-tv:before{content:"\1f4fa"} 18 | .iconochive-article:before{content:"\1f5cf"} 19 | .iconochive-question:before{content:"\2370"} 20 | .iconochive-question-dark:before{content:"\3f"} 21 | .iconochive-info:before{content:"\69"} 22 | .iconochive-info-small:before{content:"\24d8"} 23 | .iconochive-comment:before{content:"\1f5e9"} 24 | .iconochive-comments:before{content:"\1f5ea"} 25 | .iconochive-person:before{content:"\1f464"} 26 | .iconochive-people:before{content:"\1f465"} 27 | .iconochive-eye:before{content:"\1f441"} 28 | .iconochive-rss:before{content:"\221e"} 29 | .iconochive-time:before{content:"\1f551"} 30 | .iconochive-quote:before{content:"\275d"} 31 | .iconochive-disc:before{content:"\1f4bf"} 32 | .iconochive-tv-commercial:before{content:"\1f4b0"} 33 | .iconochive-search:before{content:"\1f50d"} 34 | .iconochive-search-star:before{content:"\273d"} 35 | .iconochive-tiles:before{content:"\229e"} 36 | .iconochive-list:before{content:"\21f6"} 37 | .iconochive-list-bulleted:before{content:"\2317"} 38 | .iconochive-latest:before{content:"\2208"} 39 | .iconochive-left:before{content:"\2c2"} 40 | .iconochive-right:before{content:"\2c3"} 41 | .iconochive-left-solid:before{content:"\25c2"} 42 | .iconochive-right-solid:before{content:"\25b8"} 43 | .iconochive-up-solid:before{content:"\25b4"} 44 | .iconochive-down-solid:before{content:"\25be"} 45 | .iconochive-dot:before{content:"\23e4"} 46 | .iconochive-dots:before{content:"\25a6"} 47 | .iconochive-columns:before{content:"\25af"} 48 | .iconochive-sort:before{content:"\21d5"} 49 | .iconochive-atoz:before{content:"\1f524"} 50 | .iconochive-ztoa:before{content:"\1f525"} 51 | .iconochive-upload:before{content:"\1f4e4"} 52 | .iconochive-download:before{content:"\1f4e5"} 53 | .iconochive-favorite:before{content:"\2605"} 54 | .iconochive-heart:before{content:"\2665"} 55 | .iconochive-play:before{content:"\25b6"} 56 | .iconochive-play-framed:before{content:"\1f3ac"} 57 | .iconochive-fullscreen:before{content:"\26f6"} 58 | .iconochive-mute:before{content:"\1f507"} 59 | .iconochive-unmute:before{content:"\1f50a"} 60 | .iconochive-share:before{content:"\1f381"} 61 | .iconochive-edit:before{content:"\270e"} 62 | .iconochive-reedit:before{content:"\2710"} 63 | .iconochive-gear:before{content:"\2699"} 64 | .iconochive-remove-circle:before{content:"\274e"} 65 | .iconochive-plus-circle:before{content:"\1f5d6"} 66 | .iconochive-minus-circle:before{content:"\1f5d5"} 67 | .iconochive-x:before{content:"\1f5d9"} 68 | .iconochive-fork:before{content:"\22d4"} 69 | .iconochive-trash:before{content:"\1f5d1"} 70 | .iconochive-warning:before{content:"\26a0"} 71 | .iconochive-flash:before{content:"\1f5f2"} 72 | .iconochive-world:before{content:"\1f5fa"} 73 | .iconochive-lock:before{content:"\1f512"} 74 | .iconochive-unlock:before{content:"\1f513"} 75 | .iconochive-twitter:before{content:"\1f426"} 76 | .iconochive-facebook:before{content:"\66"} 77 | .iconochive-googleplus:before{content:"\67"} 78 | .iconochive-reddit:before{content:"\1f47d"} 79 | .iconochive-tumblr:before{content:"\54"} 80 | .iconochive-pinterest:before{content:"\1d4df"} 81 | .iconochive-popcorn:before{content:"\1f4a5"} 82 | .iconochive-email:before{content:"\1f4e7"} 83 | .iconochive-embed:before{content:"\1f517"} 84 | .iconochive-gamepad:before{content:"\1f579"} 85 | .iconochive-Zoom_In:before{content:"\2b"} 86 | .iconochive-Zoom_Out:before{content:"\2d"} 87 | .iconochive-RSS:before{content:"\1f4e8"} 88 | .iconochive-Light_Bulb:before{content:"\1f4a1"} 89 | .iconochive-Add:before{content:"\2295"} 90 | .iconochive-Tab_Activity:before{content:"\2318"} 91 | .iconochive-Forward:before{content:"\23e9"} 92 | .iconochive-Backward:before{content:"\23ea"} 93 | .iconochive-No_Audio:before{content:"\1f508"} 94 | .iconochive-Pause:before{content:"\23f8"} 95 | .iconochive-No_Favorite:before{content:"\2606"} 96 | .iconochive-Unike:before{content:"\2661"} 97 | .iconochive-Song:before{content:"\266b"} 98 | .iconochive-No_Flag:before{content:"\2690"} 99 | .iconochive-Flag:before{content:"\2691"} 100 | .iconochive-Done:before{content:"\2713"} 101 | .iconochive-Check:before{content:"\2714"} 102 | .iconochive-Refresh:before{content:"\27f3"} 103 | .iconochive-Headphones:before{content:"\1f3a7"} 104 | .iconochive-Chart:before{content:"\1f4c8"} 105 | .iconochive-Bookmark:before{content:"\1f4d1"} 106 | .iconochive-Documents:before{content:"\1f4da"} 107 | .iconochive-Newspaper:before{content:"\1f4f0"} 108 | .iconochive-Podcast:before{content:"\1f4f6"} 109 | .iconochive-Radio:before{content:"\1f4fb"} 110 | .iconochive-Cassette:before{content:"\1f4fc"} 111 | .iconochive-Shuffle:before{content:"\1f500"} 112 | .iconochive-Loop:before{content:"\1f501"} 113 | .iconochive-Low_Audio:before{content:"\1f509"} 114 | .iconochive-First:before{content:"\1f396"} 115 | .iconochive-Invisible:before{content:"\1f576"} 116 | .iconochive-Computer:before{content:"\1f5b3"} 117 | -------------------------------------------------------------------------------- /动效周期表/motiontable_files/design.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* CSS Document */ 3 | 4 | 5 | /* http://meyerweb.com/eric/tools/css/reset/ 6 | v2.0 | 20110126 7 | License: none (public domain) 8 | */ 9 | 10 | html, body, div, span, applet, object, iframe, 11 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 12 | a, abbr, acronym, address, big, cite, code, 13 | del, dfn, em, img, ins, kbd, q, s, samp, 14 | small, strike, strong, sub, sup, tt, var, 15 | b, u, i, center, 16 | dl, dt, dd, ol, ul, li, 17 | fieldset, form, label, legend, 18 | table, caption, tbody, tfoot, thead, tr, th, td, 19 | article, aside, canvas, details, embed, 20 | figure, figcaption, footer, header, hgroup, 21 | menu, nav, output, ruby, section, summary, 22 | time, mark, audio, video { 23 | margin: 0; 24 | padding: 0; 25 | border: 0; 26 | font-size: 100%; 27 | font: inherit; 28 | vertical-align: baseline; 29 | } 30 | 31 | 32 | /* HTML5 display-role reset for older browsers */ 33 | article, aside, details, figcaption, figure, 34 | footer, header, hgroup, menu, nav, section { 35 | display: block; 36 | } 37 | body { 38 | line-height: 1; 39 | } 40 | ol, ul { 41 | list-style: none; 42 | } 43 | blockquote, q { 44 | quotes: none; 45 | } 46 | blockquote:before, blockquote:after, 47 | q:before, q:after { 48 | content: ''; 49 | content: none; 50 | } 51 | 52 | 53 | 54 | 55 | 56 | 57 | #loader-bg { 58 | display: none; 59 | position: fixed; 60 | width: 100%; 61 | height: 100%; 62 | top: 0px; 63 | left: 0px; 64 | background: #121212; 65 | z-index: 1; 66 | } 67 | #loader { 68 | display: none; 69 | position: fixed; 70 | top: 50%; 71 | left: 50%; 72 | width: 200px; 73 | height: 200px; 74 | margin-top: -100px; 75 | margin-left: -100px; 76 | text-align: center; 77 | color: #fff; 78 | z-index: 2; 79 | } 80 | 81 | 82 | 83 | p{ 84 | color:#FFFFFF; 85 | font-family: "KozGoPro-ExtraLight", "小塚ゴシック Pro EL", "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", "游ゴシック", YuGothic, "メイリオ", Meiryo, sans-serif; 86 | 87 | } 88 | 89 | 90 | table { 91 | border-collapse: collapse; 92 | border-spacing: 0; 93 | 94 | } 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | body {background-color:#464343; 105 | 106 | } 107 | 108 | 109 | 110 | 111 | 112 | 113 | .hedder{ 114 | 115 | height:70px; 116 | background-color:#2A2A2A; 117 | border-bottom:solid 1px #434343; 118 | margin-bottom:10px; 119 | } 120 | .fotter{ 121 | height:500px; 122 | margin-top:10px; 123 | background-color:#2A2A2A; 124 | border-top:solid 1px #434343; 125 | width:100%; 126 | 127 | } 128 | 129 | 130 | 131 | .top{ 132 | text-align:center; 133 | margin-top:20px; 134 | margin-bottom:-50px; 135 | 136 | width:100%; 137 | 138 | } 139 | 140 | 141 | /* これのWidthをいじると編集が容易*/ 142 | 143 | td img{ 144 | width:100%; 145 | margin:0; 146 | vertical-align:bottom; 147 | 148 | 149 | } 150 | 151 | 152 | 153 | 154 | 155 | table{ 156 | 157 | 158 | border:0px; 159 | margin:0px; 160 | padding:0px; 161 | border-collapse: collapse; 162 | border:1px solid #D5D5D5; 163 | margin-left: auto; 164 | margin-right: auto; 165 | empty-cells:hide; 166 | font-size:0; 167 | 168 | } 169 | 170 | 171 | td p{ 172 | text-align:center; 173 | 174 | 175 | } 176 | 177 | .table001{ 178 | width:90%; 179 | margin-left:auto; 180 | margin-right:auto; 181 | } 182 | 183 | th,td{ 184 | 185 | padding:0px; 186 | margin:0px; 187 | border:1px solid #5B5B5B; 188 | empty-cells:hide; 189 | font-size:0; 190 | 191 | 192 | 193 | } 194 | 195 | 196 | 197 | 198 | a{ 199 | background-color:#FFBE00; 200 | display:block; 201 | 202 | 203 | } 204 | 205 | a:hover img{ 206 | cursor:pointer; 207 | filter: alpha(opacity=60); /* ie lt 8 */ 208 | -ms-filter: "alpha(opacity=60)"; /* ie 8 */ 209 | -moz-opacity:0.6; /* FF lt 1.5, Netscape */ 210 | -khtml-opacity: 0.6; /* Safari 1.x */ 211 | opacity:0.6; 212 | zoom:1; 213 | -webkit-transition: 0.3s ease-in-out; 214 | -moz-transition: 0.3s ease-in-out; 215 | -o-transition: 0.3s ease-in-out; 216 | transition: 0.3s ease-in-out; 217 | } 218 | 219 | 220 | 221 | .hid{ 222 | border:hidden; 223 | } 224 | 225 | .hidTR{ 226 | border-top:hidden; 227 | border-right:hidden; 228 | } 229 | .hidTRL{ 230 | border-top:hidden; 231 | border-right:hidden; 232 | border-left:hidden; 233 | } 234 | 235 | .hidTL{ 236 | border-top:hidden; 237 | border-left:hidden; 238 | } 239 | 240 | 241 | 242 | .form-group { 243 | margin-bottom: 15px; 244 | text-align:right; 245 | } 246 | 247 | 248 | .form-groupL { 249 | margin-bottom: 15px; 250 | float:left; 251 | margin-left:15px 252 | } 253 | 254 | 255 | 256 | .form-groupL .button{ 257 | width:100px; 258 | } 259 | 260 | 261 | .button { 262 | display: inline-block; 263 | width: 40px; 264 | height: 40px; 265 | text-align: center; 266 | text-decoration: none; 267 | line-height: 40px; 268 | outline: none; 269 | margin-top:15px; 270 | margin-right:15px; 271 | border-radius:2px; 272 | border:solid 1px; 273 | border-color:#5B5B5B; 274 | 275 | background-color: #333; 276 | color: #fff; 277 | } 278 | 279 | .button img{ 280 | margin-top:7px; 281 | } 282 | 283 | .button::before, 284 | .button::after { 285 | position: absolute; 286 | z-index: -1; 287 | display: block; 288 | content: ''; 289 | } 290 | .button, 291 | .button::before, 292 | .button::after { 293 | -webkit-box-sizing: border-box; 294 | -moz-box-sizing: border-box; 295 | box-sizing: border-box; 296 | -webkit-transition: all .3s; 297 | transition: all .3s; 298 | } 299 | 300 | .button:hover { 301 | background-color: #59b1eb; 302 | } 303 | 304 | 305 | 306 | 307 | h5{ 308 | color:#FFFFFF; 309 | font-size:12px; 310 | 311 | 312 | 313 | 314 | text-align:center; 315 | font-family: "KozGoPro-ExtraLight", "小塚ゴシック Pro EL", "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", "游ゴシック", YuGothic, "メイリオ", Meiryo, sans-serif; 316 | } 317 | 318 | 319 | 320 | h6{ 321 | color:#464646; 322 | font-size:12px; 323 | margin-top:25px; 324 | 325 | 326 | 327 | 328 | text-align:center; 329 | font-family: "KozGoPro-ExtraLight", "小塚ゴシック Pro EL", "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", "游ゴシック", YuGothic, "メイリオ", Meiryo, sans-serif; 330 | } 331 | /* 332 | FILE ARCHIVED ON 01:12:38 Jul 14, 2019 AND RETRIEVED FROM THE 333 | INTERNET ARCHIVE ON 02:44:42 Mar 18, 2020. 334 | JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. 335 | 336 | ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. 337 | SECTION 108(a)(3)). 338 | */ 339 | /* 340 | playback timings (ms): 341 | exclusion.robots: 0.189 342 | RedisCDXSource: 38.595 343 | LoadShardBlock: 122.214 (3) 344 | load_resource: 296.561 345 | esindex: 0.014 346 | exclusion.robots.policy: 0.176 347 | captures_list: 178.209 348 | CDXLines.iter: 13.711 (3) 349 | PetaboxLoader3.resolve: 163.34 (3) 350 | PetaboxLoader3.datanode: 191.602 (5) 351 | */ -------------------------------------------------------------------------------- /动效周期表/motiontable_files/banner-styles.css: -------------------------------------------------------------------------------- 1 | @import 'record.css'; /* for SPN1 */ 2 | 3 | #wm-ipp-base { 4 | min-height:65px; 5 | padding:0; 6 | margin:0; 7 | border:none; 8 | background:none transparent; 9 | } 10 | #wm-ipp { 11 | z-index: 2147483640; 12 | } 13 | #wm-ipp, #wm-ipp * { 14 | font-family:Lucida Grande, Helvetica, Arial, sans-serif; 15 | font-size:12px; 16 | line-height:1.2; 17 | letter-spacing:0; 18 | width:auto; 19 | height:auto; 20 | max-width:none; 21 | max-height:none; 22 | min-width:0 !important; 23 | min-height:0; 24 | outline:none; 25 | float:none; 26 | text-align:left; 27 | border:none; 28 | color: #000; 29 | text-indent: 0; 30 | position: initial; 31 | background: none; 32 | } 33 | #wm-ipp div, #wm-ipp canvas { 34 | display: block; 35 | } 36 | #wm-ipp div, #wm-ipp tr, #wm-ipp td, #wm-ipp a, #wm-ipp form { 37 | padding:0; 38 | margin:0; 39 | border:none; 40 | border-radius:0; 41 | background-color:transparent; 42 | background-image:none; 43 | /*z-index:2147483640;*/ 44 | height:auto; 45 | } 46 | #wm-ipp table { 47 | border:none; 48 | border-collapse:collapse; 49 | margin:0; 50 | padding:0; 51 | width:auto; 52 | font-size:inherit; 53 | } 54 | #wm-ipp form input { 55 | padding:1px !important; 56 | height:auto; 57 | display:inline; 58 | margin:0; 59 | color: #000; 60 | background: none #fff; 61 | border: 1px solid #666; 62 | } 63 | #wm-ipp form input[type=submit] { 64 | padding:0 8px !important; 65 | margin:1px 0 1px 5px !important; 66 | width:auto !important; 67 | border: 1px solid #000 !important; 68 | background: #fff !important; 69 | color: #000 !important; 70 | } 71 | #wm-ipp a { 72 | display: inline; 73 | } 74 | #wm-ipp a:hover{ 75 | text-decoration:underline; 76 | } 77 | #wm-ipp a.wm-btn:hover { 78 | text-decoration:none; 79 | color:#ff0 !important; 80 | } 81 | #wm-ipp a.wm-btn:hover span { 82 | color:#ff0 !important; 83 | } 84 | #wm-ipp #wm-ipp-inside { 85 | margin: 0 6px; 86 | border:5px solid #000; 87 | border-top:none; 88 | background-color:rgba(255,255,255,0.9); 89 | -moz-box-shadow:1px 1px 4px #333; 90 | -webkit-box-shadow:1px 1px 4px #333; 91 | box-shadow:1px 1px 4px #333; 92 | border-radius:0 0 8px 8px; 93 | } 94 | /* selectors are intentionally verbose to ensure priority */ 95 | #wm-ipp #wm-logo { 96 | padding:0 10px; 97 | vertical-align:middle; 98 | min-width:110px; 99 | width:15%; 100 | } 101 | #wm-ipp table tr::before, #wm-ipp table tr::after { 102 | margin: 0; 103 | height: auto; 104 | } 105 | #wm-ipp table.c { 106 | vertical-align:top; 107 | margin-left: 4px; 108 | } 109 | #wm-ipp table.c td { 110 | border:none !important; 111 | } 112 | #wm-ipp .c td.u { 113 | padding:3px 0 !important; 114 | text-align:center; 115 | } 116 | #wm-ipp .c td.n { 117 | padding:0 0 0 5px !important; 118 | vertical-align: bottom; 119 | } 120 | #wm-ipp .c td.n a { 121 | text-decoration:none; 122 | color:#33f; 123 | font-weight:bold; 124 | } 125 | #wm-ipp .c td.n td.b { 126 | padding:0 6px 0 0 !important; 127 | text-align:right !important; 128 | overflow:visible; 129 | white-space:nowrap; 130 | color:#99a; 131 | vertical-align:middle; 132 | } 133 | #wm-ipp .c td.n tr.y td.b { 134 | padding:0 6px 2px 0 !important; 135 | } 136 | #wm-ipp .c td.n td.c { 137 | background:#000; 138 | color:#ff0; 139 | font-weight:bold; 140 | padding:0 !important; 141 | text-align:center; 142 | } 143 | #wm-ipp.hi .c td.n td.c { 144 | color:#ec008c; 145 | } 146 | #wm-ipp .c td.n td.f { 147 | padding:0 0 0 6px !important; 148 | text-align:left !important; 149 | overflow:visible; 150 | white-space:nowrap; 151 | color:#99a; 152 | vertical-align:middle; 153 | } 154 | #wm-ipp .c td.n tr.m td { 155 | text-transform:uppercase; 156 | white-space:nowrap; 157 | padding:2px 0; 158 | } 159 | #wm-ipp .c td.s { 160 | padding:0 5px 0 0 !important; 161 | text-align:center; 162 | vertical-align:bottom; 163 | } 164 | #wm-ipp #wm-nav-captures { 165 | white-space: nowrap; 166 | } 167 | #wm-ipp .c td.s a.t { 168 | color:#33f; 169 | font-weight:bold; 170 | line-height: 1.8; 171 | } 172 | #wm-ipp .c td.s div.r { 173 | color: #666; 174 | font-size:9px; 175 | white-space:nowrap; 176 | } 177 | #wm-ipp .c td.k { 178 | vertical-align:bottom; 179 | padding-bottom:2px; 180 | } 181 | #wm-ipp .c td.s { 182 | padding:0 5px 2px 0 !important; 183 | } 184 | #wm-ipp td#displayMonthEl { 185 | padding: 2px 0 !important; 186 | } 187 | #wm-ipp td#displayYearEl { 188 | padding: 0 0 2px 0 !important; 189 | } 190 | 191 | div#wm-ipp-sparkline { 192 | position:relative;/* for positioning markers */ 193 | white-space:nowrap; 194 | background-color:#fff; 195 | cursor:pointer; 196 | line-height:0.9; 197 | } 198 | #sparklineImgId, #wm-sparkline-canvas { 199 | position:relative; 200 | z-index:9012; 201 | max-width:none; 202 | } 203 | #wm-ipp-sparkline div.yt { 204 | position:absolute; 205 | z-index:9010 !important; 206 | background-color:#ff0 !important; 207 | top: 0; 208 | } 209 | #wm-ipp-sparkline div.mt { 210 | position:absolute; 211 | z-index:9013 !important; 212 | background-color:#ec008c !important; 213 | top: 0; 214 | } 215 | #wm-ipp .r { 216 | position:relative; 217 | } 218 | #wm-ipp .r a { 219 | color:#33f; 220 | border:none; 221 | position:relative; 222 | background-color:transparent; 223 | background-repeat:no-repeat !important; 224 | background-position:100% 100% !important; 225 | text-decoration: none; 226 | } 227 | #wm-ipp #wm-capinfo .c-logo { 228 | display:block; 229 | float:left; 230 | margin-right:3px; 231 | width:90px; 232 | min-height:90px; 233 | max-height: 290px; 234 | border-radius:45px; 235 | overflow:hidden; 236 | background-position:50%; 237 | background-size:auto 90px; 238 | box-shadow: 0 0 2px 2px rgba(208,208,208,128) inset; 239 | } 240 | #wm-ipp #wm-capinfo .c-logo span { 241 | display:inline-block; 242 | } 243 | #wm-ipp #wm-capinfo .c-logo img { 244 | height:90px; 245 | position:relative; 246 | left:-50%; 247 | } 248 | #wm-ipp #wm-capinfo .wm-title { 249 | font-size:130%; 250 | } 251 | #wm-ipp #wm-capinfo a.wm-selector { 252 | display:inline-block; 253 | color: #aaa; 254 | text-decoration:none !important; 255 | padding: 2px 8px; 256 | } 257 | #wm-ipp #wm-capinfo a.wm-selector.selected { 258 | background-color:#666; 259 | } 260 | #wm-ipp #wm-capinfo a.wm-selector:hover { 261 | color: #fff; 262 | } 263 | #wm-ipp #wm-expand { 264 | right: 1px; 265 | bottom: -1px; 266 | color: #ffffff; 267 | background-color: #666 !important; 268 | padding:0 5px 0 3px !important; 269 | border-radius: 3px 3px 0 0 !important; 270 | } 271 | #wm-ipp #wm-expand span { 272 | color: #ffffff; 273 | } 274 | #wm-ipp #wm-expand #wm-expand-icon { 275 | display: inline-block; 276 | transition: transform 0.5s; 277 | transform-origin: 50% 45%; 278 | } 279 | #wm-ipp #wm-expand.wm-open #wm-expand-icon { 280 | transform: rotate(180deg); 281 | } 282 | #wm-ipp #wmtb { 283 | text-align:right; 284 | } 285 | #wm-ipp #wmtb #wmtbURL { 286 | width: calc(100% - 45px); 287 | } 288 | #wm-ipp #wm-graph-anchor { 289 | border-right:1px solid #ccc; 290 | } 291 | /* time coherence */ 292 | html.wb-highlight { 293 | box-shadow: inset 0 0 0 3px #a50e3a !important; 294 | } 295 | .wb-highlight { 296 | outline: 3px solid #a50e3a !important; 297 | } 298 | 299 | @media (min-width:946px) { 300 | #wm-ipp #wm-graph-anchor { 301 | display:block !important; 302 | } 303 | } 304 | @media (max-width:945px) { 305 | #wm-ipp #wm-graph-anchor { 306 | display:none !important; 307 | } 308 | #wm-ipp table.c { 309 | width: 85%; 310 | width: calc(100% - 131px); 311 | } 312 | } 313 | @media (max-width:1096px) { 314 | #wm-logo { 315 | display:none !important; 316 | } 317 | } 318 | 319 | #wm-btns { 320 | white-space: nowrap; 321 | } 322 | 323 | #wm-btns>#wm-save-snapshot-open { 324 | margin-right: 7px; 325 | top: -6px; 326 | } 327 | 328 | #wm-btns>#wm-sign-in { 329 | box-sizing: content-box; 330 | display: none; 331 | margin-right: 7px; 332 | top: -8px; 333 | 334 | /* 335 | round border around sign in button 336 | */ 337 | border: 2px #000 solid; 338 | border-radius: 14px; 339 | padding-right: 2px; 340 | padding-bottom: 2px; 341 | width: 11px; 342 | height: 11px; 343 | } 344 | 345 | #wm-btns>#wm-sign-in>.iconochive-person { 346 | font-size: 12.5px; 347 | } 348 | 349 | #wm-save-snapshot-open > .iconochive-web { 350 | color:#000; 351 | font-size:160%; 352 | } 353 | 354 | #wm-ipp #wm-share { 355 | display: flex; 356 | align-items: flex-end; 357 | justify-content: space-between; 358 | } 359 | 360 | #wm-share > #wm-screenshot { 361 | display: inline-block; 362 | margin-right: 3px; 363 | visibility: hidden; 364 | } 365 | 366 | #wm-screenshot > .iconochive-image { 367 | color:#000; 368 | font-size:160%; 369 | } 370 | 371 | #wm-btns>#wm-save-snapshot-in-progress { 372 | display: none; 373 | font-size:160%; 374 | opacity: 0.5; 375 | position: relative; 376 | margin-right: 7px; 377 | top: -5px; 378 | } 379 | 380 | #wm-btns>#wm-save-snapshot-success { 381 | display: none; 382 | color: green; 383 | position: relative; 384 | top: -7px; 385 | } 386 | 387 | #wm-btns>#wm-save-snapshot-fail { 388 | display: none; 389 | color: red; 390 | position: relative; 391 | top: -7px; 392 | } 393 | 394 | .wm-icon-screen-shot { 395 | background: url("../images/web-screenshot.svg") no-repeat !important; 396 | background-size: contain !important; 397 | width: 22px !important; 398 | height: 19px !important; 399 | 400 | display: inline-block; 401 | } 402 | #donato #donato-base { 403 | height: 100%; 404 | } 405 | body.wm-modal { 406 | height: auto !important; 407 | overflow: hidden !important; 408 | } 409 | #donato #donato-base { 410 | width: 100%; 411 | height: 100%; 412 | position: absolute; 413 | z-index: 2147483639; 414 | } 415 | body.wm-modal #donato #donato-base { 416 | position: fixed; 417 | top: 0; 418 | left: 0; 419 | right: 0; 420 | bottom: 0; 421 | z-index: 2147483640; 422 | } 423 | -------------------------------------------------------------------------------- /动效周期表/motiontable_files/auto-complete.js: -------------------------------------------------------------------------------- 1 | // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0 2 | var wbAutoComplete = (function(){ 3 | // "use strict"; 4 | function wbAutoComplete(options){ 5 | if (!document.querySelector) return; 6 | 7 | // helpers 8 | function hasClass(el, className){ return el.classList ? el.classList.contains(className) : new RegExp('\\b'+ className+'\\b').test(el.className); } 9 | 10 | function addEvent(el, type, handler){ 11 | if (el.attachEvent) el.attachEvent('on'+type, handler); else el.addEventListener(type, handler); 12 | } 13 | function removeEvent(el, type, handler){ 14 | // if (el.removeEventListener) not working in IE11 15 | if (el.detachEvent) el.detachEvent('on'+type, handler); else el.removeEventListener(type, handler); 16 | } 17 | function live(elClass, event, cb, context){ 18 | addEvent(context || document, event, function(e){ 19 | var found, el = e.target || e.srcElement; 20 | while (el && !(found = hasClass(el, elClass))) el = el.parentElement; 21 | if (found) cb.call(el, e); 22 | }); 23 | } 24 | 25 | var o = { 26 | selector: 0, 27 | source: 0, 28 | minChars: 3, 29 | delay: 150, 30 | offsetLeft: 0, 31 | offsetTop: 1, 32 | cache: 1, 33 | menuClass: '', 34 | renderItem: function (item, search){ 35 | // escape special characters 36 | search = search.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); 37 | var re = new RegExp("(" + search.split(' ').join('|') + ")", "gi"); 38 | return '
' + item.replace(re, "$1") + '
'; 39 | }, 40 | onSelect: function(e, term, item){} 41 | }; 42 | for (var k in options) { if (options.hasOwnProperty(k)) o[k] = options[k]; } 43 | 44 | // init 45 | var elems = typeof o.selector == 'object' ? [o.selector] : document.querySelectorAll(o.selector); 46 | for (var i=0; i 0) 72 | that.sc.scrollTop = selTop + that.sc.suggestionHeight + scrTop - that.sc.maxHeight; 73 | else if (selTop < 0) 74 | that.sc.scrollTop = selTop + scrTop; 75 | } 76 | } 77 | } 78 | addEvent(window, 'resize', that.updateSC); 79 | document.body.appendChild(that.sc); 80 | 81 | live('wb-autocomplete-suggestion', 'mouseleave', function(e){ 82 | var sel = that.sc.querySelector('.autocomplete-suggestion.selected'); 83 | if (sel) setTimeout(function(){ sel.className = sel.className.replace('selected', ''); }, 20); 84 | }, that.sc); 85 | 86 | live('wb-autocomplete-suggestion', 'mouseover', function(e){ 87 | var sel = that.sc.querySelector('.wb-autocomplete-suggestion.selected'); 88 | if (sel) sel.className = sel.className.replace('selected', ''); 89 | this.className += ' selected'; 90 | }, that.sc); 91 | 92 | live('wb-autocomplete-suggestion', 'mousedown', function(e){ 93 | if (hasClass(this, 'wb-autocomplete-suggestion')) { // else outside click 94 | var v = this.getAttribute('data-val'); 95 | that.value = v; 96 | o.onSelect(e, v, this); 97 | that.sc.style.display = 'none'; 98 | } 99 | }, that.sc); 100 | 101 | that.blurHandler = function(){ 102 | try { var over_sb = document.querySelector('.wb-autocomplete-suggestions:hover'); } catch(e){ var over_sb = 0; } 103 | if (!over_sb) { 104 | that.last_val = that.value; 105 | that.sc.style.display = 'none'; 106 | setTimeout(function(){ that.sc.style.display = 'none'; }, 350); // hide suggestions on fast input 107 | } else if (that !== document.activeElement) setTimeout(function(){ that.focus(); }, 20); 108 | }; 109 | addEvent(that, 'blur', that.blurHandler); 110 | 111 | var suggest = function(data){ 112 | var val = that.value; 113 | that.cache[val] = data; 114 | if (data.length && val.length >= o.minChars) { 115 | var s = ''; 116 | for (var i=0;i 40) && key != 13 && key != 27) { 158 | var val = that.value; 159 | if (val.length >= o.minChars) { 160 | if (val != that.last_val) { 161 | that.last_val = val; 162 | clearTimeout(that.timer); 163 | if (o.cache) { 164 | if (val in that.cache) { suggest(that.cache[val]); return; } 165 | // no requests if previous suggestions were empty 166 | for (var i=1; i= 1 ? eventValues[1] : ''; 348 | this.send_event( 349 | eventValues[0], 350 | actionValue, 351 | window.location.pathname, 352 | { service: 'ao_no_sampling' } 353 | ); 354 | }, 355 | 356 | /** 357 | * Attaches handlers for event tracking. 358 | * 359 | * To enable click tracking for a link, add a `data-event-click-tracking` 360 | * attribute containing the Google Analytics Event Category and Action, separated 361 | * by a vertical pipe (|). 362 | * e.g. `` 363 | * 364 | * To enable form submit tracking, add a `data-event-form-tracking` attribute 365 | * to the `form` tag. 366 | * e.g. `
` 367 | * 368 | * Additional tracking options can be added via a `data-event-tracking-options` 369 | * parameter. This parameter, if included, should be a JSON string of the parameters. 370 | * Valid parameters are: 371 | * - service {string}: Corresponds to the Google Analytics property data values flow into 372 | */ 373 | set_up_event_tracking: function set_up_event_tracking() { 374 | var self = this; 375 | var clickTrackingAttributeName = 'event-click-tracking'; 376 | var formTrackingAttributeName = 'event-form-tracking'; 377 | var trackingOptionsAttributeName = 'event-tracking-options'; 378 | 379 | function makeActionHandler(attributeName) { 380 | return function actionHandler(event) { 381 | var $currentTarget; 382 | var categoryAction; 383 | var categoryActionParts; 384 | var options; 385 | var submitFormFunction; 386 | $currentTarget = $(event.currentTarget); 387 | if (!$currentTarget) return; 388 | categoryAction = $currentTarget.data(attributeName); 389 | if (!categoryAction) return; 390 | categoryActionParts = categoryAction.split('|'); 391 | options = $currentTarget.data(trackingOptionsAttributeName) || {}; // Converts to JSON 392 | self.send_event( 393 | categoryActionParts[0], 394 | categoryActionParts[1], 395 | window.location.pathname, 396 | options.service ? { service: options.service } : {} 397 | ); 398 | }; 399 | } 400 | $(document).on( 401 | 'click', 402 | '[data-' + clickTrackingAttributeName + ']', 403 | makeActionHandler(clickTrackingAttributeName) 404 | ); 405 | $(document).on( 406 | 'submit', 407 | 'form[data-' + formTrackingAttributeName + ']', 408 | makeActionHandler(formTrackingAttributeName) 409 | ); 410 | }, 411 | 412 | /** 413 | * @returns {Object[]} 414 | */ 415 | get_data_packets: function get_data_packets() { 416 | return [this.values]; 417 | }, 418 | }; 419 | }()); 420 | // @license-end 421 | -------------------------------------------------------------------------------- /motiontable.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | motiontable 18 | 19 | 20 | 21 | 22 | 23 | 24 | 50 | 51 | 52 | 53 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 85 |
86 |
87 |
88 | 90 |
91 |
95 | 96 | 97 | 98 | 99 |
100 | 101 | 102 | 113 | 114 | 115 |
116 | 117 | 118 | 119 |
120 | 121 | 122 |
123 | 124 | 125 | 126 | 132 |
133 | 134 | 135 |
136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 |
211 |

262 |
263 | 264 | 265 | 266 |
© 2015 Kazuki Akamine.
267 | Musashino Art Univercity
Graduation work
268 | 269 |
270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 286 | -------------------------------------------------------------------------------- /动效周期表/motiontable.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | motiontable 18 | 19 | 20 | 21 | 22 | 23 | 24 | 50 | 51 | 52 | 53 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 85 |
86 |
87 |
88 | 90 |
91 |
95 | 96 | 97 | 98 | 99 |
100 | 101 | 102 |
103 | 104 |
ABOUT
105 |
Work List 106 |
107 | 108 |
Download 109 |
110 | 111 | 112 |
113 | 114 | 115 |
116 | 117 | 118 | 119 |
120 | 121 | 122 |
123 | 124 | 125 | 126 | 132 |
133 | 134 | 135 |
136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 |
211 |

262 |
263 | 264 | 265 | 266 |
© 2015 Kazuki Akamine.
267 | Musashino Art Univercity
Graduation work
268 | 269 |
270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 286 | -------------------------------------------------------------------------------- /动效周期表/motiontable_files/ait-client-rewrite.js: -------------------------------------------------------------------------------- 1 | // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0 2 | //============================================ 3 | // Wayback Common JS Library 4 | //============================================ 5 | 6 | var WB_wombat_replayServer; 7 | var WB_wombat_replayPrefix; 8 | var WB_wombat_replayDatePrefix; 9 | var WB_wombat_captureDatePart; 10 | var WB_wombat_origHost; 11 | 12 | //Location objects 13 | var WB_wombat_self_location; 14 | var WB_wombat_top_location; 15 | var WB_wombat_opener_location; 16 | 17 | // Domain 18 | var WB_wombat_document_domain; 19 | 20 | //function to allow jquery expando requests (http://stackoverflow.com/questions/7200722/jquery-expando-properties), 21 | //which return a function that has its name defined in a parameter of the request, to be executed. we rewrite the function call elsewhere (see 22 | //ArchiveUrlReplay.xml) and then define it here to ensure it exists. expando function include current timestamp so we can never replay them without 23 | //overriding default expando behavior 24 | function jQueryREWRITTEN_BY_WAYBACK() { 25 | o=arguments; 26 | } 27 | 28 | function WB_Get_Domain(href) { 29 | var a = document.createElement('a'); 30 | 31 | a.href = href; 32 | return a.protocol + "//" + a.hostname; 33 | } 34 | 35 | function WB_StripPort(str) { 36 | var hostWithPort = str.match(/^http:\/\/[\w\d@.-]+:\d+/); 37 | if (hostWithPort) { 38 | var hostName = hostWithPort[0].substr(0, hostWithPort[0].lastIndexOf(':')); 39 | return hostName + str.substr(hostWithPort[0].length); 40 | } 41 | 42 | return str; 43 | } 44 | 45 | function WB_IsHostUrl(str) { 46 | // Good guess that's its a hostname 47 | if (str.indexOf("www.") == 0) { 48 | return true; 49 | } 50 | 51 | // hostname:port (port required) 52 | var matches = str.match(/^[\w-]+(\.[\w-_]+)+(:\d+)(\/|$)/); 53 | if (matches && (matches[0].length < 64)) { 54 | return true; 55 | } 56 | 57 | // ip:port 58 | matches = str.match(/^\d+\.\d+\.\d+\.\d+(:\d+)?(\/|$)/); 59 | if (matches && (matches[0].length < 64)) { 60 | return true; 61 | } 62 | 63 | return false; 64 | } 65 | 66 | function WB_RewriteUrl(url) { 67 | var httpPrefix = "http://"; 68 | var httpsPrefix = "https://"; 69 | 70 | if (!url) { 71 | return url; 72 | } 73 | 74 | // If not dealing with a string, get string version and try to convert it 75 | if ((typeof url) != "string") { 76 | url = url.toString(); 77 | } 78 | 79 | // If starts with prefix, no rewriting needed 80 | // Only check replay prefix (no date) as date may be different for each capture 81 | if (url.indexOf(WB_wombat_replayServer) == 0) { 82 | return url; 83 | } 84 | 85 | // If server relative url, add prefix and original host 86 | if (WB_IsRelativeUrl(url)) { 87 | 88 | // Already a relative url, don't make any changes! 89 | if (url.indexOf(WB_wombat_captureDatePart) >= 0) { 90 | return url; 91 | } 92 | 93 | return WB_wombat_replayDatePrefix + WB_wombat_origHost + url; 94 | } 95 | 96 | // If full url starting with http:// add http prefix 97 | if (url.indexOf(httpPrefix) == 0) { 98 | return WB_wombat_replayDatePrefix.replace("https://", "http://") + url; 99 | } 100 | 101 | // If full url starting with https:// add https prefix 102 | if (url.indexOf(httpsPrefix) == 0) { 103 | return WB_wombat_replayDatePrefix.replace("http://", "https://") + url; 104 | } 105 | 106 | // May or may not be a hostname, call function to determine 107 | // If it is, add the prefix and make sure port is removed 108 | if (WB_IsHostUrl(url)) { 109 | return WB_wombat_replayDatePrefix + httpPrefix + url; 110 | } 111 | 112 | return url; 113 | } 114 | 115 | //determine if url is server or path relative or not 116 | function WB_IsRelativeUrl(url) { 117 | 118 | if (url) { 119 | var urlType = (typeof url); 120 | 121 | if (urlType == "string") { 122 | return (url.charAt(0) == "/" || url.charAt(0) == "."); 123 | } else if (urlType == "object") { 124 | return (url.href && (url.href.charAt(0) == "/" || url.charAt(0) == ".")); 125 | } 126 | } 127 | 128 | return false; 129 | } 130 | 131 | //http://wayback.archive-it.org/1000000016/20140801164720/http://www.w3.org/2000/svg -> http://www.w3.org/2000/svg - for https://webarchive.jira.com/browse/ARI-3906 132 | function WB_UnRewriteUrl(url) { 133 | return WB_ExtractOrig(url); 134 | } 135 | 136 | function WB_CopyObjectFields(obj) { 137 | var newObj = {}; 138 | 139 | for (prop in obj) { 140 | if ((typeof obj[prop]) != "function") { 141 | newObj[prop] = obj[prop]; 142 | } 143 | } 144 | 145 | return newObj; 146 | } 147 | 148 | function WB_ExtractOrigNoProtocol(href) { 149 | 150 | var lHref = WB_ExtractOrig(href); 151 | 152 | if (lHref.slice(0, 5) == "http:") { 153 | return lHref.slice(5); 154 | } 155 | else if (lHref.slice(0, 6) == "https:") { 156 | return lHref.slice(6); 157 | } 158 | 159 | return lHref; 160 | } 161 | 162 | function WB_ExtractOrig(href) { 163 | if (!href) { 164 | return ""; 165 | } 166 | href = href.toString(); 167 | var index = href.indexOf("/http", 1); 168 | if (index > 0) { 169 | return href.substr(index + 1); 170 | } else { 171 | return href; 172 | } 173 | } 174 | 175 | //solution from http://stackoverflow.com/questions/4497531/javascript-get-url-path 176 | function WB_GetPath(href) { 177 | var a = document.createElement('a'); 178 | a.href = href; 179 | return a.pathname; 180 | } 181 | 182 | //solution from http://stackoverflow.com/questions/4497531/javascript-get-url-path 183 | //specifically, user stecb's answer 184 | function WB_ExtractOrigPathname(href) { 185 | var origHref = WB_ExtractOrig(href); 186 | return WB_GetPath(origHref); 187 | } 188 | 189 | function WB_ExtractOrigPathnameAndQueryString(href) { 190 | 191 | var origHref = WB_ExtractOrig(href); 192 | 193 | var a = document.createElement('a'); 194 | a.href = origHref; 195 | 196 | if (WB_EndsWith(origHref, "?")) { 197 | return a.pathname + "?"; 198 | } 199 | 200 | return a.pathname + a.search; 201 | } 202 | 203 | function WB_EndsWith(str, endingStr) { 204 | return str.indexOf(endingStr, str.length - endingStr.length) !== -1; 205 | } 206 | 207 | //solution from http://stackoverflow.com/questions/4497531/javascript-get-url-path 208 | function WB_ExtractOrigSearch(href) { 209 | var origHref = WB_ExtractOrig(href); 210 | var a = document.createElement('a'); 211 | a.href = origHref; 212 | return a.search; 213 | } 214 | 215 | // rewrite orig href to https if it is http and the page is being loaded as https 216 | // this is to deal with Firefox mixed content security which restricts loading http urls from a page 217 | // loaded over https 218 | function WB_fixProtocol(href) { 219 | if (!href) { 220 | return ""; 221 | } 222 | 223 | if (location.protocol == "https:") { 224 | if (href.slice(0, 5) == "http:") { 225 | href = "https:" + href.slice(5); 226 | } 227 | } 228 | return href; 229 | } 230 | 231 | function WB_CopyLocationObj(loc) { 232 | var newLoc = WB_CopyObjectFields(loc); 233 | 234 | newLoc._origLoc = loc; 235 | newLoc._origHref = loc.href; 236 | 237 | // Rewrite replace and assign functions 238 | newLoc.replace = function(url) { this._origLoc.replace(WB_RewriteUrl(url)); }; 239 | newLoc.assign = function(url) { this._origLoc.assign(WB_RewriteUrl(url)); }; 240 | newLoc.reload = function() { this._origLoc.reload(); }; 241 | newLoc.href = WB_fixProtocol(WB_ExtractOrig(newLoc._origHref)); 242 | newLoc.pathname = WB_ExtractOrigPathname(newLoc._origHref); 243 | newLoc.search = WB_ExtractOrigSearch(newLoc._origHref); 244 | newLoc.toString = function() { return this.href; }; 245 | newLoc.hash = loc.hash; 246 | 247 | newLoc.lasthash = loc.hash; 248 | newLoc.lastSearch = newLoc.search 249 | 250 | return newLoc; 251 | } 252 | 253 | //override createElementNS JS function in order to ensure namespace is correct - for https://webarchive.jira.com/browse/ARI-3906 254 | function WB_CreateElementNS(namespace, elementName) { 255 | namespace = WB_UnRewriteUrl(namespace); 256 | return document.createElementNS(namespace, elementName); 257 | } 258 | 259 | function WB_wombat_updateLoc(reqHref, origHref, loc, wbSearchLoc) { 260 | if (reqHref) { 261 | if (WB_IsRelativeUrl(reqHref)) { 262 | //for relative paths, just compare the paths + query string, not full urls 263 | if (WB_ExtractOrigPathnameAndQueryString(origHref) != reqHref) { 264 | loc.href = WB_RewriteUrl(reqHref); 265 | return true; 266 | } 267 | } 268 | else { 269 | //for full urls, compare everything but leading protocol (http or https) 270 | if (WB_ExtractOrigNoProtocol(origHref) != WB_ExtractOrigNoProtocol(reqHref)) { 271 | loc.href = WB_RewriteUrl(reqHref); 272 | return true; 273 | } 274 | } 275 | } 276 | if (wbSearchLoc) { 277 | if (loc.search != wbSearchLoc) { 278 | console.log('replacing browser location.search with %s', wbSearchLoc); 279 | loc.search = wbSearchLoc; 280 | } 281 | } 282 | 283 | return false; 284 | } 285 | 286 | function WB_wombat_checkLocationChange(wbLoc, isTop) { 287 | 288 | var has_updated = null; 289 | var locType = (typeof wbLoc); 290 | 291 | var location = (isTop ? window.top.location : window.location); 292 | 293 | // String has been assigned to location, so assign it 294 | if (locType == "string") { 295 | has_updated = WB_wombat_updateLoc(wbLoc, location.href, location); 296 | } else if (locType == "object") { 297 | var search = wbLoc.search != wbLoc.lastSearch ? wbLoc.search : null; 298 | has_updated = WB_wombat_updateLoc(wbLoc.href, wbLoc._origHref, location, search); 299 | } 300 | 301 | if (WB_wombat_self_location.hash != WB_wombat_self_location.lasthash) { 302 | //if wombat hash has been updated, make sure it's in sync with window.location hash 303 | window.location.hash = WB_wombat_self_location.hash; 304 | } else if (window.location.hash != WB_wombat_self_location.hash) { 305 | //if window.location.hash has been updated before wombat hash, handle this here 306 | WB_wombat_self_location.hash = window.location.hash; 307 | } 308 | 309 | WB_wombat_self_location.lasthash = WB_wombat_self_location.hash; 310 | 311 | return has_updated; 312 | } 313 | 314 | var wombat_updating = false; 315 | 316 | function WB_wombat_checkLocations() { 317 | 318 | if (wombat_updating) { 319 | return false; 320 | } 321 | wombat_updating = true; 322 | 323 | var updated_self = WB_wombat_checkLocationChange(document.WB_wombat_self_location, false); 324 | 325 | if (!updated_self) { 326 | updated_self = WB_wombat_checkLocationChange(WB_wombat_self_location, false); 327 | } 328 | 329 | var updated_top = null; 330 | 331 | if (document.WB_wombat_self_location != WB_wombat_top_location) { 332 | updated_top = WB_wombat_checkLocationChange(WB_wombat_top_location, true); 333 | if (!updated_top) { 334 | if (WB_wombat_self_location != WB_wombat_top_location) { 335 | updated_top = WB_wombat_checkLocationChange(WB_wombat_top_location, true); 336 | } 337 | } 338 | } 339 | 340 | //for https://webarchive.jira.com/browse/ARI-3955 341 | if (updated_self || updated_top) { 342 | return false; 343 | } 344 | 345 | wombat_updating = false; 346 | } 347 | 348 | //copied from https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage 349 | function WB_wombat_Override_LocalStorage() { 350 | Object.defineProperty(window, "localStorage", new (function () { 351 | var aKeys = [], oStorage = {}; 352 | Object.defineProperty(oStorage, "getItem", { 353 | value: function (sKey) { return sKey ? (this[sKey] ? this[sKey] : null) : null; }, 354 | writable: false, 355 | configurable: false, 356 | enumerable: false 357 | }); 358 | Object.defineProperty(oStorage, "key", { 359 | value: function (nKeyId) { return aKeys[nKeyId]; }, 360 | writable: false, 361 | configurable: false, 362 | enumerable: false 363 | }); 364 | Object.defineProperty(oStorage, "setItem", { 365 | value: function (sKey, sValue) { 366 | if(!sKey) { return; } 367 | document.cookie = escape(sKey) + "=" + escape(sValue) + "; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"; 368 | }, 369 | writable: false, 370 | configurable: false, 371 | enumerable: false 372 | }); 373 | Object.defineProperty(oStorage, "length", { 374 | get: function () { return aKeys.length; }, 375 | configurable: false, 376 | enumerable: false 377 | }); 378 | Object.defineProperty(oStorage, "removeItem", { 379 | value: function (sKey) { 380 | if(!sKey) { return; } 381 | document.cookie = escape(sKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"; 382 | }, 383 | writable: false, 384 | configurable: false, 385 | enumerable: false 386 | }); 387 | this.get = function () { 388 | var iThisIndx; 389 | for (var sKey in oStorage) { 390 | iThisIndx = aKeys.indexOf(sKey); 391 | if (iThisIndx === -1) { oStorage.setItem(sKey, oStorage[sKey]); } 392 | else { aKeys.splice(iThisIndx, 1); } 393 | delete oStorage[sKey]; 394 | } 395 | for (aKeys; aKeys.length > 0; aKeys.splice(0, 1)) { oStorage.removeItem(aKeys[0]); } 396 | for (var aCouple, iKey, nIdx = 0, aCouples = document.cookie.split(/\s*;\s*/); nIdx < aCouples.length; nIdx++) { 397 | aCouple = aCouples[nIdx].split(/\s*=\s*/); 398 | if (aCouple.length > 1) { 399 | oStorage[iKey = unescape(aCouple[0])] = unescape(aCouple[1]); 400 | aKeys.push(iKey); 401 | } 402 | } 403 | return oStorage; 404 | }; 405 | this.configurable = false; 406 | this.enumerable = true; 407 | })()); 408 | } 409 | 410 | function WB_wombat_Init(replayPrefix, captureDate, origHost) { 411 | WB_wombat_replayServer = location.protocol + "//" + location.host; 412 | 413 | try { 414 | var collectionId = /https?:\/\/wayback\..*archive-it\.org\/([\d]+(?:-test)?)/.exec(replayPrefix)[1]; 415 | WB_wombat_replayPrefix = WB_wombat_replayServer + "/" + collectionId + "/"; 416 | } catch (exc) { 417 | WB_wombat_replayPrefix = replayPrefix; 418 | } 419 | 420 | WB_wombat_replayDatePrefix = WB_wombat_replayPrefix + captureDate + "/"; 421 | WB_wombat_captureDatePart = "/" + captureDate + "/"; 422 | 423 | WB_wombat_origHost = "http://" + origHost; 424 | 425 | WB_wombat_self_location = WB_CopyLocationObj(window.self.location); 426 | WB_wombat_top_location = ((window.self.location != window.top.location) ? WB_CopyLocationObj(window.top.location) : WB_wombat_self_location); 427 | 428 | WB_wombat_opener_location = null; 429 | //try catch for https://webarchive.jira.com/browse/ARI-3715 430 | try { 431 | WB_wombat_opener_location = (window.opener ? WB_CopyLocationObj(window.opener.location) : null); 432 | } catch (err) { 433 | console.log(err); 434 | } 435 | 436 | //WB_wombat_document_domain = document.domain; 437 | WB_wombat_document_domain = origHost; 438 | 439 | // For https://webarchive.jira.com/browse/ARI-3985 440 | document.WB_wombat_self_location = WB_wombat_self_location; 441 | 442 | //override window.open function so that a new window will have WB_wombat_self_location as a member since wombat 443 | //rewriting may change window.location to window.WB_wombat_self_location 444 | //for https://webarchive.jira.com/browse/ARI-4006 445 | var originalOpenFunction = window.open; 446 | 447 | window.open = function (url, windowName, windowFeatures) { 448 | var newWindow = originalOpenFunction(url, windowName, windowFeatures); 449 | 450 | newWindow.WB_wombat_self_location = newWindow.self.location; 451 | 452 | return newWindow; 453 | }; 454 | 455 | var originalHistoryPushStateFunction = history.pushState; 456 | 457 | //override pushState and replaceState history functions so we can retain the correct archival format //livesiteurl in the browsers location bar 458 | //if the site is using these methods. for https://webarchive.jira.com/browse/ARI-4068 459 | history.pushState = function (stateObject, title, url) { 460 | 461 | var rewrittenUrl = null; 462 | 463 | if (url) { 464 | rewrittenUrl = WB_GetPath(WB_RewriteUrl(WB_GetPath(url))) + WB_ExtractOrigSearch(url); 465 | } 466 | 467 | if (stateObject) { 468 | if (stateObject.path) { 469 | stateObject.path = WB_GetPath(WB_RewriteUrl(WB_GetPath(stateObject.path))) + WB_ExtractOrigSearch(stateObject.path); 470 | } 471 | } 472 | 473 | originalHistoryPushStateFunction.call(history, stateObject, title, rewrittenUrl); 474 | }; 475 | 476 | var originalHistoryReplaceStateFunction = history.replaceState; 477 | 478 | history.replaceState = function (stateObject, title, url) { 479 | 480 | var rewrittenUrl = null; 481 | 482 | if (url) { 483 | rewrittenUrl = WB_GetPath(WB_RewriteUrl(WB_GetPath(url))) + WB_ExtractOrigSearch(url); 484 | } 485 | 486 | if (stateObject) { 487 | if (stateObject.path) { 488 | stateObject.path = WB_GetPath(WB_RewriteUrl(WB_GetPath(stateObject.path))) + WB_ExtractOrigSearch(stateObject.path); 489 | } 490 | } 491 | 492 | originalHistoryReplaceStateFunction.call(history, stateObject, title, rewrittenUrl); 493 | }; 494 | 495 | window.originalPostMessageFunction = window.postMessage; 496 | 497 | window.WB_PostMessage_Fixup = function(target, message, targetOrigin, transfer) { 498 | target.originalPostMessageFunction.call(target, message, targetOrigin, transfer); 499 | } 500 | 501 | window.WB_PostMessage = function(callingWindow, message, targetOrigin, transfer) { 502 | var rewrittenTargetOrigin; 503 | 504 | if (targetOrigin) { 505 | rewrittenTargetOrigin = WB_Get_Domain(WB_RewriteUrl(targetOrigin)); 506 | } 507 | 508 | //detect condition of window containing current function not 509 | //being the window from which the function was called 510 | if (window !== callingWindow) { 511 | //make sure to call postMessage from the same window the live site would call from 512 | //this may not occur as each window (iframes included) has an overidden WB_PostMessage 513 | callingWindow.WB_PostMessage_Fixup(window, message, rewrittenTargetOrigin, transfer); 514 | } 515 | else { 516 | window.originalPostMessageFunction.call(window, message, rewrittenTargetOrigin, transfer); 517 | } 518 | } 519 | 520 | document.WB_wombat_self_location = WB_wombat_self_location; 521 | 522 | //from http://stackoverflow.com/questions/2638292/after-travelling-back-in-firefox-history-javascript-wont-run - for https://webarchive.jira.com/browse/ARI-4118 523 | window.onunload = function(){}; 524 | 525 | WB_Wombat_SetCookies(WB_wombat_self_location._origHref, location.protocol + "//" + origHost, replayPrefix.split("/")[3], captureDate); 526 | 527 | //for https://webarchive.jira.com/browse/ARI-4161 - error in Scott Reed's Firefox: NS_ERROR_DOM_QUOTA_REACHED Persistent storage maximum size reached 528 | try { 529 | WB_wombat_Override_LocalStorage(); 530 | } catch (e) { 531 | console.log("WB_wombat_Override_LocalStorage error: " + e); 532 | } 533 | 534 | var proxied = window.XMLHttpRequest.prototype.open; 535 | window.XMLHttpRequest.prototype.open = function() { 536 | //only set withCredentials == true if request is to wayback and ready state is correct for withCredentials 537 | //otherwise withCredentials == true will block requests to analytics site. 538 | if ((this.readyState == 0 || this.readyState == 1) && 539 | (arguments[1].indexOf(WB_wombat_replayPrefix) == 0 || arguments[1].indexOf("/") == 0)) { 540 | 541 | this.withCredentials=true; 542 | } 543 | 544 | return proxied.apply(this, [].slice.call(arguments)); 545 | }; 546 | } 547 | 548 | // determine if current page executing javascript is an embedded page or not 549 | function WB_Wombat_IsEmbedded() { 550 | return window.self !== window.top; 551 | } 552 | 553 | function WB_Wombat_SetCookies(origHref, origHost, collectionId, captureDate) { 554 | 555 | //only set wayback.initiatingpage cookie for "top-level" pages, otherwise, Wayback QA could mark down missing 556 | //urls under the wrong containing page since wayback.initiatingpage cookie is used to determine 557 | //the containing page 558 | if (!WB_Wombat_IsEmbedded()) { 559 | document.cookie="wayback.initiatingpage=" + encodeURIComponent(origHref) + "; path=/"; 560 | } 561 | 562 | document.cookie="wayback.archivalhost=" + encodeURIComponent(origHost) + "; path=/"; 563 | document.cookie="wayback.collectionid=" + collectionId + "; path=/"; 564 | document.cookie="wayback.timestamp=" + captureDate + "; path=/"; 565 | } 566 | 567 | //copied from http://stackoverflow.com/questions/1833588/javascript-clone-a-function 568 | Function.prototype.clone = function() { 569 | var cloneObj = this; 570 | if(this.__isClone) { 571 | cloneObj = this.__clonedFrom; 572 | } 573 | 574 | var temp = function() { return cloneObj.apply(this, arguments); }; 575 | for(var key in this) { 576 | temp[key] = this[key]; 577 | } 578 | 579 | temp.__isClone = true; 580 | temp.__clonedFrom = cloneObj; 581 | 582 | return temp; 583 | }; 584 | 585 | // Check quickly after page load 586 | setTimeout(WB_wombat_checkLocations, 100); 587 | //setTimeout(WB_wombat_checkLocations, 1000); 588 | 589 | // Check periodically every few seconds 590 | setInterval(WB_wombat_checkLocations, 500); 591 | // @license-end 592 | -------------------------------------------------------------------------------- /动效周期表/motiontable_files/toolbar.js: -------------------------------------------------------------------------------- 1 | // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0 2 | if(typeof __wm==="undefined") __wm={}; 3 | (function(){ 4 | var _JSON = typeof __wbhack != 'undefined' ? __wbhack.JSON : JSON; 5 | var prettyMonths = [ 6 | "Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]; 7 | var $D=document,$R=document,$=function(n){return $R.getElementById(n)}; 8 | 9 | function formatNumber(n) { 10 | return (''+n).replace(/\B(?=(\d{3})+$)/g, ','); 11 | } 12 | var ajax=__wm.ajax=function ajax(method, url, callback, headers, data) { 13 | var xmlhttp; 14 | if (window.XMLHttpRequest) { 15 | xmlhttp = new XMLHttpRequest(); 16 | } else { 17 | xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 18 | } 19 | xmlhttp.onreadystatechange = function() { 20 | if (this.readyState == 4) { 21 | callback(xmlhttp); 22 | } 23 | }; 24 | xmlhttp.open(method, url, true); 25 | if (headers) { 26 | for (var header in headers) { 27 | if (headers.hasOwnProperty(header)) { 28 | xmlhttp.setRequestHeader(header, headers[header]); 29 | } 30 | } 31 | } 32 | // pass cookies for user authorization 33 | xmlhttp.withCredentials = true; 34 | xmlhttp.send(data); 35 | } 36 | 37 | __wm.h=function hideToolbar(ev) { 38 | $("wm-ipp").style.display="none"; 39 | ev.stopPropagation(); 40 | } 41 | 42 | var $expand, $capinfo; 43 | 44 | __wm.bt=function bootstrap(imgWidth,imgHeight,yearImgWidth,monthImgWidth, 45 | coll,wbCurrentUrl,captureDate,firstYear, 46 | static_prefix,bannerCss) { 47 | __wm.static_prefix = static_prefix || '/static/'; 48 | var wbPrefix='/'+(coll||'web')+'/'; 49 | captureDate = captureDate.split('-'); 50 | var displayDay = captureDate[2]; 51 | var displayMonth = captureDate[1]; 52 | var displayYear = captureDate[0]; 53 | var trackerVal,curYear = -1,curMonth = -1; 54 | var yearTracker,monthTracker; 55 | 56 | // move #wm-ipp content to its shadowRoot if supported 57 | var wmipp = $('wm-ipp-base'); 58 | if (wmipp.attachShadow){ 59 | var shadow = wmipp.attachShadow({mode:'open'}); 60 | $R = shadow; // this changes the base of $() 61 | var nav = wmipp.children[0];nav.id='wm-ipp'; 62 | shadow.appendChild(nav); 63 | if (bannerCss) { 64 | for(var i = 0; i < bannerCss.length; i++) { 65 | var link = $D.createElement('link'); 66 | link.setAttribute('rel', 'stylesheet'); 67 | link.setAttribute('type', 'text/css'); 68 | link.setAttribute('href', static_prefix + bannerCss[i]); 69 | shadow.appendChild(link); 70 | } 71 | } 72 | } 73 | if (window.top == window.self) { 74 | wmipp.style.display = "block"; 75 | } 76 | 77 | var modalIsOpen = false, bannerIsVisible = true; 78 | 79 | function processMessage(ev) { 80 | if (ev.origin.indexOf('archive.org') === -1) 81 | return; 82 | // donation banner sends msg as JSON string. 83 | var msg = typeof ev.data == "string" ? _JSON.parse(ev.data) : ev.data; 84 | console.log('got message %o', msg); 85 | if (msg.event == 'set height') { 86 | var iHeight = msg.value; // iframe height 87 | var bHeight = msg.bannerHeight; // banner height 88 | if (typeof iHeight !== "number" || iHeight <= 0) return; 89 | if (!bannerIsVisible) return; 90 | prevHeight = msg.value; 91 | if (modalIsOpen) { 92 | return; 93 | } 94 | $donato.style.height = bHeight + 'px'; 95 | $donatoBase.style.height = iHeight + 'px'; 96 | } else if (msg.event == 'open modal') { 97 | $donatoBase.style.height = ''; 98 | document.body.classList.add('wm-modal'); 99 | window.scrollTo(0, 0); 100 | modalIsOpen = true; 101 | } else if (msg.event == 'close modal') { 102 | $donato.style.marginBottom = '0px'; 103 | document.body.classList.remove('wm-modal'); 104 | modalIsOpen = false; 105 | } else if (msg.event == 'hide banner') { 106 | $donato.style.height = 0; 107 | var expires = new Date(Date.now() + msg.value*24*3600*1000); 108 | document.cookie = 'donation=x; domain=archive.org; path=/; expires=' + 109 | expires.toUTCString(); 110 | bannerIsVisible = false; 111 | modalIsOpen = false; 112 | prevHeight = 0; 113 | } 114 | } 115 | 116 | var $donato = document.getElementById('donato'); 117 | if ($donato) { 118 | if (window.top != window.self) { 119 | $donato.style.display = 'none'; 120 | } else { 121 | var $donatoBase = document.getElementById('donato-base'); 122 | window.addEventListener('message', processMessage, false); 123 | } 124 | } 125 | var $spk=$('wm-ipp-sparkline') 126 | $expand=$('wm-expand'); 127 | $capinfo=$('wm-capinfo'); 128 | 129 | function showTrackers(event) { 130 | var val = event.type=="mouseenter"?1:0; 131 | if (val===trackerVal) return; 132 | var $ipp=$("wm-ipp"); 133 | var $y=$("displayYearEl"),$m=$("displayMonthEl"),$d=$("displayDayEl"); 134 | if (val) { 135 | $ipp.className="hi"; 136 | } else { 137 | $ipp.className=""; 138 | $y.innerHTML=displayYear;$m.innerHTML=prettyMonths[displayMonth-1];$d.innerHTML=displayDay; 139 | } 140 | yearTracker.style.display=val?"inline":"none"; 141 | monthTracker.style.display=val?"inline":"none"; 142 | trackerVal = val; 143 | } 144 | function getElementX2(el) { 145 | var de = $D.documentElement; 146 | var box = (typeof el.getBoundingClientRect!=='undefied')? 147 | el.getBoundingClientRect():{top:0,left:0}; 148 | return box.left + (window.pageXOffset||de.scrollLeft)-(de.clientLeft||0); 149 | } 150 | function navCaptures(captures) { 151 | var $e = $("wm-nav-captures"); 152 | var count = 0; 153 | var years = captures.years; 154 | var first_ts = captures.first_ts, last_ts = captures.last_ts; 155 | for (var j = 0; j < years.length; j++) { 156 | var months = years[j][1]; 157 | for (var i = 0; i < months.length; i++) { 158 | count += months[i]; 159 | } 160 | } 161 | var html = '' + 163 | formatNumber(count) + ' ' + 164 | (count > 1 ? "captures" : "capture") + ''; 165 | var timespan = __wbTs.format(first_ts, '%d %b %Y'); 166 | if (last_ts != first_ts) { 167 | timespan += ' - ' + __wbTs.format(last_ts, '%d %b %Y'); 168 | } 169 | html += '
' + 170 | timespan + '
'; 171 | $e.innerHTML = html; 172 | } 173 | function trackMouseMove(event) { 174 | //var element = event.target; 175 | var element = $spk; 176 | var eventX = getEventX(event); 177 | var elementX = getElementX2(element); 178 | var xOff = Math.min(Math.max(0, eventX - elementX),imgWidth); 179 | var monthOff = xOff % yearImgWidth; 180 | 181 | var year = Math.floor(xOff / yearImgWidth); 182 | var monthOfYear = Math.min(11,Math.floor(monthOff / monthImgWidth)); 183 | // 1 extra border pixel at the left edge of the year: 184 | var month = (year * 12) + monthOfYear; 185 | var day = monthOff % 2==1?15:1; 186 | var dateString = zeroPad(year + firstYear) + zeroPad(monthOfYear+1,2) + 187 | zeroPad(day,2) + "000000"; 188 | 189 | $("displayYearEl").innerHTML=year+firstYear; 190 | $("displayMonthEl").innerHTML=prettyMonths[monthOfYear]; 191 | // looks too jarring when it changes.. 192 | //$("displayDayEl").innerHTML=zeroPad(day,2); 193 | var url = wbPrefix + dateString + '/' + wbCurrentUrl; 194 | $("wm-graph-anchor").href=url; 195 | 196 | if(curYear != year) { 197 | var yrOff = year * yearImgWidth; 198 | yearTracker.style.left = yrOff + "px"; 199 | curYear = year; 200 | } 201 | if(curMonth != month) { 202 | var mtOff = year + (month * monthImgWidth) + 1; 203 | monthTracker.style.left = mtOff + "px"; 204 | curMonth = month; 205 | } 206 | } 207 | function disclaimElement(element) { 208 | if (window.top == window.self) { 209 | element.style.display = "block"; 210 | $D.body.insertBefore(element, $D.body.firstChild); 211 | } 212 | } 213 | yearTracker=$D.createElement('div'); 214 | yearTracker.className='yt'; 215 | with(yearTracker.style){ 216 | display='none';width=yearImgWidth+"px";height=imgHeight+"px"; 217 | } 218 | monthTracker=$D.createElement('div'); 219 | monthTracker.className='mt'; 220 | with(monthTracker.style){ 221 | display='none';width=monthImgWidth+"px";height=imgHeight+"px"; 222 | } 223 | $spk.appendChild(yearTracker); 224 | $spk.appendChild(monthTracker); 225 | 226 | var $cv=$('wm-sparkline-canvas'); 227 | $spk.onmouseenter=showTrackers; 228 | $spk.onmouseleave=showTrackers; 229 | $spk.onmousemove=trackMouseMove; 230 | 231 | //var $ipp=$("wm-ipp"); 232 | //$ipp&&disclaimElement($ipp); 233 | 234 | var canvas = $('wm-sparkline-canvas'); 235 | if (!!(canvas.getContext && canvas.getContext('2d'))) { 236 | var sparkline_url = "/__wb/sparkline?output=json&url=" + 237 | encodeURIComponent(wbCurrentUrl) + 238 | (coll && "&collection=" + coll || ''); 239 | ajax("GET", sparkline_url, function(response) { 240 | if(response.status == 200) { 241 | var capnav=_JSON.parse(response.responseText); 242 | var yearsobj = capnav.years; 243 | var ykeys = Object.getOwnPropertyNames(yearsobj); 244 | var years = (capnav.years = []); 245 | for (var i = 0; i < ykeys.length; i++) { 246 | var y = ykeys[i]; 247 | if (yearsobj[y]) { 248 | years.push([y, yearsobj[y]]); 249 | } 250 | } 251 | navCaptures(capnav); 252 | sparkline(capnav,imgWidth,imgHeight,canvas, 253 | firstYear, displayYear, displayMonth); 254 | } 255 | }); 256 | } else { 257 | var sparklineImg = new Image(); 258 | sparklineImg.src = "/__wb/sparkline?url=" + 259 | encodeURIComponent(wbCurrentUrl) + 260 | "&width=" + imgWidth + "&height=" + imgHeight + 261 | "&selected_year=" + displayYear + "&selected_month=" + displayMonth + 262 | (coll && "&collection=" + coll || ''); 263 | sparklineImg.alt= "sparkline"; 264 | sparklineImg.width=imgWidth; 265 | sparklineImg.height=imgHeight; 266 | sparklineImg.id="sparklineImgId"; 267 | sparklineImg.border="0"; 268 | $cv.parentNode.replaceChild(sparklineImg, $cv); 269 | } 270 | 271 | function process_autocomplete(data) { 272 | var out = [] 273 | var len = data.length; 274 | for(var i=0; i0) { 289 | var output = process_autocomplete(data.hosts); 290 | suggest(output); 291 | } else if (typeof data.isUrl!=='undefined' && data.isUrl===true && typeof data.excluded==='undefined') { 292 | suggest([query]); 293 | } else { 294 | ajax("GET", '/__wb/search/anchor?q='+encodeURIComponent(query), 295 | function(data) { 296 | var data = _JSON.parse(data.response); 297 | if (typeof data!=='undefined' && data.length>0) { 298 | var output = process_autocomplete(data.slice(0,5)); 299 | suggest(output); 300 | } 301 | }); 302 | } 303 | }); 304 | }, 305 | onSelect: function(e, term, item) { 306 | $("wmtb").submit(); 307 | } 308 | }); 309 | $("wmtb").onsubmit = function(e) { 310 | var query = $("wmtbURL").value; 311 | // if textbox value is not a URL, redirect to search 312 | if (!(query.indexOf('http://') === 0 || query.indexOf('https://') === 0 || 313 | query.match(/[\w\.]{2,256}\.[a-z]{2,4}/gi))) { 314 | document.location.href="/web/*/" + $("wmtbURL").value; 315 | e.preventDefault(); 316 | return false; 317 | } 318 | }; 319 | }; 320 | function show_timestamps() { 321 | // Populate capinfo with capture resources if empty. If not empty, it has 322 | // already run before so avoid redoing AJAX. 323 | var $capresources=$('wm-capresources'); 324 | $capresources.innerHTML = ''; 325 | //disable caching to be able to reload list when browsing frames. 326 | //if($capresources.innerHTML.length !== 0) { 327 | // return; 328 | //} 329 | var $wmloading=$("wm-capresources-loading"); 330 | $wmloading.style.display='block'; 331 | 332 | // calculate datetime difference with capture datetime and return relative 333 | // value such as "-5 hours, 10 minutes". 334 | var capture_ts = $('wmtb').elements.date.value; 335 | var capture_msec = __wbTs.timestamp2datetime(capture_ts).getTime(); 336 | function datetime_diff(dt_str) { 337 | // not using Date.parse() because we found pages that replaces it with 338 | // its own version. This is harder to tamper, but we should use more 339 | // robust method. 340 | var dt_msec = (new Date(dt_str)).getTime(); 341 | var diff = dt_msec - capture_msec; 342 | var prefix = ""; 343 | if(diff < 0) { 344 | prefix += "-"; 345 | diff = Math.abs(diff); 346 | } else { 347 | prefix += "+"; 348 | } 349 | var highlight = false; 350 | if(diff < 1000) { 351 | // equal to the page datetime 352 | return {delta: diff, text:"", highlight: highlight}; 353 | } 354 | var total_diff = diff; 355 | var years_d = Math.floor(diff/1000/60/60/24/30/12); 356 | diff -= years_d*1000*60*60*24*30*12; 357 | var months_d = Math.floor(diff/1000/60/60/24/30); 358 | diff -= months_d*1000*60*60*24*30; 359 | var days_d = Math.floor(diff/1000/60/60/24); 360 | diff -= days_d*1000*60*60*24; 361 | var hours_d = Math.floor(diff/1000/60/60); 362 | diff -= hours_d*1000*60*60; 363 | var minutes_d = Math.floor(diff/1000/60); 364 | diff -= minutes_d*1000*60; 365 | var seconds_d = Math.floor(diff/1000); 366 | 367 | var parts = []; 368 | if(years_d > 1) { 369 | parts.push(years_d + " years"); 370 | highlight = true; 371 | } else if(years_d == 1) { 372 | parts.push(years_d + " year"); 373 | highlight = true; 374 | } 375 | if(months_d > 1) { 376 | parts.push(months_d + " months"); 377 | highlight = true; 378 | } else if(months_d == 1) { 379 | parts.push(months_d + " month"); 380 | highlight = true; 381 | } 382 | if(days_d > 1) { 383 | parts.push(days_d + " days"); 384 | } else if(days_d == 1) { 385 | parts.push(days_d + " day"); 386 | } 387 | if(hours_d > 1) { 388 | parts.push(hours_d + " hours"); 389 | } else if(hours_d == 1) { 390 | parts.push(hours_d + " hour"); 391 | } 392 | if(minutes_d > 1) { 393 | parts.push(minutes_d + " minutes"); 394 | } else if (minutes_d == 1) { 395 | parts.push(minutes_d + " minute"); 396 | } 397 | if(seconds_d > 1) { 398 | parts.push(seconds_d + " seconds"); 399 | } else if(seconds_d == 1) { 400 | parts.push(seconds_d + " second"); 401 | } 402 | if(parts.length > 2) { 403 | parts = parts.slice(0, 2); 404 | } 405 | return {delta: total_diff, text: prefix + parts.join(" "), 406 | highlight: highlight}; 407 | } 408 | // Utility method to find elements in dom (currently only img) using URL. 409 | // Also look into embedded frames recursively 410 | // Captured resources urls may have timestamps different from DOM URL 411 | // so it is not possible to search with original path 412 | // /web/20120407141544/http://example.com 413 | // we must search for URLS ENDING WITH http://example.com 414 | function find_elements_by_url(current_window, url) { 415 | var orig_url = url.split("/").splice(6).join("/"); 416 | var els=current_window.document.querySelectorAll( 417 | "img[src$='" + orig_url + "'], iframe[src$='" + orig_url + "'], frame[src$='" + orig_url + "']" 418 | ); 419 | var els_array=Array.prototype.slice.call(els); 420 | for(var i=0; i 0) { 440 | for(var i=0; i 0) { 449 | for(var i=0; i 0) { 569 | inflight_urls = 0; 570 | deduped.map(get_resource_info); 571 | } else { 572 | $capresources.innerHTML = "There are no sub-resources in the page."; 573 | $wmloading.style.display='none'; 574 | } 575 | } 576 | __wm.ex=function expand(ev) { 577 | ev.stopPropagation(); 578 | var c=$expand.className; 579 | if (c.match(/wm-closed/)) { // closed 580 | $expand.className=c.replace(/wm-closed/,'wm-open'); 581 | $capinfo.style.display='block'; 582 | show_timestamps(); 583 | } else { 584 | $expand.className=c.replace(/wm-open/,'wm-closed'); 585 | $capinfo.style.display='none'; 586 | } 587 | }; 588 | 589 | function isArray(obj) { 590 | return (typeof obj !== 'undefined' && obj && obj.constructor === Array); 591 | } 592 | 593 | function setVisibility(id, visible) { 594 | var el = $(id); 595 | if (el) { 596 | el.style.visibility = visible ? 'visible' : 'hidden'; 597 | } 598 | } 599 | 600 | function setDisplayStyle(id, display) { 601 | var el = $(id); 602 | if (el) { 603 | el.style.display = display; 604 | } 605 | } 606 | 607 | function show(ids) { 608 | if (!isArray(ids)) { 609 | ids = [ids]; 610 | } 611 | for (var i = 0; i < ids.length; i++) { 612 | setDisplayStyle(ids[i], 'inline-block'); 613 | } 614 | } 615 | 616 | function hide(ids) { 617 | if (!isArray(ids)) { 618 | ids = [ids]; 619 | } 620 | for (var i = 0; i < ids.length; i++) { 621 | setDisplayStyle(ids[i], 'none'); 622 | } 623 | } 624 | 625 | function visibility(ids, visible) { 626 | if (!isArray(ids)) { 627 | ids = [ids]; 628 | } 629 | for (var i = 0; i < ids.length; i++) { 630 | setVisibility(ids[i], visible); 631 | } 632 | } 633 | 634 | function userIsLoggedIn() { 635 | show('wm-save-snapshot-open'); 636 | hide('wm-sign-in'); 637 | } 638 | 639 | function userIsNotLoggedIn() { 640 | hide([ 641 | 'wm-save-snapshot-open', 642 | 'wm-save-snapshot-in-progress', 643 | ]); 644 | show('wm-sign-in'); 645 | } 646 | 647 | function startSnapShotSaving() { 648 | hide([ 649 | 'wm-save-snapshot-fail', 650 | 'wm-save-snapshot-open', 651 | 'wm-save-snapshot-success', 652 | ]); 653 | show([ 654 | 'wm-save-snapshot-in-progress', 655 | ]); 656 | } 657 | 658 | function successSnapshotSaving() { 659 | hide([ 660 | 'wm-save-snapshot-fail', 661 | 'wm-save-snapshot-in-progress', 662 | ]); 663 | show([ 664 | 'wm-save-snapshot-open', 665 | 'wm-save-snapshot-success', 666 | ]); 667 | } 668 | 669 | function failSnapshotSaving(err) { 670 | hide([ 671 | 'wm-save-snapshot-in-progress', 672 | 'wm-save-snapshot-success', 673 | ]); 674 | show([ 675 | 'wm-save-snapshot-fail', 676 | 'wm-save-snapshot-open', 677 | ]); 678 | } 679 | 680 | /** 681 | * Get status and response URL 682 | * which could be different in case 683 | * 684 | * @param url 685 | * @param callback 686 | */ 687 | function getOkStatusAndResponseURL (url, callback) { 688 | ajax('HEAD', url, function(response) { 689 | callback(response.status < 300, response.responseURL); 690 | }); 691 | } 692 | 693 | var screenShotTimestampRegex = /web\/(\d*)\/http:\/\/web\.archive\.org\/screenshot/g; 694 | 695 | function extractTimestampFromScreenShotRequest (url) { 696 | var res = screenShotTimestampRegex.exec(url); 697 | if (res && res[1]) { 698 | return res[1]; 699 | } 700 | return null; 701 | } 702 | 703 | /** 704 | * Check whether URL has screen shot 705 | * 706 | * @param url 707 | * @param captureTimestamp 708 | * @param callback 709 | */ 710 | function hasScreenShot (url, captureTimestamp, callback) { 711 | getOkStatusAndResponseURL( 712 | '/web/' + captureTimestamp + '/http://web.archive.org/screenshot/' + url, 713 | function (ok, redirectUrl) { 714 | if (!ok) { 715 | return callback(false); 716 | } 717 | 718 | var screenShotTimestamp = extractTimestampFromScreenShotRequest(redirectUrl); 719 | var delta = ( 720 | __wbTs.timestamp2datetime(screenShotTimestamp).getTime() - 721 | __wbTs.timestamp2datetime(captureTimestamp).getTime() 722 | ) / 1000; 723 | 724 | console.log('screen shot delta: ' + delta + 's'); 725 | // maximum difference is 1 minute 726 | var isValidScreenShotTimestamp = (delta > 0) && (delta < 60); 727 | 728 | callback(isValidScreenShotTimestamp, delta); 729 | }); 730 | } 731 | 732 | /** 733 | * check whether cookie has field 734 | * 735 | * @param name 736 | * @return boolean 737 | */ 738 | function hasCookie(name) { 739 | return document.cookie.search(name) >= 0; 740 | } 741 | 742 | __wm.saveSnapshot = function (url, timestamp, tags) { 743 | startSnapShotSaving(); 744 | ajax('POST', '/__wb/web-archive/', function (res) { 745 | if (res.status === 401) { 746 | // it seems that user is not logged in 747 | userIsNotLoggedIn(); 748 | } else if (res.status >= 400) { 749 | failSnapshotSaving(res.responseText); 750 | console.log('You have got an error.'); 751 | console.log('If you think something wrong here please send it to support.'); 752 | console.log('Response: "' + res.responseText + '"'); 753 | console.log('status: "' + res.status + '"'); 754 | } else { 755 | successSnapshotSaving(res); 756 | } 757 | }, { 758 | 'Content-Type': 'application/json' 759 | }, _JSON.stringify({ 760 | url: url, 761 | snapshot: timestamp, 762 | tags: tags || [], 763 | })); 764 | 765 | return false; 766 | }; 767 | 768 | __wm.checkScreenShot = function (url, timestamp) { 769 | hasScreenShot(url, timestamp, function (exist, timestampDelta) { 770 | if (exist) { 771 | // show('wm-screenshot'); 772 | $('wm-screenshot').title = 'screen shot (delta: ' + timestampDelta + 's)'; 773 | visibility('wm-screenshot', true); 774 | } else { 775 | visibility('wm-screenshot', false); 776 | } 777 | }); 778 | }; 779 | 780 | document.addEventListener('DOMContentLoaded', function () { 781 | if (hasCookie('logged-in-user') && hasCookie('logged-in-sig')) { 782 | userIsLoggedIn(); 783 | } else { 784 | userIsNotLoggedIn(); 785 | } 786 | }); 787 | })(); 788 | // @license-end 789 | -------------------------------------------------------------------------------- /动效周期表/motiontable_files/server-html.js: -------------------------------------------------------------------------------- 1 | ;(function(window, document, undefined){ 2 | 3 | /* settings ------------------------------------------------------------ */ 4 | var ASSET_DIR = 'https://web.archive.org/web/20190719163403/https://ad.xdomain.ne.jp/img/'; 5 | var BANNER_LIST_FOR_ANDROID = [ 6 | { 7 | img: ASSET_DIR + 'cocorosekai.gif', 8 | url: 'https://web.archive.org/web/20190719163403/https://ad.xdomain.ne.jp/rd.php?aid=xdomain_cocorosekai_a' 9 | } 10 | ]; 11 | var BANNER_LIST_FOR_OTHER = [ 12 | { 13 | img: ASSET_DIR + 'cocorosekai.gif', 14 | url: 'https://web.archive.org/web/20190719163403/https://ad.xdomain.ne.jp/rd.php?aid=xdomain_cocorosekai_i' 15 | } 16 | ]; 17 | /* --------------------------------------------------------------------- */ 18 | 19 | 20 | if (!Function.prototype.bind) { 21 | Function.prototype.bind = function(oThis) { 22 | if (typeof this !== 'function') { 23 | throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); 24 | } 25 | 26 | var aArgs = Array.prototype.slice.call(arguments, 1); 27 | var fToBind = this; 28 | var fNOP = function() {}; 29 | var fBound = function() { 30 | return fToBind.apply(this instanceof fNOP && oThis ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments))); 31 | }; 32 | 33 | fNOP.prototype = this.prototype; 34 | fBound.prototype = new fNOP(); 35 | 36 | return fBound; 37 | }; 38 | } 39 | 40 | if (!Array.prototype.forEach) { 41 | Array.prototype.forEach = function(callback, thisArg) { 42 | var T, k; 43 | 44 | if (this == null) { 45 | throw new TypeError(" this is null or not defined"); 46 | } 47 | 48 | var O = Object(this); 49 | var len = O.length >>> 0; 50 | 51 | if ({}.toString.call(callback) != "[object Function]") { 52 | throw new TypeError(callback + " is not a function"); 53 | } 54 | 55 | if (thisArg) { 56 | T = thisArg; 57 | } 58 | 59 | k = 0; 60 | while (k < len) { 61 | var kValue; 62 | if (k in O) { 63 | kValue = O[k]; 64 | callback.call(T, kValue, k, O); 65 | } 66 | k++; 67 | } 68 | }; 69 | } 70 | 71 | var ua = window.navigator.userAgent.toLowerCase(); 72 | var classToType = {}; 73 | 'Boolean Number String Function Array Date RegExp Object Error Symbol'.split(' ').forEach(function(name) { 74 | classToType['[object ' + name + ']'] = name.toLowerCase(); 75 | }); 76 | 77 | var utils = { 78 | isTarget: !!ua.match(/ip(hone|od|ad)/i) 79 | || !!ua.match(/android/i) 80 | || (!!ua.match(/firefox/i) && !!ua.match(/mobile/i)) 81 | || (!!ua.match(/windows/i) && (!!ua.match(/phone/i) || !!ua.match(/touch/i))) 82 | || !!ua.match(/blackberry/i) 83 | || !!ua.match(/kindle/i) 84 | || !!ua.match(/silk/i) 85 | || !!ua.match(/playbook/i), 86 | 87 | isAndroid: !!ua.match(/android/i), 88 | 89 | iosVersion: (function() { 90 | var v, versions; 91 | if (/iP(hone|od|ad)/.test(navigator.platform)) { 92 | v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/); 93 | versions = [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)]; 94 | return versions[0]; 95 | } 96 | return versions; 97 | })(), 98 | 99 | androidVersion: (function() { 100 | if (!!ua.match(/android/i)) { 101 | var version; 102 | if (!!ua.match(/firefox/i)) { 103 | version = parseFloat(navigator.appVersion); 104 | } else { 105 | version = parseFloat(ua.slice(ua.indexOf('android') + 8)); 106 | } 107 | if (version !== version) { 108 | version = 4; 109 | } 110 | return version; 111 | } 112 | })(), 113 | 114 | type: function(obj) { 115 | if (obj == null) { 116 | return obj + ''; 117 | } 118 | return typeof obj === 'object' || typeof obj === 'function' ? 119 | classToType[toString.call(obj)] || 'object' : 120 | typeof obj; 121 | }, 122 | 123 | debounce: function(func, wait, immediate) { 124 | immediate = immediate === undefined ? false : immediate; 125 | var timeout; 126 | return function() { 127 | var context = this, args = arguments; 128 | var later = function() { 129 | timeout = null; 130 | if (!immediate) func.apply(context, args); 131 | }; 132 | var callNow = immediate && !timeout; 133 | clearTimeout(timeout); 134 | timeout = setTimeout(later, wait); 135 | if (callNow) func.apply(context, args); 136 | }; 137 | }, 138 | 139 | copy: function(array) { 140 | var newArray = []; 141 | var i = 0; 142 | try { 143 | newArray = [].slice.call(array); 144 | } catch (e) { 145 | for (; i < array.length; i++) { 146 | newArray.push(array[i]); 147 | } 148 | } 149 | return newArray; 150 | } 151 | }; 152 | 153 | 154 | var EventDispatcher = function() { 155 | this._events = {}; 156 | }; 157 | 158 | EventDispatcher.prototype.hasEventListener = function(eventType, handler) { 159 | if (this._events[eventType] === undefined) { 160 | return false; 161 | } else { 162 | var events = this._events[eventType]; 163 | var i = events.length; 164 | for (; i--;) { 165 | if (events[i] === handler) { 166 | return true; 167 | } 168 | } 169 | } 170 | }; 171 | 172 | EventDispatcher.prototype.addEventListener = function(eventType, handler) { 173 | if (this._events[eventType] !== undefined) { 174 | var events = this._events[eventType]; 175 | var length = events.length; 176 | var i = 0; 177 | for (; i < length; i++) { 178 | if (events[i] === handler) { 179 | return; 180 | } 181 | } 182 | events.push(handler); 183 | } else { 184 | this._events[eventType] = [handler]; 185 | } 186 | }; 187 | 188 | EventDispatcher.prototype.removeEventListener = function(eventType, handler) { 189 | if (this.hasEventListener(eventType, handler)) { 190 | var events = this._events[eventType]; 191 | var i = events.length; 192 | var index; 193 | while (i--) { 194 | if (events[i] === handler) { 195 | index = i; 196 | } 197 | } 198 | events.splice(index, 1); 199 | } 200 | }; 201 | 202 | EventDispatcher.prototype.dispatchEvent = function(eventType, context, extra) { 203 | if (this._events[eventType] !== undefined) { 204 | var events = this._events[eventType]; 205 | var copyEvents = utils.copy(events); 206 | var obj = { 207 | type: eventType, 208 | target: context, 209 | extra: extra 210 | }; 211 | var length = events.length; 212 | var i = 0; 213 | 214 | for (; i < length; i++) { 215 | copyEvents[i].call(context || this, obj); 216 | } 217 | } 218 | }; 219 | 220 | 221 | var Orientation = function() { 222 | EventDispatcher.call(this); 223 | 224 | this.portrait = null; 225 | this.checkOrientation = this.checkOrientation.bind(this); 226 | 227 | window.addEventListener(Orientation.eventType, this.checkOrientation, false); 228 | this.checkOrientation(); 229 | }; 230 | Orientation.orig = Orientation.prototype.constructor; 231 | Orientation.prototype = new EventDispatcher(); 232 | Orientation.prototype.constructor = Orientation.orig; 233 | 234 | Orientation.ORIENTATION_CHANGE = 'orientation_orientation_change'; 235 | Orientation.eventType = 'onorientationchange' in window ? 'orientationchange' : 'resize'; 236 | 237 | Orientation.prototype.isPortrait = (function() { 238 | var func; 239 | if (!'onorientationchange' in window) { 240 | func = function() { 241 | var w = parseInt(window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, 10); 242 | var h = parseInt(window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight, 10); 243 | return h > w; 244 | }; 245 | } else { 246 | if ('orientation' in window) { 247 | func = function() { 248 | return Math.abs(window.orientation) !== 90; 249 | }; 250 | } else if (window.matchMedia !== undefined) { 251 | func = function() { 252 | return window.matchMedia('(orientation: portrait)').matches; 253 | }; 254 | } 255 | } 256 | return func; 257 | })(); 258 | 259 | Orientation.prototype.checkOrientation = function() { 260 | var that = this; 261 | setTimeout(function() { 262 | var o = that.isPortrait(); 263 | if (o === that.portrait) { 264 | return; 265 | } 266 | that.portrait = o; 267 | that.dispatchEvent(Orientation.ORIENTATION_CHANGE, that, o); 268 | }, 25); 269 | }; 270 | 271 | Orientation.prototype.destroy = function() { 272 | window.removeEventListener(Orientation.eventType, this.checkOrientation); 273 | for (var key in this) { 274 | if (this.hasOwnProperty(key)) { 275 | this[key] = null; 276 | } 277 | } 278 | }; 279 | 280 | var BannerLegacy = function(data, isPortrait) { 281 | EventDispatcher.call(this); 282 | 283 | this.data = data; 284 | this.isPortrait = isPortrait; 285 | this.isAnimated = false; 286 | 287 | this.scrollTarget = null; 288 | if (navigator.userAgent.indexOf('WebKit') < 0) { 289 | this.scrollTarget = document.documentElement; 290 | } else { 291 | this.scrollTarget = document.body; 292 | } 293 | 294 | this.touchEndEventName = 'touchend'; 295 | var ua = window.navigator.userAgent.toLowerCase(); 296 | var winTouch = !!ua.match(/windows/i) && !!ua.match(/touch/i); 297 | if (5 > utils.androidVersion && utils.androidVersion >= 4 || winTouch) { 298 | this.touchEndEventName = 'click'; 299 | } 300 | 301 | this.remove = this.remove.bind(this); 302 | 303 | var styles = BannerLegacy.styles; 304 | 305 | this.bnr = document.createElement('div'); 306 | BannerLegacy.setStyle(this.bnr, styles.bnr); 307 | 308 | this.jump = document.createElement('a'); 309 | this.jump.setAttribute('href', this.data.url); 310 | this.jump.setAttribute('target', 'blank'); 311 | BannerLegacy.setStyle(this.jump, styles.jump); 312 | 313 | this.img = document.createElement('img'); 314 | this.img.onload = this.firstSet.bind(this); 315 | this.img.src = this.data.img; 316 | BannerLegacy.setStyle(this.img, styles.img); 317 | 318 | this.closeBtn = document.createElement('img'); 319 | this.closeBtn.src = BannerLegacy.ASSET_DIR + 'close.png'; 320 | this.closeBtn.addEventListener(this.touchEndEventName, this.remove, false); 321 | BannerLegacy.setStyle(this.closeBtn, styles.closeBtn); 322 | }; 323 | BannerLegacy.orig = BannerLegacy.prototype.constructor; 324 | BannerLegacy.prototype = new EventDispatcher(); 325 | BannerLegacy.prototype.constructor = BannerLegacy.orig; 326 | 327 | BannerLegacy.REMOVE = 'banner_remove'; 328 | BannerLegacy.ASSET_DIR = 'ad/'; 329 | BannerLegacy.WIDTH = 320; 330 | BannerLegacy.HEIGHT = 50; 331 | BannerLegacy.SPACE = 20; 332 | BannerLegacy.styles = { 333 | bnr: { 334 | display: 'none', 335 | zIndex: '2147483647', 336 | position: 'absolute', 337 | top: '0', 338 | left: '0', 339 | width: BannerLegacy.WIDTH + 'px', 340 | height: BannerLegacy.HEIGHT + 'px', 341 | WebkitTransition: 'opacity 200ms ease-out', 342 | transition: 'opacity 200ms ease-out', 343 | opacity: '0', 344 | overflow: 'hidden', 345 | margin: '0', 346 | padding: '0', 347 | border: 'none' 348 | }, 349 | 350 | closeBtn: { 351 | display: 'block', 352 | position: 'absolute', 353 | width: '7.812%', 354 | top: '0', 355 | right: '0', 356 | cursor: 'pointer', 357 | margin: '0', 358 | padding: '0', 359 | border: 'none' 360 | }, 361 | 362 | jump: { 363 | display: 'block', 364 | width: '100%', 365 | margin: '0', 366 | padding: '0', 367 | border: 'none' 368 | }, 369 | 370 | img: { 371 | display: 'block', 372 | width: '100%', 373 | margin: '0', 374 | padding: '0', 375 | border: 'none' 376 | } 377 | }; 378 | 379 | BannerLegacy.setStyle = function(element, styles) { 380 | for (var prop in styles) { 381 | if (styles.hasOwnProperty(prop)) { 382 | element.style[prop] = styles[prop]; 383 | } 384 | } 385 | }; 386 | 387 | BannerLegacy.prototype.firstSet = function() { 388 | this.jump.appendChild(this.img); 389 | this.bnr.appendChild(this.jump); 390 | this.bnr.appendChild(this.closeBtn); 391 | 392 | this.setOrientation(this.isPortrait); 393 | this.update(); 394 | this.show(); 395 | }; 396 | 397 | BannerLegacy.prototype.setOrientation = function(isPortrait) { 398 | this.isPortrait = isPortrait; 399 | }; 400 | 401 | BannerLegacy.prototype.update = function() { 402 | var width; 403 | var height; 404 | var posX = 0; 405 | var posY = 0; 406 | var scrollTop = this.scrollTarget.scrollTop; 407 | var scrollLeft = this.scrollTarget.scrollLeft; 408 | var windowWidth = window.innerWidth; 409 | var windowHeight = window.innerHeight; 410 | var clientWidth = document.documentElement.clientWidth; 411 | var pageHeight = this.scrollTarget.scrollHeight; 412 | var zoom = clientWidth / windowWidth; 413 | 414 | width = clientWidth / zoom; 415 | 416 | if (this.isPortrait) { 417 | posX = scrollLeft; 418 | } else { 419 | posX = width * (BannerLegacy.SPACE / 100); 420 | width = width - (posX * 2); 421 | if (width < BannerLegacy.WIDTH / zoom) { 422 | width = BannerLegacy.WIDTH / zoom; 423 | posX = (windowWidth - (BannerLegacy.WIDTH / zoom)) / 2; 424 | } 425 | posX = scrollLeft + posX; 426 | } 427 | 428 | height = BannerLegacy.HEIGHT * (width / BannerLegacy.WIDTH); 429 | 430 | if (scrollTop + windowHeight + 100 >= pageHeight && windowHeight < pageHeight) { 431 | posY = scrollTop; 432 | } else { 433 | posY = scrollTop + windowHeight - height; 434 | } 435 | 436 | this.bnr.style.width = Math.ceil(width) + 'px'; 437 | this.bnr.style.height = Math.ceil(height) + 'px'; 438 | this.bnr.style.left = Math.ceil(posX) + 'px'; 439 | this.bnr.style.top = Math.ceil(posY) + 'px'; 440 | }; 441 | 442 | BannerLegacy.prototype.show = function(duration) { 443 | if (this.isAnimated) return; 444 | this.isAnimated = true; 445 | 446 | duration = duration === undefined ? 100 : duration; 447 | 448 | document.body.appendChild(this.bnr); 449 | this.bnr.style.transition = 'opacity ' + duration + 'ms ease-out'; 450 | this.bnr.style.display = 'block'; 451 | 452 | var that = this; 453 | setTimeout(function() { 454 | that.bnr.style.opacity = '1'; 455 | that.isAnimated = false; 456 | }, 50); 457 | }; 458 | 459 | BannerLegacy.prototype.hide = function() { 460 | this.bnr.style.opacity = '0'; 461 | this.bnr.style.display = 'none'; 462 | }; 463 | 464 | BannerLegacy.prototype.remove = function() { 465 | document.body.removeChild(this.bnr); 466 | this.dispatchEvent(BannerLegacy.REMOVE, this); 467 | }; 468 | 469 | BannerLegacy.prototype.destroy = function() { 470 | this.closeBtn.removeEventListener(this.touchEndEventName, this.remove); 471 | for (var key in this) { 472 | if (this.hasOwnProperty(key)) { 473 | this[key] = null; 474 | } 475 | } 476 | }; 477 | 478 | 479 | var AdLegacy = function(bannerList) { 480 | this.bannerList = bannerList; 481 | this.isTouch = false; 482 | this.isAndroid4 = 5 > utils.androidVersion && utils.androidVersion >= 4; 483 | 484 | this.scrollTarget = null; 485 | if (navigator.userAgent.indexOf('WebKit') < 0) { 486 | this.scrollTarget = document.documentElement; 487 | } else { 488 | this.scrollTarget = document.body; 489 | } 490 | 491 | this.scrollWatcherEnabled = false; 492 | this.scrollTimerId = 0; 493 | this.scrollCounter = 0; 494 | this.scrollBoundary = 500; 495 | this.scrollTop = this.scrollTarget.scrollTop; 496 | this.scrollTopOld = this.scrollTarget.scrollTop; 497 | this.scrollLeft = this.scrollTarget.scrollLeft; 498 | this.orientation = new Orientation(); 499 | this.banner; 500 | 501 | this.resizeHandler = this.resizeHandler.bind(this); 502 | if (!this.isAndroid4) { 503 | this.scrollHandler = this.scrollHandler.bind(this); 504 | this.touchMoveHandler = this.touchMoveHandler.bind(this); 505 | } else { 506 | this.scrollHandler = this.scrollHandler_android4.bind(this); 507 | this.touchMoveHandler = this.touchMoveHandler_android4.bind(this); 508 | } 509 | this.touchEndHandler = this.touchEndHandler.bind(this); 510 | this.changeOrientationHandler = this.changeOrientationHandler.bind(this); 511 | this.destroy = this.destroy.bind(this); 512 | }; 513 | 514 | AdLegacy.ASSET_DIR = 'ad/'; 515 | 516 | AdLegacy.prototype.show = function() { 517 | var bannerData = this.bannerList[Math.floor(Math.random() * this.bannerList.length)]; 518 | BannerLegacy.ASSET_DIR = AdLegacy.ASSET_DIR; 519 | this.banner = new BannerLegacy(bannerData, this.orientation.portrait); 520 | 521 | document.addEventListener('touchmove', this.touchMoveHandler, false); 522 | window.addEventListener('resize', this.resizeHandler, false); 523 | window.addEventListener('scroll', this.scrollHandler, false); 524 | 525 | this.banner.addEventListener(BannerLegacy.REMOVE, this.destroy); 526 | this.orientation.addEventListener(Orientation.ORIENTATION_CHANGE, this.changeOrientationHandler); 527 | }; 528 | 529 | AdLegacy.prototype.update = function() { 530 | this.banner.update(); 531 | }; 532 | 533 | AdLegacy.prototype.scrollWatcherEnable = function() { 534 | this.scrollBoundary *= document.documentElement.clientWidth / 320; 535 | this.scrollTopOld = this.scrollTarget.scrollTop; 536 | this.scrollWatcherEnabled = true; 537 | }; 538 | 539 | AdLegacy.prototype.checkScrollCounter = function(scrollTop) { 540 | if (!this.scrollWatcherEnabled) { 541 | return false; 542 | } 543 | this.scrollCounter += Math.abs(scrollTop - this.scrollTopOld); 544 | this.scrollTopOld = scrollTop; 545 | return this.scrollCounter > this.scrollBoundary; 546 | }; 547 | 548 | AdLegacy.prototype.resizeHandler = utils.debounce(function() { 549 | if (this.isTouch) return; 550 | this.banner.update(); 551 | }, 200); 552 | 553 | AdLegacy.prototype.scrollHandler = utils.debounce(function() { 554 | if (this.isTouch) return; 555 | this.banner.update(); 556 | }, 200); 557 | 558 | AdLegacy.prototype.scrollHandler_android4 = utils.debounce(function() { 559 | this.banner.update(); 560 | this.touchEndHandler(); 561 | }, 200); 562 | 563 | AdLegacy.prototype.touchMoveHandler = function() { 564 | if (this.isTouch) return; 565 | this.isTouch = true; 566 | this.scrollTop = this.scrollTarget.scrollTop; 567 | this.scrollLeft = this.scrollTarget.scrollLeft; 568 | this.banner.hide(); 569 | document.addEventListener('touchend', this.touchEndHandler, false); 570 | }; 571 | 572 | AdLegacy.prototype.touchMoveHandler_android4 = utils.debounce(function() { 573 | this.banner.hide(); 574 | this.banner.update(); 575 | this.touchEndHandler(); 576 | }, 200, true); 577 | 578 | AdLegacy.prototype.touchEndHandler = function() { 579 | var that = this; 580 | clearInterval(this.scrollTimerId); 581 | this.scrollTimerId = setInterval(function() { 582 | var scrollTop = that.scrollTarget.scrollTop; 583 | var scrollLeft = that.scrollTarget.scrollLeft; 584 | if (scrollTop === that.scrollTop && scrollLeft === that.scrollLeft) { 585 | clearInterval(that.scrollTimerId); 586 | that.isTouch = false; 587 | that.banner.update(); 588 | if (that.checkScrollCounter(scrollTop)) { 589 | that.banner.remove(); 590 | } else { 591 | that.banner.show(); 592 | } 593 | } 594 | that.scrollTop = scrollTop; 595 | that.scrollLeft = scrollLeft; 596 | }, 200); 597 | 598 | document.removeEventListener('touchend', this.touchEndHandler); 599 | }; 600 | 601 | AdLegacy.prototype.changeOrientationHandler = function(e) { 602 | this.banner.setOrientation(e.extra); 603 | this.banner.update(); 604 | }; 605 | 606 | AdLegacy.prototype.destroy = function() { 607 | window.removeEventListener('resize', this.resizeHandler); 608 | window.removeEventListener('scroll', this.scrollHandler); 609 | document.removeEventListener('touchmove', this.touchMoveHandler); 610 | document.removeEventListener('touchend', this.touchEndHandler); 611 | this.orientation.destroy(); 612 | this.banner.destroy(); 613 | for (var key in this) { 614 | if (this.hasOwnProperty(key)) { 615 | this[key] = null; 616 | } 617 | } 618 | }; 619 | 620 | 621 | var Banner = function(data, isPortrait) { 622 | EventDispatcher.call(this); 623 | 624 | this.data = data; 625 | this.isPortrait = isPortrait; 626 | this.isAnimated = false; 627 | 628 | this.scrollTarget = null; 629 | if (navigator.userAgent.indexOf('WebKit') < 0) { 630 | this.scrollTarget = document.documentElement; 631 | } else { 632 | this.scrollTarget = document.body; 633 | } 634 | 635 | this.touchEndEventName = 'touchend'; 636 | var ua = window.navigator.userAgent.toLowerCase(); 637 | var winTouch = !!ua.match(/windows/i) && !!ua.match(/touch/i); 638 | if (5 > utils.androidVersion && utils.androidVersion >= 4 || winTouch) { 639 | this.touchEndEventName = 'click'; 640 | } 641 | 642 | this.remove = this.remove.bind(this); 643 | 644 | var styles = Banner.styles; 645 | 646 | this.bnr = document.createElement('div'); 647 | Banner.setStyle(this.bnr, styles.bnr); 648 | 649 | this.jump = document.createElement('a'); 650 | this.jump.setAttribute('href', this.data.url); 651 | this.jump.setAttribute('target', 'blank'); 652 | Banner.setStyle(this.jump, styles.jump); 653 | 654 | this.img = document.createElement('img'); 655 | this.img.src = this.data.img; 656 | Banner.setStyle(this.img, styles.img); 657 | 658 | this.closeBtn = document.createElement('img'); 659 | this.closeBtn.src = Banner.ASSET_DIR + 'close.png'; 660 | this.closeBtn.addEventListener(this.touchEndEventName, this.remove, false); 661 | Banner.setStyle(this.closeBtn, styles.closeBtn); 662 | }; 663 | Banner.orig = Banner.prototype.constructor; 664 | Banner.prototype = new EventDispatcher(); 665 | Banner.prototype.constructor = Banner.orig; 666 | 667 | Banner.READY = 'banner_ready'; 668 | Banner.REMOVE = 'banner_remove'; 669 | Banner.ASSET_DIR = 'ad/'; 670 | Banner.WIDTH = 320; 671 | Banner.HEIGHT = 50; 672 | Banner.SPACE = 20; 673 | Banner.styles = { 674 | bnr: { 675 | display: 'none', 676 | zIndex: '2147483647', 677 | position: 'fixed', 678 | bottom: '0', 679 | left: '0', 680 | width: Banner.WIDTH + 'px', 681 | height: Banner.HEIGHT + 'px', 682 | WebkitTransition: 'opacity 200ms ease-out', 683 | transition: 'opacity 200ms ease-out', 684 | opacity: '0', 685 | overflow: 'hidden', 686 | margin: '0', 687 | padding: '0', 688 | border: 'none' 689 | }, 690 | 691 | closeBtn: { 692 | display: 'block', 693 | position: 'absolute', 694 | width: '7.812%', 695 | top: '0', 696 | right: '0', 697 | cursor: 'pointer', 698 | margin: '0', 699 | padding: '0', 700 | border: 'none' 701 | }, 702 | 703 | jump: { 704 | display: 'block', 705 | width: '100%', 706 | margin: '0', 707 | padding: '0', 708 | border: 'none' 709 | }, 710 | 711 | img: { 712 | display: 'block', 713 | width: '100%', 714 | margin: '0', 715 | padding: '0', 716 | border: 'none' 717 | } 718 | }; 719 | 720 | Banner.setStyle = function(element, styles) { 721 | for (var prop in styles) { 722 | if (styles.hasOwnProperty(prop)) { 723 | element.style[prop] = styles[prop]; 724 | } 725 | } 726 | }; 727 | 728 | Banner.prototype.init = function() { 729 | var that = this; 730 | var img = new Image(); 731 | img.onload = function() { 732 | that.jump.appendChild(that.img); 733 | that.bnr.appendChild(that.jump); 734 | that.bnr.appendChild(that.closeBtn); 735 | 736 | that.setOrientation(that.isPortrait); 737 | that.update(); 738 | 739 | that.dispatchEvent(Banner.READY); 740 | }; 741 | img.src = this.data.img; 742 | }; 743 | 744 | Banner.prototype.setOrientation = function(isPortrait) { 745 | this.isPortrait = isPortrait; 746 | }; 747 | 748 | Banner.prototype.update = function() { 749 | var width; 750 | var height; 751 | var posX = 0; 752 | var scrollTop = this.scrollTarget.scrollTop; 753 | var scrollLeft = this.scrollTarget.scrollLeft; 754 | var windowWidth = window.innerWidth; 755 | var windowHeight = window.innerHeight; 756 | var clientWidth = document.documentElement.clientWidth; 757 | var pageHeight = this.scrollTarget.scrollHeight; 758 | var zoom = clientWidth / windowWidth; 759 | 760 | if (!this.isPortrait) { 761 | width = clientWidth / zoom; 762 | posX = width * (Banner.SPACE / 100); 763 | width = width - (posX * 2); 764 | if (width < Banner.WIDTH / zoom) { 765 | width = Banner.WIDTH / zoom; 766 | posX = (windowWidth - (Banner.WIDTH / zoom)) / 2; 767 | } 768 | posX = scrollLeft + posX; 769 | } else { 770 | width = windowWidth; 771 | } 772 | 773 | height = Banner.HEIGHT * (width / Banner.WIDTH); 774 | 775 | if (scrollTop + windowHeight + 100 >= pageHeight && windowHeight < pageHeight) { 776 | this.bnr.style.bottom = 'auto'; 777 | this.bnr.style.top = 0; 778 | } else { 779 | this.bnr.style.bottom = 0; 780 | this.bnr.style.top = 'auto'; 781 | } 782 | 783 | this.bnr.style.width = Math.floor(width) + 'px'; 784 | this.bnr.style.height = Math.floor(height) + 'px'; 785 | this.bnr.style.left = Math.floor(posX) + 'px'; 786 | }; 787 | 788 | Banner.prototype.show = function(duration) { 789 | if (this.isAnimated) return; 790 | this.isAnimated = true; 791 | 792 | duration = duration === undefined ? 100 : duration; 793 | 794 | document.body.appendChild(this.bnr); 795 | this.bnr.style.transition = 'opacity ' + duration + 'ms ease-out'; 796 | this.bnr.style.display = 'block'; 797 | 798 | var that = this; 799 | setTimeout(function() { 800 | that.bnr.style.opacity = '1'; 801 | that.isAnimated = false; 802 | }, 50); 803 | }; 804 | 805 | Banner.prototype.hide = function() { 806 | this.bnr.style.opacity = '0'; 807 | this.bnr.style.display = 'none'; 808 | }; 809 | 810 | Banner.prototype.remove = function() { 811 | if (this.isAnimated) return; 812 | this.isAnimated = true; 813 | 814 | var that = this; 815 | 816 | var transitionCompleted = false; 817 | var transitionEndHandler = function() { 818 | if (transitionCompleted) return; 819 | transitionCompleted = true; 820 | that.isAnimated = false; 821 | document.body.removeChild(that.bnr); 822 | that.bnr.removeEventListener('webkitTransitionEnd', transitionEndHandler); 823 | that.bnr.removeEventListener('transitionend', transitionEndHandler); 824 | that.dispatchEvent(Banner.REMOVE, that); 825 | }; 826 | 827 | this.bnr.addEventListener('webkitTransitionEnd', transitionEndHandler); 828 | this.bnr.addEventListener('transitionend', transitionEndHandler); 829 | 830 | this.bnr.style.transition = 'opacity 300ms ease-out'; 831 | this.bnr.style.display = 'block'; 832 | 833 | setTimeout(function() { 834 | that.bnr.style.opacity = '0'; 835 | }, 50); 836 | }; 837 | 838 | Banner.prototype.destroy = function() { 839 | this.closeBtn.removeEventListener(this.touchEndEventName, this.remove); 840 | for (var key in this) { 841 | if (this.hasOwnProperty(key)) { 842 | this[key] = null; 843 | } 844 | } 845 | }; 846 | 847 | 848 | var Ad = function(bannerList) { 849 | this.bannerList = bannerList; 850 | 851 | this.scrollTarget = null; 852 | if (navigator.userAgent.indexOf('WebKit') < 0) { 853 | this.scrollTarget = document.documentElement; 854 | } else { 855 | this.scrollTarget = document.body; 856 | } 857 | 858 | this.scrollCounter = 0; 859 | this.scrollBoundary = 500; 860 | this.scrollTop = this.scrollTarget.scrollTop; 861 | this.zoomTimerId = 0; 862 | this.orientation = new Orientation(); 863 | this.banner; 864 | 865 | this.scrollHandler = this.scrollHandler.bind(this); 866 | this.scrollWatch = this.scrollWatch.bind(this); 867 | this.changeOrientationHandler = this.changeOrientationHandler.bind(this); 868 | this.destroy = this.destroy.bind(this); 869 | }; 870 | 871 | Ad.ASSET_DIR = 'ad/'; 872 | 873 | Ad.prototype.show = function() { 874 | var that = this; 875 | 876 | var bannerData = this.bannerList[Math.floor(Math.random() * this.bannerList.length)]; 877 | Banner.ASSET_DIR = Ad.ASSET_DIR; 878 | 879 | this.banner = new Banner(bannerData, this.orientation.portrait); 880 | this.banner.addEventListener(Banner.READY, function() { 881 | that.banner.show(); 882 | }); 883 | this.banner.addEventListener(Banner.REMOVE, this.destroy); 884 | this.banner.init(); 885 | 886 | this.orientation.addEventListener(Orientation.ORIENTATION_CHANGE, this.changeOrientationHandler); 887 | 888 | window.addEventListener('scroll', this.scrollHandler, false); 889 | 890 | var zoom; 891 | this.zoomTimerId = setInterval(function() { 892 | zoom = document.documentElement.clientWidth / window.innerWidth; 893 | if (zoom < 1.1) { 894 | that.banner.show(); 895 | } else { 896 | that.banner.hide(); 897 | } 898 | }, 1000); 899 | }; 900 | 901 | Ad.prototype.update = function() { 902 | this.banner.update(); 903 | }; 904 | 905 | Ad.prototype.scrollWatcherEnable = function() { 906 | this.scrollBoundary *= document.documentElement.clientWidth / 320; 907 | this.scrollTop = this.scrollTarget.scrollTop; 908 | window.addEventListener('scroll', this.scrollWatch, false); 909 | }; 910 | 911 | Ad.prototype.scrollHandler = utils.debounce(function() { 912 | this.banner.update(); 913 | }, 200); 914 | 915 | Ad.prototype.scrollWatch = function() { 916 | var scrollTop = this.scrollTarget.scrollTop; 917 | scrollTop = scrollTop < 0 ? 0 : scrollTop; 918 | this.scrollCounter += Math.abs(scrollTop - this.scrollTop); 919 | this.scrollTop = scrollTop; 920 | if (this.scrollCounter > this.scrollBoundary) { 921 | window.removeEventListener('scroll', this.scrollHandler); 922 | this.banner.remove(); 923 | } 924 | }; 925 | 926 | Ad.prototype.changeOrientationHandler = function(e) { 927 | this.banner.setOrientation(e.extra); 928 | this.banner.update(); 929 | }; 930 | 931 | Ad.prototype.destroy = function() { 932 | window.removeEventListener('scroll', this.scrollHandler); 933 | window.removeEventListener('scroll', this.scrollWatch); 934 | clearInterval(this.zoomTimerId); 935 | this.orientation.destroy(); 936 | this.banner.destroy(); 937 | for (var key in this) { 938 | if (this.hasOwnProperty(key)) { 939 | this[key] = null; 940 | } 941 | } 942 | }; 943 | 944 | 945 | (function() { 946 | if (!utils.isTarget) { 947 | return; 948 | } 949 | 950 | var ad; 951 | 952 | var domContentLoadedHandler = function() { 953 | var url = window.location.href; 954 | var className = document.body.className; 955 | var isWPAdmin = !!url.match(/\/wp-admin/i) 956 | || !!url.match(/\/wp-login/i) 957 | || !!className.match(/wp-admin/i) 958 | || !!className.match(/login/i) && !!className.match(/wp-core-ui/i); 959 | if (isWPAdmin) { 960 | return; 961 | } 962 | 963 | var bannerList = utils.isAndroid ? BANNER_LIST_FOR_ANDROID : BANNER_LIST_FOR_OTHER; 964 | 965 | if (utils.iosVersion >= 5 || utils.androidVersion >= 4) { 966 | Ad.ASSET_DIR = ASSET_DIR; 967 | ad = new Ad(bannerList); 968 | } else { 969 | AdLegacy.ASSET_DIR = ASSET_DIR; 970 | ad = new AdLegacy(bannerList); 971 | } 972 | 973 | ad.show(); 974 | }; 975 | 976 | var windowOnloadHandler = function() { 977 | ad.update(); 978 | 979 | setTimeout(function() { 980 | ad.scrollWatcherEnable(); 981 | }, 1000); 982 | }; 983 | 984 | document.addEventListener('DOMContentLoaded', domContentLoadedHandler); 985 | window.addEventListener('load', windowOnloadHandler, false); 986 | })(); 987 | 988 | })(window, document); 989 | /* 990 | FILE ARCHIVED ON 16:34:03 Jul 19, 2019 AND RETRIEVED FROM THE 991 | INTERNET ARCHIVE ON 02:44:45 Mar 18, 2020. 992 | JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. 993 | 994 | ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. 995 | SECTION 108(a)(3)). 996 | */ 997 | /* 998 | playback timings (ms): 999 | exclusion.robots: 0.212 1000 | PetaboxLoader3.resolve: 93.188 (2) 1001 | load_resource: 967.125 1002 | captures_list: 51.987 1003 | LoadShardBlock: 35.509 (3) 1004 | CDXLines.iter: 11.447 (3) 1005 | PetaboxLoader3.datanode: 241.461 (5) 1006 | RedisCDXSource: 1.332 1007 | esindex: 0.016 1008 | exclusion.robots.policy: 0.197 1009 | */ --------------------------------------------------------------------------------