From 54bc3c6b0100f511f2b69fc54cfafd9d1ea124d5 Mon Sep 17 00:00:00 2001 From: "Patryk Rzucidlo (PTKDev)" Date: Tue, 28 Apr 2020 19:40:57 +0200 Subject: [PATCH] [Release] v2.1.1 --- CHANGELOG.md | 2 +- README.md | 2 +- dist/lib/en/instagram-widget.min.js | 4 ++-- dist/lib/it/instagram-widget.min.js | 4 ++-- dist/lib/pl/instagram-widget.min.js | 4 ++-- dist/module/en/instagram-widget.min.js | 4 ++-- dist/module/it/instagram-widget.min.js | 4 ++-- dist/module/pl/instagram-widget.min.js | 4 ++-- package.json | 2 +- webcomponent/js/main.js | 3 +-- 10 files changed, 16 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1f1643..c6e8d2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# v2.1.0 (April 28, 2020) +# v2.1.1 (April 28, 2020) * New attribute: cache * New attribute: border-corners * New attribute: border-spacing diff --git a/README.md b/README.md index 5c0ba7c..62b579a 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 🌉 WebComponent: InstagramWidget -[![](https://img.shields.io/badge/version-v2.1.0-lightgrey.svg)](https://github.com/ptkdev-components/webcomponent-instagram-widget/releases) [![](https://img.shields.io/npm/v/@ptkdev/webcomponent-instagram-widget.svg)](https://www.npmjs.com/package/@ptkdev/webcomponent-instagram-widget) [![](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/ptkdev-components/webcomponent-instagram-widget/blob/master/LICENSE.md) [![](https://img.shields.io/badge/ES-9-F7DF1E.svg)](https://wikipedia.org/wiki/ECMAScript) [![](https://snyk.io/test/github/ptkdev-components/webcomponent-instagram-widget/badge.svg)](https://snyk.io/test/github/ptkdev-components/webcomponent-instagram-widget) [![](https://discordapp.com/api/guilds/383373985666301975/embed.png)](http://discord.ptkdev.io) +[![](https://img.shields.io/badge/version-v2.1.1-lightgrey.svg)](https://github.com/ptkdev-components/webcomponent-instagram-widget/releases) [![](https://img.shields.io/npm/v/@ptkdev/webcomponent-instagram-widget.svg)](https://www.npmjs.com/package/@ptkdev/webcomponent-instagram-widget) [![](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/ptkdev-components/webcomponent-instagram-widget/blob/master/LICENSE.md) [![](https://img.shields.io/badge/ES-9-F7DF1E.svg)](https://wikipedia.org/wiki/ECMAScript) [![](https://snyk.io/test/github/ptkdev-components/webcomponent-instagram-widget/badge.svg)](https://snyk.io/test/github/ptkdev-components/webcomponent-instagram-widget) [![](https://discordapp.com/api/guilds/383373985666301975/embed.png)](http://discord.ptkdev.io) > Simple Instagram Widget: Photos Box of your Instagram Profile for your blog or website with this WebComponent. diff --git a/dist/lib/en/instagram-widget.min.js b/dist/lib/en/instagram-widget.min.js index e2ba918..d5570b5 100644 --- a/dist/lib/en/instagram-widget.min.js +++ b/dist/lib/en/instagram-widget.min.js @@ -1,3 +1,3 @@ -// WebComponent: InstagramWidget 2.1.0 - Collection of WebComponents by Patryk Rzucidlo [@PTKDev] +// WebComponent: InstagramWidget 2.1.1 - Collection of WebComponents by Patryk Rzucidlo [@PTKDev] // https://github.com/ptkdev-components/webcomponent-instagram-widget -(function() { class InstagramWidget extends HTMLElement{constructor(){super();const t=document.createElement("template");t.innerHTML='
\n\t
\n\t\t
\n\t\t\t
    \n\t\t
    \n\t
    \n
    ',this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t.content.cloneNode(!0)),this.json=null,this.options_default={username:"@ptkdev","items-limit":"9","image-width":"100%","image-height":"100%",grid:"responsive",cache:"enabled","border-spacing":"2px","border-corners":"5"},this.options=this.options_default}build_html(){let t=this.json.graphql.user.edge_owner_to_timeline_media.edges,e=[];for(let i=0;i${e[t].caption.substring(0,100).replace(/`;if(document.querySelector("instagram-widget").shadowRoot.querySelector(".instagram-widget-photos").innerHTML=i,""!==this.options.grid&&null!==this.options.grid&&"responsive"!==this.options.grid){let t=this.options.grid.split("x"),e=100/parseInt(t[0]),i=document.querySelector("instagram-widget").shadowRoot.querySelectorAll(".instagram-widget-photos img");for(let t=0;t#instagram-widget *{margin:0;padding:0;line-height:0}#instagram-widget .instagram-widget-container{text-align:center;justify-content:center;font-weight:500}#instagram-widget .instagram-widget-photos li img{border-radius:5%;background-color:#f8f8ff;object-fit:cover;object-position:50% 50%;max-width:300px;max-height:300px;min-width:80px;min-height:80px;margin:2px}#instagram-widget .instagram-content ul{list-style-type:none;padding-inline-start:0;width:100%}#instagram-widget .instagram-widget-photos li{list-style-type:none;display:inline}
    \n\t
    \n\t\t
    \n\t\t\t
      \n\t\t
      \n\t
      \n
      ',this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t.content.cloneNode(!0)),this.json=null,this.options_default={username:"@ptkdev","items-limit":"9","image-width":"100%","image-height":"100%",grid:"responsive",cache:"enabled","border-spacing":"2px","border-corners":"5"},this.options=this.options_default}build_html(){let t=this.json.graphql.user.edge_owner_to_timeline_media.edges,e=[];for(let i=0;i${e[t].caption.substring(0,100).replace(/`;if(document.querySelector("instagram-widget").shadowRoot.querySelector(".instagram-widget-photos").innerHTML=i,""!==this.options.grid&&null!==this.options.grid&&"responsive"!==this.options.grid){let t=this.options.grid.split("x"),e=100/parseInt(t[0]),i=document.querySelector("instagram-widget").shadowRoot.querySelectorAll(".instagram-widget-photos img");for(let t=0;t +// WebComponent: InstagramWidget 2.1.1 - Collection of WebComponents by Patryk Rzucidlo [@PTKDev] // https://github.com/ptkdev-components/webcomponent-instagram-widget -(function() { class InstagramWidget extends HTMLElement{constructor(){super();const t=document.createElement("template");t.innerHTML='
      \n\t
      \n\t\t
      \n\t\t\t
        \n\t\t
        \n\t
        \n
        ',this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t.content.cloneNode(!0)),this.json=null,this.options_default={username:"@ptkdev","items-limit":"9","image-width":"100%","image-height":"100%",grid:"responsive",cache:"enabled","border-spacing":"2px","border-corners":"5"},this.options=this.options_default}build_html(){let t=this.json.graphql.user.edge_owner_to_timeline_media.edges,e=[];for(let i=0;i${e[t].caption.substring(0,100).replace(/`;if(document.querySelector("instagram-widget").shadowRoot.querySelector(".instagram-widget-photos").innerHTML=i,""!==this.options.grid&&null!==this.options.grid&&"responsive"!==this.options.grid){let t=this.options.grid.split("x"),e=100/parseInt(t[0]),i=document.querySelector("instagram-widget").shadowRoot.querySelectorAll(".instagram-widget-photos img");for(let t=0;t#instagram-widget *{margin:0;padding:0;line-height:0}#instagram-widget .instagram-widget-container{text-align:center;justify-content:center;font-weight:500}#instagram-widget .instagram-widget-photos li img{border-radius:5%;background-color:#f8f8ff;object-fit:cover;object-position:50% 50%;max-width:300px;max-height:300px;min-width:80px;min-height:80px;margin:2px}#instagram-widget .instagram-content ul{list-style-type:none;padding-inline-start:0;width:100%}#instagram-widget .instagram-widget-photos li{list-style-type:none;display:inline}
        \n\t
        \n\t\t
        \n\t\t\t
          \n\t\t
          \n\t
          \n
          ',this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t.content.cloneNode(!0)),this.json=null,this.options_default={username:"@ptkdev","items-limit":"9","image-width":"100%","image-height":"100%",grid:"responsive",cache:"enabled","border-spacing":"2px","border-corners":"5"},this.options=this.options_default}build_html(){let t=this.json.graphql.user.edge_owner_to_timeline_media.edges,e=[];for(let i=0;i${e[t].caption.substring(0,100).replace(/`;if(document.querySelector("instagram-widget").shadowRoot.querySelector(".instagram-widget-photos").innerHTML=i,""!==this.options.grid&&null!==this.options.grid&&"responsive"!==this.options.grid){let t=this.options.grid.split("x"),e=100/parseInt(t[0]),i=document.querySelector("instagram-widget").shadowRoot.querySelectorAll(".instagram-widget-photos img");for(let t=0;t +// WebComponent: InstagramWidget 2.1.1 - Collection of WebComponents by Patryk Rzucidlo [@PTKDev] // https://github.com/ptkdev-components/webcomponent-instagram-widget -(function() { class InstagramWidget extends HTMLElement{constructor(){super();const t=document.createElement("template");t.innerHTML='
          \n\t
          \n\t\t
          \n\t\t\t
            \n\t\t
            \n\t
            \n
            ',this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t.content.cloneNode(!0)),this.json=null,this.options_default={username:"@ptkdev","items-limit":"9","image-width":"100%","image-height":"100%",grid:"responsive",cache:"enabled","border-spacing":"2px","border-corners":"5"},this.options=this.options_default}build_html(){let t=this.json.graphql.user.edge_owner_to_timeline_media.edges,e=[];for(let i=0;i${e[t].caption.substring(0,100).replace(/`;if(document.querySelector("instagram-widget").shadowRoot.querySelector(".instagram-widget-photos").innerHTML=i,""!==this.options.grid&&null!==this.options.grid&&"responsive"!==this.options.grid){let t=this.options.grid.split("x"),e=100/parseInt(t[0]),i=document.querySelector("instagram-widget").shadowRoot.querySelectorAll(".instagram-widget-photos img");for(let t=0;t#instagram-widget *{margin:0;padding:0;line-height:0}#instagram-widget .instagram-widget-container{text-align:center;justify-content:center;font-weight:500}#instagram-widget .instagram-widget-photos li img{border-radius:5%;background-color:#f8f8ff;object-fit:cover;object-position:50% 50%;max-width:300px;max-height:300px;min-width:80px;min-height:80px;margin:2px}#instagram-widget .instagram-content ul{list-style-type:none;padding-inline-start:0;width:100%}#instagram-widget .instagram-widget-photos li{list-style-type:none;display:inline}
            \n\t
            \n\t\t
            \n\t\t\t
              \n\t\t
              \n\t
              \n
              ',this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t.content.cloneNode(!0)),this.json=null,this.options_default={username:"@ptkdev","items-limit":"9","image-width":"100%","image-height":"100%",grid:"responsive",cache:"enabled","border-spacing":"2px","border-corners":"5"},this.options=this.options_default}build_html(){let t=this.json.graphql.user.edge_owner_to_timeline_media.edges,e=[];for(let i=0;i${e[t].caption.substring(0,100).replace(/`;if(document.querySelector("instagram-widget").shadowRoot.querySelector(".instagram-widget-photos").innerHTML=i,""!==this.options.grid&&null!==this.options.grid&&"responsive"!==this.options.grid){let t=this.options.grid.split("x"),e=100/parseInt(t[0]),i=document.querySelector("instagram-widget").shadowRoot.querySelectorAll(".instagram-widget-photos img");for(let t=0;t +// WebComponent: InstagramWidget 2.1.1 - Collection of WebComponents by Patryk Rzucidlo [@PTKDev] // https://github.com/ptkdev-components/webcomponent-instagram-widget -module.export=class InstagramWidget extends HTMLElement{constructor(){super();const t=document.createElement("template");t.innerHTML='
              \n\t
              \n\t\t
              \n\t\t\t
                \n\t\t
                \n\t
                \n
                ',this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t.content.cloneNode(!0)),this.json=null,this.options_default={username:"@ptkdev","items-limit":"9","image-width":"100%","image-height":"100%",grid:"responsive",cache:"enabled","border-spacing":"2px","border-corners":"5"},this.options=this.options_default}build_html(){let t=this.json.graphql.user.edge_owner_to_timeline_media.edges,e=[];for(let i=0;i${e[t].caption.substring(0,100).replace(/`;if(document.querySelector("instagram-widget").shadowRoot.querySelector(".instagram-widget-photos").innerHTML=i,""!==this.options.grid&&null!==this.options.grid&&"responsive"!==this.options.grid){let t=this.options.grid.split("x"),e=100/parseInt(t[0]),i=document.querySelector("instagram-widget").shadowRoot.querySelectorAll(".instagram-widget-photos img");for(let t=0;t#instagram-widget *{margin:0;padding:0;line-height:0}#instagram-widget .instagram-widget-container{text-align:center;justify-content:center;font-weight:500}#instagram-widget .instagram-widget-photos li img{border-radius:5%;background-color:#f8f8ff;object-fit:cover;object-position:50% 50%;max-width:300px;max-height:300px;min-width:80px;min-height:80px;margin:2px}#instagram-widget .instagram-content ul{list-style-type:none;padding-inline-start:0;width:100%}#instagram-widget .instagram-widget-photos li{list-style-type:none;display:inline}
                \n\t
                \n\t\t
                \n\t\t\t
                  \n\t\t
                  \n\t
                  \n
                  ',this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t.content.cloneNode(!0)),this.json=null,this.options_default={username:"@ptkdev","items-limit":"9","image-width":"100%","image-height":"100%",grid:"responsive",cache:"enabled","border-spacing":"2px","border-corners":"5"},this.options=this.options_default}build_html(){let t=this.json.graphql.user.edge_owner_to_timeline_media.edges,e=[];for(let i=0;i${e[t].caption.substring(0,100).replace(/`;if(document.querySelector("instagram-widget").shadowRoot.querySelector(".instagram-widget-photos").innerHTML=i,""!==this.options.grid&&null!==this.options.grid&&"responsive"!==this.options.grid){let t=this.options.grid.split("x"),e=100/parseInt(t[0]),i=document.querySelector("instagram-widget").shadowRoot.querySelectorAll(".instagram-widget-photos img");for(let t=0;t +// WebComponent: InstagramWidget 2.1.1 - Collection of WebComponents by Patryk Rzucidlo [@PTKDev] // https://github.com/ptkdev-components/webcomponent-instagram-widget -module.export=class InstagramWidget extends HTMLElement{constructor(){super();const t=document.createElement("template");t.innerHTML='
                  \n\t
                  \n\t\t
                  \n\t\t\t
                    \n\t\t
                    \n\t
                    \n
                    ',this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t.content.cloneNode(!0)),this.json=null,this.options_default={username:"@ptkdev","items-limit":"9","image-width":"100%","image-height":"100%",grid:"responsive",cache:"enabled","border-spacing":"2px","border-corners":"5"},this.options=this.options_default}build_html(){let t=this.json.graphql.user.edge_owner_to_timeline_media.edges,e=[];for(let i=0;i${e[t].caption.substring(0,100).replace(/`;if(document.querySelector("instagram-widget").shadowRoot.querySelector(".instagram-widget-photos").innerHTML=i,""!==this.options.grid&&null!==this.options.grid&&"responsive"!==this.options.grid){let t=this.options.grid.split("x"),e=100/parseInt(t[0]),i=document.querySelector("instagram-widget").shadowRoot.querySelectorAll(".instagram-widget-photos img");for(let t=0;t#instagram-widget *{margin:0;padding:0;line-height:0}#instagram-widget .instagram-widget-container{text-align:center;justify-content:center;font-weight:500}#instagram-widget .instagram-widget-photos li img{border-radius:5%;background-color:#f8f8ff;object-fit:cover;object-position:50% 50%;max-width:300px;max-height:300px;min-width:80px;min-height:80px;margin:2px}#instagram-widget .instagram-content ul{list-style-type:none;padding-inline-start:0;width:100%}#instagram-widget .instagram-widget-photos li{list-style-type:none;display:inline}
                    \n\t
                    \n\t\t
                    \n\t\t\t
                      \n\t\t
                      \n\t
                      \n
                      ',this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t.content.cloneNode(!0)),this.json=null,this.options_default={username:"@ptkdev","items-limit":"9","image-width":"100%","image-height":"100%",grid:"responsive",cache:"enabled","border-spacing":"2px","border-corners":"5"},this.options=this.options_default}build_html(){let t=this.json.graphql.user.edge_owner_to_timeline_media.edges,e=[];for(let i=0;i${e[t].caption.substring(0,100).replace(/`;if(document.querySelector("instagram-widget").shadowRoot.querySelector(".instagram-widget-photos").innerHTML=i,""!==this.options.grid&&null!==this.options.grid&&"responsive"!==this.options.grid){let t=this.options.grid.split("x"),e=100/parseInt(t[0]),i=document.querySelector("instagram-widget").shadowRoot.querySelectorAll(".instagram-widget-photos img");for(let t=0;t +// WebComponent: InstagramWidget 2.1.1 - Collection of WebComponents by Patryk Rzucidlo [@PTKDev] // https://github.com/ptkdev-components/webcomponent-instagram-widget -module.export=class InstagramWidget extends HTMLElement{constructor(){super();const t=document.createElement("template");t.innerHTML='
                      \n\t
                      \n\t\t
                      \n\t\t\t
                        \n\t\t
                        \n\t
                        \n
                        ',this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t.content.cloneNode(!0)),this.json=null,this.options_default={username:"@ptkdev","items-limit":"9","image-width":"100%","image-height":"100%",grid:"responsive",cache:"enabled","border-spacing":"2px","border-corners":"5"},this.options=this.options_default}build_html(){let t=this.json.graphql.user.edge_owner_to_timeline_media.edges,e=[];for(let i=0;i${e[t].caption.substring(0,100).replace(/`;if(document.querySelector("instagram-widget").shadowRoot.querySelector(".instagram-widget-photos").innerHTML=i,""!==this.options.grid&&null!==this.options.grid&&"responsive"!==this.options.grid){let t=this.options.grid.split("x"),e=100/parseInt(t[0]),i=document.querySelector("instagram-widget").shadowRoot.querySelectorAll(".instagram-widget-photos img");for(let t=0;t#instagram-widget *{margin:0;padding:0;line-height:0}#instagram-widget .instagram-widget-container{text-align:center;justify-content:center;font-weight:500}#instagram-widget .instagram-widget-photos li img{border-radius:5%;background-color:#f8f8ff;object-fit:cover;object-position:50% 50%;max-width:300px;max-height:300px;min-width:80px;min-height:80px;margin:2px}#instagram-widget .instagram-content ul{list-style-type:none;padding-inline-start:0;width:100%}#instagram-widget .instagram-widget-photos li{list-style-type:none;display:inline}
                        \n\t
                        \n\t\t
                        \n\t\t\t
                          \n\t\t
                          \n\t
                          \n
                          ',this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t.content.cloneNode(!0)),this.json=null,this.options_default={username:"@ptkdev","items-limit":"9","image-width":"100%","image-height":"100%",grid:"responsive",cache:"enabled","border-spacing":"2px","border-corners":"5"},this.options=this.options_default}build_html(){let t=this.json.graphql.user.edge_owner_to_timeline_media.edges,e=[];for(let i=0;i${e[t].caption.substring(0,100).replace(/`;if(document.querySelector("instagram-widget").shadowRoot.querySelector(".instagram-widget-photos").innerHTML=i,""!==this.options.grid&&null!==this.options.grid&&"responsive"!==this.options.grid){let t=this.options.grid.split("x"),e=100/parseInt(t[0]),i=document.querySelector("instagram-widget").shadowRoot.querySelectorAll(".instagram-widget-photos img");for(let t=0;t (https://ptk.dev)", "license": "MIT", diff --git a/webcomponent/js/main.js b/webcomponent/js/main.js index eb3b8bc..1673d43 100644 --- a/webcomponent/js/main.js +++ b/webcomponent/js/main.js @@ -74,8 +74,7 @@ class InstagramWidget extends HTMLElement { api_fetch() { let self = this; - let url = "https://api.ptkdev.io/v1/webcomponent-instagram.json"; // debug mode, instagram api limits - // let url = `https://www.instagram.com/${this.options["username"].replace("@", "")}/?__a=1` + let url = `https://www.instagram.com/${this.options["username"].replace("@", "")}/?__a=1`; fetch(url, {"cache": this.options["cache"] === null || this.options["cache"] === "enabled" ? "force-cache" : "default"}).then(function(response) { if (response.status === 200) { return response.json();