Skip to content

Commit

Permalink
Ready for release 1.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
maitanwebikejp committed Feb 22, 2019
1 parent e7f8df9 commit 9b1c119
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .src/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<title>Easily lazy-load JS, CSS, images, iframes - @shinsenter / defer.js</title>
<script src="defer_plus.min.js?v=wip-1.0.7"></script>
<script src="defer_plus.min.js?v=1.0.7"></script>
<meta name="description" content="defer.js by shinsenter is a super tiny script to efficiently load JavaScript. Extended version supports CSS files, images and iframes. They are all easy to use.">
<meta name="keywords" content="defer.js,defer,lazyload,fast,pagespeed,javascript,css,style,image,iframe">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Expand Down
2 changes: 1 addition & 1 deletion demo.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctypehtml><html lang="en"><meta charset="utf-8"><title>Easily lazy-load JS, CSS, images, iframes - @shinsenter / defer.js</title><script src="defer_plus.min.js?v=wip-1.0.7"></script><meta name="description"content="defer.js by shinsenter is a super tiny script to efficiently load JavaScript. Extended version supports CSS files, images and iframes. They are all easy to use."><meta name="keywords"content="defer.js,defer,lazyload,fast,pagespeed,javascript,css,style,image,iframe"><meta http-equiv="X-UA-Compatible"content="IE=edge"><meta name="mobile-web-app-capable"content="yes"><meta name="HandheldFriendly"content="True"><meta name="MobileOptimized"content="375"><meta name="viewport"content="initial-scale=1,maximum-scale=1,width=device-width"><link rel="canonical"href="https://appseeds.net/defer.js/demo.html"><style>html{box-sizing:border-box;font-family:Helvetica,Arial;font-size:16px}*,:after,:before{box-sizing:inherit}div,h1,h2,p{margin:2em auto;padding:0;font-weight:400;overflow:auto}p{margin:.5em auto}h1 small{display:block;color:#555;font-family:monospace;font-size:1.3rem;margin-top:.5em;padding-left:10px;border-left:5px solid #ccc}#lang li,h1 span{display:inline-block}body{top:0!important;margin:0;padding:1em 2em}code,pre{margin:0;font-size:smaller}pre code{display:block;overflow-x:auto;padding:.5em}#lang,div.aspect>*{position:absolute;top:0}#lang{margin:0;padding:0 .5rem;list-style:none;text-align:right;right:2em;background:#f0f0f0;border-radius:0 0 .5em .5em;z-index:10}#lang li{line-height:2;text-align:center}#lang li a{padding:0 .5em;display:block}code,img,pre,table{max-width:100%;height:auto}iframe,table{border:0;width:100%}td{padding:2vw;vertical-align:middle}.big{font-size:large}.fade{transition:opacity .5s ease;opacity:0}.fade.show{opacity:1;background:0 0}.long-content{display:block;height:50rem;background:#fafafa}.addthis_inline_share_toolbox,.fb-like{margin:0}.fb-like *{max-width:100%;height:auto}.center{text-align:center}.w640{max-width:640px}div.aspect{position:relative;max-width:100%;padding-bottom:75%;margin:0;background:#eee}div.aspect.r16-9{padding-bottom:56.25%}div.aspect>*{left:0;width:100%;height:100%;object-fit:contain}sup{font-size:.8em;color:red}#gt-nvframe{top:-1000px!important;visibility:hidden!important}</style><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","UA-34520609-2"),deferscript("https://www.googletagmanager.com/gtag/js?id=UA-34520609-2","google-tag",500),deferscript("https://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5c68e61cf456f1cb","social-buttons",3e3),deferstyle("https://highlightjs.org/static/demo/styles/tomorrow.css","highlightjs-css",1e3),deferscript("https://highlightjs.org/static/highlight.site.pack.js","highlightjs-api",1e3,function(){document.querySelectorAll("pre code").forEach(function(t){hljs.highlightBlock(t)})})</script><body id="top"><h1>Easily lazy-load JS, CSS, images, iframes <small>A demo using <span>@shinsenter / defer.js</span></small></h1><ul id="lang"class="notranslate"><li><a title="English"rel="alternate"hreflang="en"onclick='return!(top.location.href="https://appseeds.net/defer.js/demo.html")'href="https://appseeds.net/defer.js/demo.html">EN</a><li><a title="日本語翻訳"rel="alternate"hreflang="ja"onclick='return!(top.location.href="https://translate.google.com/translate?hl=&sl=auto&tl=ja&u=https%3A%2F%2Fappseeds.net%2Fdefer.js%2Fdemo.html")'href="https://translate.google.com/translate?hl=&sl=auto&tl=ja&u=https%3A%2F%2Fappseeds.net%2Fdefer.js%2Fdemo.html">JA</a><li><a title="Tiếng Việt"rel="alternate"hreflang="vi"onclick='return!(top.location.href="https://translate.google.com/translate?hl=&sl=auto&tl=vi&u=https%3A%2F%2Fappseeds.net%2Fdefer.js%2Fdemo.html")'href="https://translate.google.com/translate?hl=&sl=auto&tl=vi&u=https%3A%2F%2Fappseeds.net%2Fdefer.js%2Fdemo.html">VI</a></ul><div class="addthis_inline_share_toolbox"data-url="https://github.com/shinsenter/defer.js"data-title="defer.js - A super tiny script to efficiently load JS, CSS, images, iframes - @shinsenter / defer.js"data-description="defer.js by shinsenter is a super tiny script to efficiently load JavaScript. Extended version supports CSS files, images and iframes. They are all easy to use."></div><section id="deferjs-usage"><h2 id="getting-started">Getting started</h2><div><p>You only need to load this library <sup>(*)</sup> once on a page, ideally right after the opening <code>&lt;head&gt;</code> tag:</p><br><pre class="notranslate"><code>Code:</code><code class="highlight html">&lt;head&gt;
<!doctypehtml><html lang="en"><meta charset="utf-8"><title>Easily lazy-load JS, CSS, images, iframes - @shinsenter / defer.js</title><script src="defer_plus.min.js?v=1.0.7"></script><meta name="description"content="defer.js by shinsenter is a super tiny script to efficiently load JavaScript. Extended version supports CSS files, images and iframes. They are all easy to use."><meta name="keywords"content="defer.js,defer,lazyload,fast,pagespeed,javascript,css,style,image,iframe"><meta http-equiv="X-UA-Compatible"content="IE=edge"><meta name="mobile-web-app-capable"content="yes"><meta name="HandheldFriendly"content="True"><meta name="MobileOptimized"content="375"><meta name="viewport"content="initial-scale=1,maximum-scale=1,width=device-width"><link rel="canonical"href="https://appseeds.net/defer.js/demo.html"><style>html{box-sizing:border-box;font-family:Helvetica,Arial;font-size:16px}*,:after,:before{box-sizing:inherit}div,h1,h2,p{margin:2em auto;padding:0;font-weight:400;overflow:auto}p{margin:.5em auto}h1 small{display:block;color:#555;font-family:monospace;font-size:1.3rem;margin-top:.5em;padding-left:10px;border-left:5px solid #ccc}#lang li,h1 span{display:inline-block}body{top:0!important;margin:0;padding:1em 2em}code,pre{margin:0;font-size:smaller}pre code{display:block;overflow-x:auto;padding:.5em}#lang,div.aspect>*{position:absolute;top:0}#lang{margin:0;padding:0 .5rem;list-style:none;text-align:right;right:2em;background:#f0f0f0;border-radius:0 0 .5em .5em;z-index:10}#lang li{line-height:2;text-align:center}#lang li a{padding:0 .5em;display:block}code,img,pre,table{max-width:100%;height:auto}iframe,table{border:0;width:100%}td{padding:2vw;vertical-align:middle}.big{font-size:large}.fade{transition:opacity .5s ease;opacity:0}.fade.show{opacity:1;background:0 0}.long-content{display:block;height:50rem;background:#fafafa}.addthis_inline_share_toolbox,.fb-like{margin:0}.fb-like *{max-width:100%;height:auto}.center{text-align:center}.w640{max-width:640px}div.aspect{position:relative;max-width:100%;padding-bottom:75%;margin:0;background:#eee}div.aspect.r16-9{padding-bottom:56.25%}div.aspect>*{left:0;width:100%;height:100%;object-fit:contain}sup{font-size:.8em;color:red}#gt-nvframe{top:-1000px!important;visibility:hidden!important}</style><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","UA-34520609-2"),deferscript("https://www.googletagmanager.com/gtag/js?id=UA-34520609-2","google-tag",500),deferscript("https://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5c68e61cf456f1cb","social-buttons",3e3),deferstyle("https://highlightjs.org/static/demo/styles/tomorrow.css","highlightjs-css",1e3),deferscript("https://highlightjs.org/static/highlight.site.pack.js","highlightjs-api",1e3,function(){document.querySelectorAll("pre code").forEach(function(t){hljs.highlightBlock(t)})})</script><body id="top"><h1>Easily lazy-load JS, CSS, images, iframes <small>A demo using <span>@shinsenter / defer.js</span></small></h1><ul id="lang"class="notranslate"><li><a title="English"rel="alternate"hreflang="en"onclick='return!(top.location.href="https://appseeds.net/defer.js/demo.html")'href="https://appseeds.net/defer.js/demo.html">EN</a><li><a title="日本語翻訳"rel="alternate"hreflang="ja"onclick='return!(top.location.href="https://translate.google.com/translate?hl=&sl=auto&tl=ja&u=https%3A%2F%2Fappseeds.net%2Fdefer.js%2Fdemo.html")'href="https://translate.google.com/translate?hl=&sl=auto&tl=ja&u=https%3A%2F%2Fappseeds.net%2Fdefer.js%2Fdemo.html">JA</a><li><a title="Tiếng Việt"rel="alternate"hreflang="vi"onclick='return!(top.location.href="https://translate.google.com/translate?hl=&sl=auto&tl=vi&u=https%3A%2F%2Fappseeds.net%2Fdefer.js%2Fdemo.html")'href="https://translate.google.com/translate?hl=&sl=auto&tl=vi&u=https%3A%2F%2Fappseeds.net%2Fdefer.js%2Fdemo.html">VI</a></ul><div class="addthis_inline_share_toolbox"data-url="https://github.com/shinsenter/defer.js"data-title="defer.js - A super tiny script to efficiently load JS, CSS, images, iframes - @shinsenter / defer.js"data-description="defer.js by shinsenter is a super tiny script to efficiently load JavaScript. Extended version supports CSS files, images and iframes. They are all easy to use."></div><section id="deferjs-usage"><h2 id="getting-started">Getting started</h2><div><p>You only need to load this library <sup>(*)</sup> once on a page, ideally right after the opening <code>&lt;head&gt;</code> tag:</p><br><pre class="notranslate"><code>Code:</code><code class="highlight html">&lt;head&gt;
&lt;title&gt;My awesome page&lt;/title&gt;
&lt;script src="//raw.githubusercontent.com/shinsenter/defer.js/master/defer_plus.min.js"&gt;&lt;/script&gt;
&lt;/head&gt;</code></pre><p>Because the <a href="//raw.githubusercontent.com/shinsenter/defer.js/master/defer_plus.min.js"target="_blank"title="minified version of defer.js">minified version</a> of defer.js is super tiny, you can inline its content directly into the HTML document and avoid the network request.<p><small><sup>(*)</sup> Examples on this page are using <a href="https://github.com/shinsenter/defer.js/blob/master/README.md#extended-deferjs"title="Extended version defer_plus.min.js"target="_blank">extended version</a> of <a href="https://github.com/shinsenter/defer.js/"title="Visit defer.js on GitHub"target="_blank">defer.js</a>.</small></div><div><p>You can use browser's <strong>Developer Tool</strong> (press F12) to watch how requests are sent.<p>I added some spaces with gray background to demo lazy-load. Please scroll down.</div><div id="lazyload-widgets"><p><strong>But wait.</strong> Do you notice that there is a share buttons block on <a href="#top">the top</a>?<p>Your browser loaded it after 3 seconds since your page fired the 'load' event.</p><br><pre class="notranslate"><code>Code:</code><code class="highlight html">&lt;script type="text/javascript"&gt;
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shinsenter/defer.js",
"version": "1.0.6",
"version": "1.0.7",
"description": "defer.js by shinsenter is a super tiny script to efficiently load JavaScript. Extended version supports CSS files, images and iframes. They are all easy to use.",
"main": "defer_plus.min.js",
"scripts": {
Expand Down

0 comments on commit 9b1c119

Please sign in to comment.