From 87efb2aa98e8931d53bab54efaef50f4d553c7e1 Mon Sep 17 00:00:00 2001 From: Nikolay Rys Date: Sat, 23 Nov 2019 07:24:01 +0300 Subject: [PATCH 01/11] Fix plugins assembly inside webpack configuration https://webpack.js.org/migrate/3/#dedupeplugin-has-been-removed --- webpack.config.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index e1852a6..74eeddb 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -7,12 +7,10 @@ const packageJson = require('./package.json'); const { NODE_ENV } = process.env; const isProduction = NODE_ENV === 'production'; -const license = ` -Likely $version by Ilya Birman (ilyabirman.net) +const license = `Likely $version by Ilya Birman (ilyabirman.net) Rewritten sans jQuery by Evgeny Steblinsky (volter9.github.io) Supported by Ivan Akulov (iamakulov.com), Viktor Karpov (vitkarpov.com), and contributors -Inspired by Social Likes by Artem Sapegin (sapegin.me) -`; +Inspired by Social Likes by Artem Sapegin (sapegin.me)`; function getLicenseComment(version) { return license.replace(/\$version/g, version); @@ -26,9 +24,11 @@ const plugins = [ ]; if (isProduction) { - plugins.concat([ - new webpack.optimize.DedupePlugin(), - new webpack.BannerPlugin(getLicenseComment(packageJson.version)), + plugins.push.apply(plugins, [ + new webpack.BannerPlugin({ + banner: getLicenseComment(packageJson.version), + exclude: './release/likely.css', + }), new webpack.DefinePlugin({ 'process.env': { NODE_ENV: JSON.stringify('production'), From 93e861fdc1d22c606fd737f70193a81d24a5b0a1 Mon Sep 17 00:00:00 2001 From: Nikolay Rys Date: Fri, 29 Nov 2019 05:45:20 +0100 Subject: [PATCH 02/11] Fix url typo --- source/services/facebook.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/services/facebook.js b/source/services/facebook.js index 386fa3a..d554bbe 100644 --- a/source/services/facebook.js +++ b/source/services/facebook.js @@ -3,7 +3,7 @@ */ export default { - counterUrl: 'https://graph.facebook.com/?id={url}&fields=og_object%7Bengagement%7Bcount%7D%%7D&callback=?', + counterUrl: 'https://graph.facebook.com/?id={url}&fields=og_object%7Bengagement%7Bcount%7D%7D&callback=?', convertNumber: (data) => data.og_object.engagement.count, popupUrl: 'https://www.facebook.com/sharer/sharer.php?u={url}', popupWidth: 600, From 1eb05ce78ea9d64c2ec227cd1608c7df49061bfc Mon Sep 17 00:00:00 2001 From: Nikolay Rys Date: Fri, 29 Nov 2019 22:41:27 +0100 Subject: [PATCH 03/11] Add Nikolay Rys to the disclaimer --- webpack.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 74eeddb..2bb4328 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -9,7 +9,8 @@ const isProduction = NODE_ENV === 'production'; const license = `Likely $version by Ilya Birman (ilyabirman.net) Rewritten sans jQuery by Evgeny Steblinsky (volter9.github.io) -Supported by Ivan Akulov (iamakulov.com), Viktor Karpov (vitkarpov.com), and contributors +Supported by Ivan Akulov (iamakulov.com), Viktor Karpov (vitkarpov.com), +Nikolay Rys(linkedin.com/in/nikolay-rys) and contributors Inspired by Social Likes by Artem Sapegin (sapegin.me)`; function getLicenseComment(version) { From 1fbcf7fac3de4dd3f09c8c0dd43eef69193e11bf Mon Sep 17 00:00:00 2001 From: Nikolay Rys Date: Sat, 30 Nov 2019 03:05:35 +0100 Subject: [PATCH 04/11] Simplify webpack config syntax --- webpack.config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 2bb4328..78ff7a6 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -25,7 +25,7 @@ const plugins = [ ]; if (isProduction) { - plugins.push.apply(plugins, [ + plugins.push( new webpack.BannerPlugin({ banner: getLicenseComment(packageJson.version), exclude: './release/likely.css', @@ -34,8 +34,8 @@ if (isProduction) { 'process.env': { NODE_ENV: JSON.stringify('production'), }, - }), - ]); + }) + ); } module.exports = { From bf7839033a9b636ad645bcd221be505d743d96c4 Mon Sep 17 00:00:00 2001 From: Nikolay Rys Date: Sat, 30 Nov 2019 03:06:34 +0100 Subject: [PATCH 05/11] Fix tests according to the changes in the services --- test/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/index.js b/test/index.js index 483ec61..ec4dd98 100644 --- a/test/index.js +++ b/test/index.js @@ -190,7 +190,6 @@ describe('Likely', function () { { name: 'Odnoklassniki', likelyName: 'odnoklassniki' }, { name: 'Pinterest', likelyName: 'pinterest' }, { name: 'VK', likelyName: 'vkontakte' }, - { name: 'LinkedIn', likelyName: 'linkedin' }, ]; testedServices.forEach(({ name, likelyName }) => { @@ -275,12 +274,14 @@ describe('Likely', function () { }); }); - it('should change the default image when the `data-media` on the Pinterest button is specified', function () { + // Temporary disabled because pintrest requires being logged in to show relevant popup + // Actually expected regex: /pinterest\.com\/.*zunNbfY\.jpg/ + it('should open popup for Pinterest', function () { return driver.executeScript(` document.querySelector('.pinterest').setAttribute('data-media', 'http://i.imgur.com/zunNbfY.jpg'); likely.initiate(); `).then(() => { - return expectClickToOpen(driver, '.likely__widget_pinterest', /pinterest\.com\/.*zunNbfY\.jpg/); + return expectClickToOpen(driver, '.likely__widget_pinterest', /pinterest/); }); }); }); From 1df7140f11197ecaa6ee5d18752afb8bcd62bf0a Mon Sep 17 00:00:00 2001 From: Nikolay Rys Date: Sat, 30 Nov 2019 03:07:10 +0100 Subject: [PATCH 06/11] Remove counting for linkedin - it does not support it anymore. --- source/services/linkedin.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/services/linkedin.js b/source/services/linkedin.js index 35368a9..0b99b74 100644 --- a/source/services/linkedin.js +++ b/source/services/linkedin.js @@ -3,8 +3,6 @@ */ export default { - counterUrl: 'https://www.linkedin.com/countserv/count/share?url={url}&format=jsonp&callback=?', - convertNumber: (data) => data.count, popupUrl: 'https://www.linkedin.com/shareArticle?mini=true&url={url}&title={title}', popupWidth: 600, popupHeight: 500, From 142d6abc841ff660a08ebbbe12cc0886a8b2f29f Mon Sep 17 00:00:00 2001 From: Nikolay Rys Date: Sat, 30 Nov 2019 03:07:33 +0100 Subject: [PATCH 07/11] Improve page for manual testing --- test/files/manual.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/files/manual.html b/test/files/manual.html index 087a98e..655cb91 100644 --- a/test/files/manual.html +++ b/test/files/manual.html @@ -22,7 +22,7 @@
+1
Share
Like
-
Pin
+
Pin
Send
Share
Send
From 7276ba8e06d9237c11853565658debb12f72fd0d Mon Sep 17 00:00:00 2001 From: Nikolay Rys Date: Sat, 30 Nov 2019 03:23:30 +0100 Subject: [PATCH 08/11] Fix typo --- test/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/index.js b/test/index.js index ec4dd98..3d2d89f 100644 --- a/test/index.js +++ b/test/index.js @@ -274,7 +274,7 @@ describe('Likely', function () { }); }); - // Temporary disabled because pintrest requires being logged in to show relevant popup + // Temporary disabled because pinterest requires being logged in to show relevant popup, otherwise it redirects // Actually expected regex: /pinterest\.com\/.*zunNbfY\.jpg/ it('should open popup for Pinterest', function () { return driver.executeScript(` From 5911a51b8e982e2fee38816fa8595c2d63074f6f Mon Sep 17 00:00:00 2001 From: Nikolay Rys Date: Sun, 1 Dec 2019 08:23:35 +0100 Subject: [PATCH 09/11] Remove google plus, it does not exist anymore --- readme.md | 3 --- release/likely.css | 2 +- source/index.styl | 1 - source/services/gplus.js | 36 ---------------------------- source/services/index.js | 2 -- test/files/autoinit.html | 1 - test/files/manual.html | 1 - test/files/no-autoinit-multiple.html | 4 ---- test/files/no-autoinit.html | 1 - test/index.js | 2 -- 10 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 source/services/gplus.js diff --git a/readme.md b/readme.md index 976999b..07891f1 100644 --- a/readme.md +++ b/readme.md @@ -66,7 +66,6 @@ Then, create a `div` with the class `likely` and list necessary social networks
-
+1
Share
Pin
Like
@@ -79,7 +78,6 @@ Likely supports following social networks: * `facebook` – Facebook * `twitter` – Twitter -* `gplus` - Google+ * `vkontakte` – VK * `pinterest` – Pinterest * `odnoklassniki` – Odnoklassniki @@ -173,7 +171,6 @@ To make buttons accessible for keyboard navigation and screen readers add `tabin
-
+1
Share
Pin
Like
diff --git a/release/likely.css b/release/likely.css index 083c230..571165c 100755 --- a/release/likely.css +++ b/release/likely.css @@ -1 +1 @@ -.likely,.likely__widget{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;margin:0;padding:0;text-indent:0!important;list-style:none!important;font-weight:400;font-family:Helvetica Neue,Arial,sans-serif;font-size:inherit}.likely{opacity:0;font-size:0!important}.likely_visible{opacity:1;transition:opacity .1s ease-in}.likely>*{display:inline-block;visibility:hidden}.likely_visible>*{visibility:inherit}.likely__widget{display:inline-block;position:relative;white-space:nowrap}.likely__button,.likely__counter{text-decoration:none;text-rendering:optimizeLegibility;display:inline-block;margin:0;outline:0}.likely__button{position:relative;cursor:pointer;user-select:none}.likely__counter{display:none;position:relative;font-weight:400}.likely_ready .likely__counter{display:inline-block}.likely_ready .likely__counter_empty{display:none}.likely__button,.likely__counter,.likely__icon,.likely__widget{vertical-align:top}.likely__widget{transition:background .33s ease-out,color .33s ease-out,fill .33s ease-out}.likely__widget:active,.likely__widget:focus,.likely__widget:hover{transition:none;cursor:pointer}@media (hover:none){.likely__widget:active,.likely__widget:focus,.likely__widget:hover{transition:background .33s ease-out,color .33s ease-out,fill .33s ease-out;cursor:unset}}.likely__icon{position:relative;text-align:left;display:inline-block}.likely svg{position:absolute}.likely__button,.likely__counter{line-height:inherit;cursor:inherit}.likely__button:empty{display:none}.likely__counter{text-align:center}.likely .likely__widget{color:#000;background:hsla(0,0%,91%,.8)}.likely .likely__counter{background-size:1px 1px;background-repeat:repeat-y;background-image:linear-gradient(90deg,rgba(0,0,0,.2) 0,transparent .5px,transparent)}.likely-light .likely__widget{color:#fff;fill:#fff;background:hsla(0,0%,93%,.16);text-shadow:rgba(0,0,0,.2) 0 0 .33em}.likely-light .likely__counter{background-image:linear-gradient(90deg,hsla(0,0%,100%,.4) 0,hsla(0,0%,100%,0) .5px,hsla(0,0%,100%,0))}.likely__widget_facebook{fill:#425497}.likely__widget_facebook:active,.likely__widget_facebook:focus,.likely__widget_facebook:hover{background:rgba(207,212,229,.8)}@media (hover:none){.likely__widget_facebook:active,.likely__widget_facebook:focus,.likely__widget_facebook:hover{background:hsla(0,0%,91%,.8)}}.likely-light .likely__widget_facebook:active,.likely-light .likely__widget_facebook:focus,.likely-light .likely__widget_facebook:hover{text-shadow:#425497 0 0 .25em;background:rgba(66,84,151,.7)}@media (hover:none){.likely-light .likely__widget_facebook:active,.likely-light .likely__widget_facebook:focus,.likely-light .likely__widget_facebook:hover{text-shadow:rgba(0,0,0,.2) 0 0 .33em;background:hsla(0,0%,93%,.16)}}.likely__widget_gplus{fill:#dd4241}.likely__widget_gplus:active,.likely__widget_gplus:focus,.likely__widget_gplus:hover{background:hsla(0,68%,89%,.8)}@media (hover:none){.likely__widget_gplus:active,.likely__widget_gplus:focus,.likely__widget_gplus:hover{background:hsla(0,0%,91%,.8)}}.likely-light .likely__widget_gplus:active,.likely-light .likely__widget_gplus:focus,.likely-light .likely__widget_gplus:hover{text-shadow:#dd4241 0 0 .25em;background:rgba(221,66,65,.7)}@media (hover:none){.likely-light .likely__widget_gplus:active,.likely-light .likely__widget_gplus:focus,.likely-light .likely__widget_gplus:hover{text-shadow:rgba(0,0,0,.2) 0 0 .33em;background:hsla(0,0%,93%,.16)}}.likely__widget_linkedin{fill:#0077b5}.likely__widget_linkedin:active,.likely__widget_linkedin:focus,.likely__widget_linkedin:hover{background:rgba(191,221,236,.8)}@media (hover:none){.likely__widget_linkedin:active,.likely__widget_linkedin:focus,.likely__widget_linkedin:hover{background:hsla(0,0%,91%,.8)}}.likely-light .likely__widget_linkedin:active,.likely-light .likely__widget_linkedin:focus,.likely-light .likely__widget_linkedin:hover{text-shadow:#0077b5 0 0 .25em;background:rgba(0,119,181,.7)}@media (hover:none){.likely-light .likely__widget_linkedin:active,.likely-light .likely__widget_linkedin:focus,.likely-light .likely__widget_linkedin:hover{text-shadow:rgba(0,0,0,.2) 0 0 .33em;background:hsla(0,0%,93%,.16)}}.likely__widget_odnoklassniki{fill:#f6903b}.likely__widget_odnoklassniki:active,.likely__widget_odnoklassniki:focus,.likely__widget_odnoklassniki:hover{background:hsla(27,88%,90%,.8)}@media (hover:none){.likely__widget_odnoklassniki:active,.likely__widget_odnoklassniki:focus,.likely__widget_odnoklassniki:hover{background:hsla(0,0%,91%,.8)}}.likely-light .likely__widget_odnoklassniki:active,.likely-light .likely__widget_odnoklassniki:focus,.likely-light .likely__widget_odnoklassniki:hover{text-shadow:#f6903b 0 0 .25em;background:rgba(246,144,59,.7)}@media (hover:none){.likely-light .likely__widget_odnoklassniki:active,.likely-light .likely__widget_odnoklassniki:focus,.likely-light .likely__widget_odnoklassniki:hover{text-shadow:rgba(0,0,0,.2) 0 0 .33em;background:hsla(0,0%,93%,.16)}}.likely__widget_pinterest{fill:#bd081c}.likely__widget_pinterest:active,.likely__widget_pinterest:focus,.likely__widget_pinterest:hover{background:rgba(238,193,198,.8)}@media (hover:none){.likely__widget_pinterest:active,.likely__widget_pinterest:focus,.likely__widget_pinterest:hover{background:hsla(0,0%,91%,.8)}}.likely-light .likely__widget_pinterest:active,.likely-light .likely__widget_pinterest:focus,.likely-light .likely__widget_pinterest:hover{text-shadow:#bd081c 0 0 .25em;background:rgba(189,8,28,.7)}@media (hover:none){.likely-light .likely__widget_pinterest:active,.likely-light .likely__widget_pinterest:focus,.likely-light .likely__widget_pinterest:hover{text-shadow:rgba(0,0,0,.2) 0 0 .33em;background:hsla(0,0%,93%,.16)}}.likely__widget_telegram{fill:#34abde}.likely__widget_telegram:active,.likely__widget_telegram:focus,.likely__widget_telegram:hover{background:rgba(204,234,246,.8)}@media (hover:none){.likely__widget_telegram:active,.likely__widget_telegram:focus,.likely__widget_telegram:hover{background:hsla(0,0%,91%,.8)}}.likely-light .likely__widget_telegram:active,.likely-light .likely__widget_telegram:focus,.likely-light .likely__widget_telegram:hover{text-shadow:#34abde 0 0 .25em;background:rgba(52,171,222,.7)}@media (hover:none){.likely-light .likely__widget_telegram:active,.likely-light .likely__widget_telegram:focus,.likely-light .likely__widget_telegram:hover{text-shadow:rgba(0,0,0,.2) 0 0 .33em;background:hsla(0,0%,93%,.16)}}.likely__widget_twitter{fill:#00b7ec}.likely__widget_twitter:active,.likely__widget_twitter:focus,.likely__widget_twitter:hover{background:rgba(191,237,250,.8)}@media (hover:none){.likely__widget_twitter:active,.likely__widget_twitter:focus,.likely__widget_twitter:hover{background:hsla(0,0%,91%,.8)}}.likely-light .likely__widget_twitter:active,.likely-light .likely__widget_twitter:focus,.likely-light .likely__widget_twitter:hover{text-shadow:#00b7ec 0 0 .25em;background:rgba(0,183,236,.7)}@media (hover:none){.likely-light .likely__widget_twitter:active,.likely-light .likely__widget_twitter:focus,.likely-light .likely__widget_twitter:hover{text-shadow:rgba(0,0,0,.2) 0 0 .33em;background:hsla(0,0%,93%,.16)}}.likely__widget_vkontakte{fill:#526e8f}.likely__widget_vkontakte:active,.likely__widget_vkontakte:focus,.likely__widget_vkontakte:hover{background:rgba(211,218,227,.8)}@media (hover:none){.likely__widget_vkontakte:active,.likely__widget_vkontakte:focus,.likely__widget_vkontakte:hover{background:hsla(0,0%,91%,.8)}}.likely-light .likely__widget_vkontakte:active,.likely-light .likely__widget_vkontakte:focus,.likely-light .likely__widget_vkontakte:hover{text-shadow:#526e8f 0 0 .25em;background:rgba(82,110,143,.7)}@media (hover:none){.likely-light .likely__widget_vkontakte:active,.likely-light .likely__widget_vkontakte:focus,.likely-light .likely__widget_vkontakte:hover{text-shadow:rgba(0,0,0,.2) 0 0 .33em;background:hsla(0,0%,93%,.16)}}.likely__widget_whatsapp{fill:#25d366}.likely__widget_whatsapp:active,.likely__widget_whatsapp:focus,.likely__widget_whatsapp:hover{background:rgba(200,244,216,.8)}@media (hover:none){.likely__widget_whatsapp:active,.likely__widget_whatsapp:focus,.likely__widget_whatsapp:hover{background:hsla(0,0%,91%,.8)}}.likely-light .likely__widget_whatsapp:active,.likely-light .likely__widget_whatsapp:focus,.likely-light .likely__widget_whatsapp:hover{text-shadow:#25d366 0 0 .25em;background:rgba(37,211,102,.7)}@media (hover:none){.likely-light .likely__widget_whatsapp:active,.likely-light .likely__widget_whatsapp:focus,.likely-light .likely__widget_whatsapp:hover{text-shadow:rgba(0,0,0,.2) 0 0 .33em;background:hsla(0,0%,93%,.16)}}.likely{margin:0 -5px -10px}.likely .likely__widget{line-height:20px;font-size:14px;border-radius:3px;height:22px;margin:0 5px 10px}.likely .likely__icon{width:22px;height:22px}.likely .likely__button{padding:1px 4px 1px 0}.likely .likely__counter{padding:1px 4px}.likely svg{left:3px;top:3px;width:16px;height:16px}.likely-big{margin:0 -6px -12px}.likely-big .likely__widget{line-height:28px;font-size:18px;border-radius:4px;height:32px;margin:0 6px 12px}.likely-big .likely__icon{width:32px;height:32px}.likely-big .likely__button{padding:2px 6px 2px 0}.likely-big .likely__counter{padding:2px 6px}.likely-big svg{left:4px;top:4px;width:24px;height:24px}.likely-small{margin:0 -4px -8px}.likely-small .likely__widget{line-height:14px;font-size:12px;border-radius:2px;height:18px;margin:0 4px 8px}.likely-small .likely__icon{width:18px;height:18px}.likely-small .likely__button{padding:2px 3px 2px 0}.likely-small .likely__counter{padding:2px 3px}.likely-small svg{left:3px;top:3px;width:12px;height:12px} \ No newline at end of file +.likely,.likely__widget{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;margin:0;padding:0;text-indent:0!important;list-style:none!important;font-weight:400;font-family:Helvetica Neue,Arial,sans-serif;font-size:inherit}.likely{opacity:0;font-size:0!important}.likely_visible{opacity:1;transition:opacity .1s ease-in}.likely>*{display:inline-block;visibility:hidden}.likely_visible>*{visibility:inherit}.likely__widget{display:inline-block;position:relative;white-space:nowrap}.likely__button,.likely__counter{text-decoration:none;text-rendering:optimizeLegibility;display:inline-block;margin:0;outline:0}.likely__button{position:relative;cursor:pointer;user-select:none}.likely__counter{display:none;position:relative;font-weight:400}.likely_ready .likely__counter{display:inline-block}.likely_ready .likely__counter_empty{display:none}.likely__button,.likely__counter,.likely__icon,.likely__widget{vertical-align:top}.likely__widget{transition:background .33s ease-out,color .33s ease-out,fill .33s ease-out}.likely__widget:active,.likely__widget:focus,.likely__widget:hover{transition:none;cursor:pointer}@media (hover:none){.likely__widget:active,.likely__widget:focus,.likely__widget:hover{transition:background .33s ease-out,color .33s ease-out,fill .33s ease-out;cursor:unset}}.likely__icon{position:relative;text-align:left;display:inline-block}.likely svg{position:absolute}.likely__button,.likely__counter{line-height:inherit;cursor:inherit}.likely__button:empty{display:none}.likely__counter{text-align:center}.likely .likely__widget{color:#000;background:hsla(0,0%,91%,.8)}.likely .likely__counter{background-size:1px 1px;background-repeat:repeat-y;background-image:linear-gradient(90deg,rgba(0,0,0,.2) 0,transparent .5px,transparent)}.likely-light .likely__widget{color:#fff;fill:#fff;background:hsla(0,0%,93%,.16);text-shadow:rgba(0,0,0,.2) 0 0 .33em}.likely-light .likely__counter{background-image:linear-gradient(90deg,hsla(0,0%,100%,.4) 0,hsla(0,0%,100%,0) .5px,hsla(0,0%,100%,0))}.likely__widget_facebook{fill:#425497}.likely__widget_facebook:active,.likely__widget_facebook:focus,.likely__widget_facebook:hover{background:rgba(207,212,229,.8)}@media (hover:none){.likely__widget_facebook:active,.likely__widget_facebook:focus,.likely__widget_facebook:hover{background:hsla(0,0%,91%,.8)}}.likely-light .likely__widget_facebook:active,.likely-light .likely__widget_facebook:focus,.likely-light .likely__widget_facebook:hover{text-shadow:#425497 0 0 .25em;background:rgba(66,84,151,.7)}@media (hover:none){.likely-light .likely__widget_facebook:active,.likely-light .likely__widget_facebook:focus,.likely-light .likely__widget_facebook:hover{text-shadow:rgba(0,0,0,.2) 0 0 .33em;background:hsla(0,0%,93%,.16)}}.likely__widget_linkedin{fill:#0077b5}.likely__widget_linkedin:active,.likely__widget_linkedin:focus,.likely__widget_linkedin:hover{background:rgba(191,221,236,.8)}@media (hover:none){.likely__widget_linkedin:active,.likely__widget_linkedin:focus,.likely__widget_linkedin:hover{background:hsla(0,0%,91%,.8)}}.likely-light .likely__widget_linkedin:active,.likely-light .likely__widget_linkedin:focus,.likely-light .likely__widget_linkedin:hover{text-shadow:#0077b5 0 0 .25em;background:rgba(0,119,181,.7)}@media (hover:none){.likely-light .likely__widget_linkedin:active,.likely-light .likely__widget_linkedin:focus,.likely-light .likely__widget_linkedin:hover{text-shadow:rgba(0,0,0,.2) 0 0 .33em;background:hsla(0,0%,93%,.16)}}.likely__widget_odnoklassniki{fill:#f6903b}.likely__widget_odnoklassniki:active,.likely__widget_odnoklassniki:focus,.likely__widget_odnoklassniki:hover{background:hsla(27,88%,90%,.8)}@media (hover:none){.likely__widget_odnoklassniki:active,.likely__widget_odnoklassniki:focus,.likely__widget_odnoklassniki:hover{background:hsla(0,0%,91%,.8)}}.likely-light .likely__widget_odnoklassniki:active,.likely-light .likely__widget_odnoklassniki:focus,.likely-light .likely__widget_odnoklassniki:hover{text-shadow:#f6903b 0 0 .25em;background:rgba(246,144,59,.7)}@media (hover:none){.likely-light .likely__widget_odnoklassniki:active,.likely-light .likely__widget_odnoklassniki:focus,.likely-light .likely__widget_odnoklassniki:hover{text-shadow:rgba(0,0,0,.2) 0 0 .33em;background:hsla(0,0%,93%,.16)}}.likely__widget_pinterest{fill:#bd081c}.likely__widget_pinterest:active,.likely__widget_pinterest:focus,.likely__widget_pinterest:hover{background:rgba(238,193,198,.8)}@media (hover:none){.likely__widget_pinterest:active,.likely__widget_pinterest:focus,.likely__widget_pinterest:hover{background:hsla(0,0%,91%,.8)}}.likely-light .likely__widget_pinterest:active,.likely-light .likely__widget_pinterest:focus,.likely-light .likely__widget_pinterest:hover{text-shadow:#bd081c 0 0 .25em;background:rgba(189,8,28,.7)}@media (hover:none){.likely-light .likely__widget_pinterest:active,.likely-light .likely__widget_pinterest:focus,.likely-light .likely__widget_pinterest:hover{text-shadow:rgba(0,0,0,.2) 0 0 .33em;background:hsla(0,0%,93%,.16)}}.likely__widget_telegram{fill:#34abde}.likely__widget_telegram:active,.likely__widget_telegram:focus,.likely__widget_telegram:hover{background:rgba(204,234,246,.8)}@media (hover:none){.likely__widget_telegram:active,.likely__widget_telegram:focus,.likely__widget_telegram:hover{background:hsla(0,0%,91%,.8)}}.likely-light .likely__widget_telegram:active,.likely-light .likely__widget_telegram:focus,.likely-light .likely__widget_telegram:hover{text-shadow:#34abde 0 0 .25em;background:rgba(52,171,222,.7)}@media (hover:none){.likely-light .likely__widget_telegram:active,.likely-light .likely__widget_telegram:focus,.likely-light .likely__widget_telegram:hover{text-shadow:rgba(0,0,0,.2) 0 0 .33em;background:hsla(0,0%,93%,.16)}}.likely__widget_twitter{fill:#00b7ec}.likely__widget_twitter:active,.likely__widget_twitter:focus,.likely__widget_twitter:hover{background:rgba(191,237,250,.8)}@media (hover:none){.likely__widget_twitter:active,.likely__widget_twitter:focus,.likely__widget_twitter:hover{background:hsla(0,0%,91%,.8)}}.likely-light .likely__widget_twitter:active,.likely-light .likely__widget_twitter:focus,.likely-light .likely__widget_twitter:hover{text-shadow:#00b7ec 0 0 .25em;background:rgba(0,183,236,.7)}@media (hover:none){.likely-light .likely__widget_twitter:active,.likely-light .likely__widget_twitter:focus,.likely-light .likely__widget_twitter:hover{text-shadow:rgba(0,0,0,.2) 0 0 .33em;background:hsla(0,0%,93%,.16)}}.likely__widget_vkontakte{fill:#526e8f}.likely__widget_vkontakte:active,.likely__widget_vkontakte:focus,.likely__widget_vkontakte:hover{background:rgba(211,218,227,.8)}@media (hover:none){.likely__widget_vkontakte:active,.likely__widget_vkontakte:focus,.likely__widget_vkontakte:hover{background:hsla(0,0%,91%,.8)}}.likely-light .likely__widget_vkontakte:active,.likely-light .likely__widget_vkontakte:focus,.likely-light .likely__widget_vkontakte:hover{text-shadow:#526e8f 0 0 .25em;background:rgba(82,110,143,.7)}@media (hover:none){.likely-light .likely__widget_vkontakte:active,.likely-light .likely__widget_vkontakte:focus,.likely-light .likely__widget_vkontakte:hover{text-shadow:rgba(0,0,0,.2) 0 0 .33em;background:hsla(0,0%,93%,.16)}}.likely__widget_whatsapp{fill:#25d366}.likely__widget_whatsapp:active,.likely__widget_whatsapp:focus,.likely__widget_whatsapp:hover{background:rgba(200,244,216,.8)}@media (hover:none){.likely__widget_whatsapp:active,.likely__widget_whatsapp:focus,.likely__widget_whatsapp:hover{background:hsla(0,0%,91%,.8)}}.likely-light .likely__widget_whatsapp:active,.likely-light .likely__widget_whatsapp:focus,.likely-light .likely__widget_whatsapp:hover{text-shadow:#25d366 0 0 .25em;background:rgba(37,211,102,.7)}@media (hover:none){.likely-light .likely__widget_whatsapp:active,.likely-light .likely__widget_whatsapp:focus,.likely-light .likely__widget_whatsapp:hover{text-shadow:rgba(0,0,0,.2) 0 0 .33em;background:hsla(0,0%,93%,.16)}}.likely{margin:0 -5px -10px}.likely .likely__widget{line-height:20px;font-size:14px;border-radius:3px;height:22px;margin:0 5px 10px}.likely .likely__icon{width:22px;height:22px}.likely .likely__button{padding:1px 4px 1px 0}.likely .likely__counter{padding:1px 4px}.likely svg{left:3px;top:3px;width:16px;height:16px}.likely-big{margin:0 -6px -12px}.likely-big .likely__widget{line-height:28px;font-size:18px;border-radius:4px;height:32px;margin:0 6px 12px}.likely-big .likely__icon{width:32px;height:32px}.likely-big .likely__button{padding:2px 6px 2px 0}.likely-big .likely__counter{padding:2px 6px}.likely-big svg{left:4px;top:4px;width:24px;height:24px}.likely-small{margin:0 -4px -8px}.likely-small .likely__widget{line-height:14px;font-size:12px;border-radius:2px;height:18px;margin:0 4px 8px}.likely-small .likely__icon{width:18px;height:18px}.likely-small .likely__button{padding:2px 3px 2px 0}.likely-small .likely__counter{padding:2px 3px}.likely-small svg{left:3px;top:3px;width:12px;height:12px} \ No newline at end of file diff --git a/source/index.styl b/source/index.styl index f5245e4..c5ad18d 100644 --- a/source/index.styl +++ b/source/index.styl @@ -170,7 +170,6 @@ colorize(button, color) { } colorize('facebook', #425497); -colorize('gplus', #dd4241); colorize('linkedin', #0077b5); colorize('odnoklassniki', #f6903b); colorize('pinterest', #bd081c); diff --git a/source/services/gplus.js b/source/services/gplus.js deleted file mode 100644 index 630264a..0000000 --- a/source/services/gplus.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Google+ service provider - */ - -export default { - counterUrl: 'https://clients6.google.com/rpc', - counter(counterUrl, callback, sharedUrl) { - const xhr = new XMLHttpRequest(); - xhr.open('POST', counterUrl); - xhr.setRequestHeader('Content-Type', 'application/json'); - - xhr.addEventListener('load', () => { - const plusOneCount = JSON.parse(xhr.responseText)[0].result.metadata.globalCounts.count; - callback(plusOneCount); - }); - - xhr.send(JSON.stringify([{ - method: 'pos.plusones.get', - id: 'p', - params: { - nolog: true, - id: sharedUrl, - source: 'widget', - userId: '@viewer', - groupId: '@self', - }, - jsonrpc: '2.0', - key: 'p', - apiVersion: 'v1', - }])); - }, - popupUrl: 'https://plus.google.com/share?url={url}', - popupWidth: 700, - popupHeight: 500, - svgIconPath: '8,6.5v3h4.291c-0.526,2.01-2.093,3.476-4.315,3.476C5.228,12.976,3,10.748,3,8c0-2.748,2.228-4.976,4.976-4.976c1.442,0,2.606,0.623,3.397,1.603L13.52,2.48C12.192,0.955,10.276,0,8,0C3.582,0,0,3.582,0,8s3.582,8,8,8s7.5-3.582,7.5-8V6.5H8', -}; diff --git a/source/services/index.js b/source/services/index.js index 379f1c2..d9c3842 100644 --- a/source/services/index.js +++ b/source/services/index.js @@ -6,7 +6,6 @@ import { each } from '../utils'; /* eslint-disable sort-imports */ import facebook from './facebook'; -import gplus from './gplus'; import linkedin from './linkedin'; import odnoklassniki from './odnoklassniki'; import pinterest from './pinterest'; @@ -19,7 +18,6 @@ import whatsapp from './whatsapp'; const services = { facebook, - gplus, linkedin, odnoklassniki, pinterest, diff --git a/test/files/autoinit.html b/test/files/autoinit.html index 1434dfc..10540b7 100644 --- a/test/files/autoinit.html +++ b/test/files/autoinit.html @@ -20,7 +20,6 @@
-
+1
Share
Like
Pin
diff --git a/test/files/manual.html b/test/files/manual.html index 655cb91..7499b40 100644 --- a/test/files/manual.html +++ b/test/files/manual.html @@ -19,7 +19,6 @@
-
+1
Share
Like
Pin
diff --git a/test/files/no-autoinit-multiple.html b/test/files/no-autoinit-multiple.html index c45487a..ce8728d 100644 --- a/test/files/no-autoinit-multiple.html +++ b/test/files/no-autoinit-multiple.html @@ -20,7 +20,6 @@
-
+1
Share
Like
Pin
@@ -30,7 +29,6 @@
-
+1
Share
Like
Pin
@@ -40,7 +38,6 @@
-
+1
Share
Like
Pin
@@ -50,7 +47,6 @@
-
+1
Share
Like
Pin
diff --git a/test/files/no-autoinit.html b/test/files/no-autoinit.html index ee26187..982d872 100644 --- a/test/files/no-autoinit.html +++ b/test/files/no-autoinit.html @@ -20,7 +20,6 @@
-
+1
Share
Like
Pin
diff --git a/test/index.js b/test/index.js index 3d2d89f..0347ba0 100644 --- a/test/index.js +++ b/test/index.js @@ -186,7 +186,6 @@ describe('Likely', function () { const testedServices = [ { name: 'Facebook', likelyName: 'facebook' }, - { name: 'Google+', likelyName: 'gplus' }, { name: 'Odnoklassniki', likelyName: 'odnoklassniki' }, { name: 'Pinterest', likelyName: 'pinterest' }, { name: 'VK', likelyName: 'vkontakte' }, @@ -208,7 +207,6 @@ describe('Likely', function () { const testedServices = [ { name: 'Facebook', likelyName: 'facebook', urlRegex: /facebook\.com/ }, - { name: 'Google+', likelyName: 'gplus', urlRegex: /plus\.google\.com/ }, { name: 'Odnoklassniki', likelyName: 'odnoklassniki', urlRegex: /ok\.ru/ }, { name: 'Pinterest', likelyName: 'pinterest', urlRegex: /pinterest\.com/ }, { name: 'Telegram', likelyName: 'telegram', urlRegex: /telegram\.me/ }, From 68de99c8f190bb26c21ef8cbdf0145242b96a5a1 Mon Sep 17 00:00:00 2001 From: Nikolay Rys Date: Sun, 1 Dec 2019 19:21:24 +0100 Subject: [PATCH 10/11] Fix typo --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 78ff7a6..69cace3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -10,7 +10,7 @@ const isProduction = NODE_ENV === 'production'; const license = `Likely $version by Ilya Birman (ilyabirman.net) Rewritten sans jQuery by Evgeny Steblinsky (volter9.github.io) Supported by Ivan Akulov (iamakulov.com), Viktor Karpov (vitkarpov.com), -Nikolay Rys(linkedin.com/in/nikolay-rys) and contributors +Nikolay Rys (linkedin.com/in/nikolay-rys) and contributors Inspired by Social Likes by Artem Sapegin (sapegin.me)`; function getLicenseComment(version) { From f786fca4e9c8e494880db07901771cf331453b09 Mon Sep 17 00:00:00 2001 From: Nikolay Rys Date: Sun, 1 Dec 2019 19:21:56 +0100 Subject: [PATCH 11/11] 2.4 --- bower.json | 2 +- package.json | 2 +- release/likely-commonjs.js | 7 ++++--- release/likely.js | 7 ++++--- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/bower.json b/bower.json index ab14e2a..8fe157f 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "Likely", - "version": "2.3.1", + "version": "2.4", "homepage": "http://ilyabirman.ru/projects/likely", "authors": [ "Ilya Birman ", diff --git a/package.json b/package.json index 53dcf06..4cd43f1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ilyabirman-likely", "description": "The social sharing buttons that aren’t shabby", - "version": "2.3.1", + "version": "2.4.0", "repository": { "type": "git", "url": "https://github.com/ilyabirman/Likely.git" diff --git a/release/likely-commonjs.js b/release/likely-commonjs.js index 7781281..a9564cc 100644 --- a/release/likely-commonjs.js +++ b/release/likely-commonjs.js @@ -1,7 +1,8 @@ /*! - * Likely 2.3.1 by Ilya Birman (ilyabirman.net) + * Likely 2.4.0 by Ilya Birman (ilyabirman.net) * Rewritten sans jQuery by Evgeny Steblinsky (volter9.github.io) - * Supported by Ivan Akulov (iamakulov.com), Viktor Karpov (vitkarpov.com), and contributors + * Supported by Ivan Akulov (iamakulov.com), Viktor Karpov (vitkarpov.com), + * Nikolay Rys (linkedin.com/in/nikolay-rys) and contributors * Inspired by Social Likes by Artem Sapegin (sapegin.me) */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.likely=e():t.likely=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=22)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"each",function(){return o}),n.d(e,"toArray",function(){return u}),n.d(e,"merge",function(){return c}),n.d(e,"extend",function(){return a}),n.d(e,"getDataset",function(){return s}),n.d(e,"bools",function(){return l}),n.d(e,"template",function(){return p}),n.d(e,"makeUrl",function(){return f}),n.d(e,"query",function(){return d}),n.d(e,"set",function(){return h}),n.d(e,"getDefaultUrl",function(){return v}),n.d(e,"isBrowserEnv",function(){return m});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i={yes:!0,no:!1},o=function(t,e){for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},u=function(t){return Array.prototype.slice.call(t)},c=function(){for(var t={},e=Array.prototype.slice.call(arguments),n=0;n=0;e--)(o=i[e])&&o.name&&/^data-\w[\w\-]*$/.test(o.name)&&(u=o.name.substr(5).replace(/-./g,c),n[u]=o.value);return n},l=function(t){var e={},n=s(t);for(var r in n)if(n.hasOwnProperty(r)){var o=n[r];e[r]=i[o]||o}return e},p=function(t,e){return t?t.replace(/\{([^\}]+)\}/g,function(t,n){return n in e?e[n]:t}):""},f=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(e[n]=encodeURIComponent(e[n]));return p(t,e)},d=function(t){var e=encodeURIComponent,n=[];for(var i in t)"object"!==r(t[i])&&n.push(e(i)+"="+e(t[i]));return n.join("&")},h=function(t,e,n){var r=e.split("."),i=null;r.forEach(function(e,n){void 0===t[e]&&(t[e]={}),n!==r.length-1&&(t=t[e]),i=e}),t[i]=n},v=function(){var t=document.querySelector('link[rel="canonical"]');return t?t.href:window.location.href.replace(window.location.hash,"")},m="undefined"!=typeof window&&"undefined"!=typeof document&&document.createElement},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"global",function(){return o}),n.d(e,"wrapSVG",function(){return a}),n.d(e,"createNode",function(){return s}),n.d(e,"getScript",function(){return l}),n.d(e,"getJSON",function(){return p}),n.d(e,"find",function(){return f}),n.d(e,"findAll",function(){return d}),n.d(e,"openPopup",function(){return h}),n.d(e,"createTempLink",function(){return v});var r=n(0),i={},o=r.isBrowserEnv?window:i,u=r.isBrowserEnv?document.createElement("div"):{},c=0;o.__likelyCallbacks={};var a=function(t){return''},s=function(t){return u.innerHTML=t,u.children[0]},l=function(t){var e=document.createElement("script"),n=document.head;e.type="text/javascript",e.src=t,n.appendChild(e),n.removeChild(e)},p=function(t,e){var n=encodeURIComponent("random_fun_"+ ++c),r=t.replace(/callback=(\?)/,"callback=__likelyCallbacks."+n);o.__likelyCallbacks[n]=e,l(r)},f=function(t,e){return(e||document).querySelector(t)},d=function(t,e){return Array.prototype.slice.call((e||document).querySelectorAll(t))},h=function(t,e,n,r){var i=Math.round(screen.width/2-n/2),o=0;screen.height>r&&(o=Math.round(screen.height/3-r/2));var u="left="+i+",top="+o+",width="+n+",height="+r+",personalbar=0,toolbar=0,scrollbars=1,resizable=1",c=window.open(t,e,u);return c?(c.focus(),c):(location.href=t,null)},v=function(t){var e=document.createElement("a");e.href=t,e.style="display: none",document.body.appendChild(e),setTimeout(function(){e.click(),document.body.removeChild(e)})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"likely",prefix:"likely__"}},function(t,e,n){"use strict";var r=n(9),i=n(0),o=n(10),u=n(11),c=n(12),a=n(13),s=n(14),l=n(15),p=n(16),f=n(17),d=n(18),h={facebook:o.a,gplus:u.a,linkedin:c.a,odnoklassniki:a.a,pinterest:s.a,telegram:l.a,twitter:p.a,vkontakte:f.a,whatsapp:d.a};n.i(i.each)(h,function(t,e){n.i(r.a)(t),t.name=e}),e.a=h},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n=0;e--)(o=r[e])&&o.name&&/^data-\w[\w\-]*$/.test(o.name)&&(u=o.name.substr(5).replace(/-./g,c),n[u]=o.value);return n},l=function(t){var e={},n=s(t);for(var i in n)if(n.hasOwnProperty(i)){var o=n[i];e[i]=r[o]||o}return e},p=function(t,e){return t?t.replace(/\{([^\}]+)\}/g,function(t,n){return n in e?e[n]:t}):""},f=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(e[n]=encodeURIComponent(e[n]));return p(t,e)},d=function(t){var e=encodeURIComponent,n=[];for(var r in t)"object"!==i(t[r])&&n.push(e(r)+"="+e(t[r]));return n.join("&")},h=function(t,e,n){var i=e.split("."),r=null;i.forEach(function(e,n){void 0===t[e]&&(t[e]={}),n!==i.length-1&&(t=t[e]),r=e}),t[r]=n},v=function(){var t=document.querySelector('link[rel="canonical"]');return t?t.href:window.location.href.replace(window.location.hash,"")},m="undefined"!=typeof window&&"undefined"!=typeof document&&document.createElement},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"global",function(){return o}),n.d(e,"wrapSVG",function(){return a}),n.d(e,"createNode",function(){return s}),n.d(e,"getScript",function(){return l}),n.d(e,"getJSON",function(){return p}),n.d(e,"find",function(){return f}),n.d(e,"findAll",function(){return d}),n.d(e,"openPopup",function(){return h}),n.d(e,"createTempLink",function(){return v});var i=n(0),r={},o=i.isBrowserEnv?window:r,u=i.isBrowserEnv?document.createElement("div"):{},c=0;o.__likelyCallbacks={};var a=function(t){return''},s=function(t){return u.innerHTML=t,u.children[0]},l=function(t){var e=document.createElement("script"),n=document.head;e.type="text/javascript",e.src=t,n.appendChild(e),n.removeChild(e)},p=function(t,e){var n=encodeURIComponent("random_fun_"+ ++c),i=t.replace(/callback=(\?)/,"callback=__likelyCallbacks."+n);o.__likelyCallbacks[n]=e,l(i)},f=function(t,e){return(e||document).querySelector(t)},d=function(t,e){return Array.prototype.slice.call((e||document).querySelectorAll(t))},h=function(t,e,n,i){var r=Math.round(screen.width/2-n/2),o=0;screen.height>i&&(o=Math.round(screen.height/3-i/2));var u="left="+r+",top="+o+",width="+n+",height="+i+",personalbar=0,toolbar=0,scrollbars=1,resizable=1",c=window.open(t,e,u);return c?(c.focus(),c):(location.href=t,null)},v=function(t){var e=document.createElement("a");e.href=t,e.style="display: none",document.body.appendChild(e),setTimeout(function(){e.click(),document.body.removeChild(e)})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"likely",prefix:"likely__"}},function(t,e,n){"use strict";var i=n(9),r=n(0),o=n(10),u=n(11),c=n(12),a=n(13),s=n(14),l=n(15),p=n(16),f=n(17),d={facebook:o.a,linkedin:u.a,odnoklassniki:c.a,pinterest:a.a,telegram:s.a,twitter:l.a,vkontakte:p.a,whatsapp:f.a};n.i(r.each)(d,function(t,e){n.i(i.a)(t),t.name=e}),e.a=d},function(t,e,n){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r=function(){function t(t,e){for(var n=0;n=0;e--)(o=r[e])&&o.name&&/^data-\w[\w\-]*$/.test(o.name)&&(u=o.name.substr(5).replace(/-./g,c),n[u]=o.value);return n},l=function(t){var e={},n=s(t);for(var i in n)if(n.hasOwnProperty(i)){var o=n[i];e[i]=r[o]||o}return e},p=function(t,e){return t?t.replace(/\{([^\}]+)\}/g,function(t,n){return n in e?e[n]:t}):""},f=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(e[n]=encodeURIComponent(e[n]));return p(t,e)},d=function(t){var e=encodeURIComponent,n=[];for(var r in t)"object"!==i(t[r])&&n.push(e(r)+"="+e(t[r]));return n.join("&")},h=function(t,e,n){var i=e.split("."),r=null;i.forEach(function(e,n){void 0===t[e]&&(t[e]={}),n!==i.length-1&&(t=t[e]),r=e}),t[r]=n},v=function(){var t=document.querySelector('link[rel="canonical"]');return t?t.href:window.location.href.replace(window.location.hash,"")},m="undefined"!=typeof window&&"undefined"!=typeof document&&document.createElement},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"global",function(){return o}),n.d(e,"wrapSVG",function(){return a}),n.d(e,"createNode",function(){return s}),n.d(e,"getScript",function(){return l}),n.d(e,"getJSON",function(){return p}),n.d(e,"find",function(){return f}),n.d(e,"findAll",function(){return d}),n.d(e,"openPopup",function(){return h}),n.d(e,"createTempLink",function(){return v});var i=n(0),r={},o=i.isBrowserEnv?window:r,u=i.isBrowserEnv?document.createElement("div"):{},c=0;o.__likelyCallbacks={};var a=function(t){return''},s=function(t){return u.innerHTML=t,u.children[0]},l=function(t){var e=document.createElement("script"),n=document.head;e.type="text/javascript",e.src=t,n.appendChild(e),n.removeChild(e)},p=function(t,e){var n=encodeURIComponent("random_fun_"+ ++c),i=t.replace(/callback=(\?)/,"callback=__likelyCallbacks."+n);o.__likelyCallbacks[n]=e,l(i)},f=function(t,e){return(e||document).querySelector(t)},d=function(t,e){return Array.prototype.slice.call((e||document).querySelectorAll(t))},h=function(t,e,n,i){var r=Math.round(screen.width/2-n/2),o=0;screen.height>i&&(o=Math.round(screen.height/3-i/2));var u="left="+r+",top="+o+",width="+n+",height="+i+",personalbar=0,toolbar=0,scrollbars=1,resizable=1",c=window.open(t,e,u);return c?(c.focus(),c):(location.href=t,null)},v=function(t){var e=document.createElement("a");e.href=t,e.style="display: none",document.body.appendChild(e),setTimeout(function(){e.click(),document.body.removeChild(e)})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"likely",prefix:"likely__"}},function(t,e,n){"use strict";var i=n(9),r=n(0),o=n(10),u=n(11),c=n(12),a=n(13),s=n(14),l=n(15),p=n(16),f=n(17),d=n(18),h={facebook:o.a,gplus:u.a,linkedin:c.a,odnoklassniki:a.a,pinterest:s.a,telegram:l.a,twitter:p.a,vkontakte:f.a,whatsapp:d.a};n.i(r.each)(h,function(t,e){n.i(i.a)(t),t.name=e}),e.a=h},function(t,e,n){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r=function(){function t(t,e){for(var n=0;n=0;e--)(o=r[e])&&o.name&&/^data-\w[\w\-]*$/.test(o.name)&&(u=o.name.substr(5).replace(/-./g,c),n[u]=o.value);return n},l=function(t){var e={},n=s(t);for(var i in n)if(n.hasOwnProperty(i)){var o=n[i];e[i]=r[o]||o}return e},p=function(t,e){return t?t.replace(/\{([^\}]+)\}/g,function(t,n){return n in e?e[n]:t}):""},f=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(e[n]=encodeURIComponent(e[n]));return p(t,e)},d=function(t){var e=encodeURIComponent,n=[];for(var r in t)"object"!==i(t[r])&&n.push(e(r)+"="+e(t[r]));return n.join("&")},h=function(t,e,n){var i=e.split("."),r=null;i.forEach(function(e,n){void 0===t[e]&&(t[e]={}),n!==i.length-1&&(t=t[e]),r=e}),t[r]=n},v=function(){var t=document.querySelector('link[rel="canonical"]');return t?t.href:window.location.href.replace(window.location.hash,"")},m="undefined"!=typeof window&&"undefined"!=typeof document&&document.createElement},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"global",function(){return o}),n.d(e,"wrapSVG",function(){return a}),n.d(e,"createNode",function(){return s}),n.d(e,"getScript",function(){return l}),n.d(e,"getJSON",function(){return p}),n.d(e,"find",function(){return f}),n.d(e,"findAll",function(){return d}),n.d(e,"openPopup",function(){return h}),n.d(e,"createTempLink",function(){return v});var i=n(0),r={},o=i.isBrowserEnv?window:r,u=i.isBrowserEnv?document.createElement("div"):{},c=0;o.__likelyCallbacks={};var a=function(t){return''},s=function(t){return u.innerHTML=t,u.children[0]},l=function(t){var e=document.createElement("script"),n=document.head;e.type="text/javascript",e.src=t,n.appendChild(e),n.removeChild(e)},p=function(t,e){var n=encodeURIComponent("random_fun_"+ ++c),i=t.replace(/callback=(\?)/,"callback=__likelyCallbacks."+n);o.__likelyCallbacks[n]=e,l(i)},f=function(t,e){return(e||document).querySelector(t)},d=function(t,e){return Array.prototype.slice.call((e||document).querySelectorAll(t))},h=function(t,e,n,i){var r=Math.round(screen.width/2-n/2),o=0;screen.height>i&&(o=Math.round(screen.height/3-i/2));var u="left="+r+",top="+o+",width="+n+",height="+i+",personalbar=0,toolbar=0,scrollbars=1,resizable=1",c=window.open(t,e,u);return c?(c.focus(),c):(location.href=t,null)},v=function(t){var e=document.createElement("a");e.href=t,e.style="display: none",document.body.appendChild(e),setTimeout(function(){e.click(),document.body.removeChild(e)})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"likely",prefix:"likely__"}},function(t,e,n){"use strict";var i=n(9),r=n(0),o=n(10),u=n(11),c=n(12),a=n(13),s=n(14),l=n(15),p=n(16),f=n(17),d={facebook:o.a,linkedin:u.a,odnoklassniki:c.a,pinterest:a.a,telegram:s.a,twitter:l.a,vkontakte:p.a,whatsapp:f.a};n.i(r.each)(d,function(t,e){n.i(i.a)(t),t.name=e}),e.a=d},function(t,e,n){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r=function(){function t(t,e){for(var n=0;n