Update videojs-share.js

This commit is contained in:
Omar Roth committed 2018-09-07 15:55:11 -05:00
1 parent 47e94fedc6
commit bd820b9b48
1 file changed
+2 -2
+2 -2
View File
@@ -1,7 +1,7 @@
/**
* videojs-share
* @version 1.1.0
* @version 2.0.1
* @copyright 2018 Mikhail Khazov <mkhazov.work@gmail.com>
* @license MIT
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.videojsShare=e()}(this,function(){"use strict";function t(t,e){return e={exports:{}},t(e,e.exports),e.exports}function e(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var i=window.getSelection(),r=document.createRange();r.selectNodeContents(t),i.removeAllRanges(),i.addRange(r),e=i.toString()}return e}function n(){}function i(t,e){for(;t&&t.nodeType!==D;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}function r(t,e,n,i,r){var a=o.apply(this,arguments);return t.addEventListener(n,a,r),{destroy:function(){t.removeEventListener(n,a,r)}}}function o(t,e,n,i){return function(n){n.delegateTarget=W(n.target,e),n.delegateTarget&&i.call(t,n)}}function a(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!q.string(e))throw new TypeError("Second argument must be a String");if(!q.fn(n))throw new TypeError("Third argument must be a Function");if(q.node(t))return s(t,e,n);if(q.nodeList(t))return l(t,e,n);if(q.string(t))return c(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function s(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function l(t,e,n){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}function c(t,e,n){return X(document.body,t,e,n)}function u(t){return Object.keys(t).filter(function(e){return void 0!==t[e]&&""!==t[e]}).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])}).join("&")}function h(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.fbAppId,n=t.url,i=t.redirectUri;if(!e)throw new Error("fbAppId is not defined");var r=u({app_id:e,display:"popup",redirect_uri:i,link:n});return window.open("https://www.facebook.com/dialog/feed?"+r,"_blank",K)}function d(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.fbAppId,n=t.url,i=t.hashtag,r=t.redirectUri;if(!e)throw new Error("fbAppId is not defined");var o=u({app_id:e,display:"popup",redirect_uri:r,href:n,hashtag:i});return window.open("https://www.facebook.com/dialog/share?"+o,"_blank",K)}function f(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).url;if(!t)throw new Error("url is not defined");var e=u({kid_directed_site:"0",sdk:"joey",u:t,display:"popup",ref:"plugin",src:"share_button"});return window.open("https://www.facebook.com/sharer/sharer.php?"+e,"_blank",K)}function p(){var t=u({url:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).url});return window.open("https://plus.google.com/share?"+t,"_blank",K)}function v(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=u({share_url:t.url,title:t.title,description:t.description,imageurl:t.image});return window.open("http://connect.mail.ru/share?"+e,"_blank",K)}function g(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=u({"st.cmd":"addShare","st._surl":t.url,title:t.title});return window.open("https://ok.ru/dk?"+e,"_blank",K)}function w(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=u({url:t.url,text:t.title});return window.open("https://t.me/share/url?"+e,"_blank",K)}function m(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=u({text:t.title,url:t.url});return window.open("https://twitter.com/intent/tweet?"+e,"_blank",K)}function y(){var t=u({url:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).url});return window.open("https://www.reddit.com/submit?"+t,"_blank",K)}function b(){return!!window.navigator.userAgent.match(/Version\/[\d.]+.*Safari/)}function k(t){return b()?window.open(t):window.location.assign(t)}function _(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.url,n=t.title;if(!e&&!n)throw new Error("url and title not specified");return k("viber://forward?"+u({text:[n,e].filter(function(t){return t}).join(" ")}))}function C(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.url,n=t.image,i=t.isVkParse,r=t.description,o=t.title;r&&r.length>Q&&(r=r.substr(0,Q)+"..."),o&&o.length>Q&&(o=o.substr(0,Q)+"...");return"https://vk.com/share.php?"+u(i?{url:e}:{url:e,title:o,description:r,image:n,noparse:!0})}function x(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return window.open(C(t),"_blank",K)}function E(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.phone,n=u({text:[t.title,t.url].filter(function(t){return t}).join(" "),phone:e});return window.open("https://api.whatsapp.com/send?"+n,"_blank"Line truncated
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],e):t.videojsShare=e(t.videojs)}(this,function(t){"use strict";function e(t,e){return e={exports:{}},t(e,e.exports),e.exports}function n(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var i=window.getSelection(),o=document.createRange();o.selectNodeContents(t),i.removeAllRanges(),i.addRange(o),e=i.toString()}return e}function i(){}function o(t,e){for(;t&&t.nodeType!==J;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}function r(t,e,n,i,o){var r=l.apply(this,arguments);return t.addEventListener(n,r,o),{destroy:function(){t.removeEventListener(n,r,o)}}}function a(t,e,n,i,o){return"function"==typeof t.addEventListener?r.apply(null,arguments):"function"==typeof n?r.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return r(t,e,n,i,o)}))}function l(t,e,n,i){return function(n){n.delegateTarget=Q(n.target,e),n.delegateTarget&&i.call(t,n)}}function s(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!G.string(e))throw new TypeError("Second argument must be a String");if(!G.fn(n))throw new TypeError("Third argument must be a Function");if(G.node(t))return c(t,e,n);if(G.nodeList(t))return u(t,e,n);if(G.string(t))return h(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function c(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function u(t,e,n){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}function h(t,e,n){return Z(document.body,t,e,n)}function d(t){return Object.keys(t).filter(function(e){return void 0!==t[e]&&""!==t[e]}).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])}).join("&")}function f(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.fbAppId,n=t.url,i=t.redirectUri;if(!e)throw new Error("fbAppId is not defined");var o=d({app_id:e,display:"popup",redirect_uri:i,link:n});return window.open("https://www.facebook.com/dialog/feed?"+o,"_blank",et)}function p(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.fbAppId,n=t.url,i=t.hashtag,o=t.redirectUri;if(!e)throw new Error("fbAppId is not defined");var r=d({app_id:e,display:"popup",redirect_uri:o,href:n,hashtag:i});return window.open("https://www.facebook.com/dialog/share?"+r,"_blank",et)}function v(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).url;if(!t)throw new Error("url is not defined");var e=d({kid_directed_site:"0",sdk:"joey",u:t,display:"popup",ref:"plugin",src:"share_button"});return window.open("https://www.facebook.com/sharer/sharer.php?"+e,"_blank",et)}function g(){var t=d({url:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).url});return window.open("https://plus.google.com/share?"+t,"_blank",et)}function m(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=d({share_url:t.url,title:t.title,description:t.description,imageurl:t.image});return window.open("http://connect.mail.ru/share?"+e,"_blank",et)}function w(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.url,n=t.title,i=t.description,o=(n||"")+"\r\n"+(i||"")+"\r\n"+(e||""),r="mailto:?body="+encodeURIComponent(o);return window.location.assign(r)}function y(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=d({"st.cmd":"addShare","st._surl":t.url,title:t.title});return window.open("https://ok.ru/dk?"+e,"_blank",et)}function b(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=d({url:t.url,text:t.title});return window.open("https://t.me/share/url?"+e,"_blank",et)}function k(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.title,n=t.url,i=t.hashtags,o=d({text:e,url:n,hashtags:(void 0===i?[]:i).join(",")});return window.open("https://twitter.com/intent/tweet?"+o,"_blank",et)}function _(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=d({url:t.url,title:t.title});return window.open("https://www.reddit.com/submit?"+e,"_blank",et)}function C(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.description,n=d({url:t.url,description:e,media:t.media});return window.open("https://pinterest.com/pin/create/button/?"+n,"_blank",et)}function x(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.url,n=t.title,i=t.caption,o=t.tags,r=void 0===o?[]:o,a=t.posttype,l=void 0===a?"link":a,s=d({canonicalUrl:e,title:Line truncated