区块链技术博客
www.b2bchain.cn

Send Ethereum & ERC20 . Email. To Anyone. From Any Wallet. (v.redd.it). 1 hour . . 0x00f00f00f9 commentssharesavehidereport(function() { var thing = {“obfuscatedPosterUrl”: null, “context”: “comments”, “isGif”: false}; var autoplay = true; if (thing.obfuscatedPosterUrl){ autoplay = false; } if (r.config && !r.config.pref_video_autoplay && thing.context === “comments”) { autoplay = false; } var play_pause_click_action = autoplay ? “pause” : “play”; var play_pause_click_toggle_action = autoplay ? “play” : “pause”; var play_pause_vector_from = autoplay ? “m5,5l15,7.5l0,15l-15,7.5l0,-30m15,7.5l15,7.5l0,0l-15,7.5l0,-15” : “m5,5l12,0l0,30l-12,0l0,-30m18,0l12,0l0,30l-12,0l0,-30”; var play_pause_vector_to = autoplay ? “m5,5l12,0l0,30l-12,0l0,-30m18,0l12,0l0,30l-12,0l0,-30” : “m5,5l15,7.5l0,15l-15,7.5l0,-30m15,7.5l15,7.5l0,0l-15,7.5l0,-15”; var videoPlayerElement = $(“#video-hvcqqa”); var isMobile = r.utils.isMobile(); var canPlayDash = (typeof (window.MediaSource || window.WebKitMediaSource) === “function”); var videoOptions = { id: videoPlayerElement.data(“id36”), linkUrl: videoPlayerElement.data(“linkUrl”), src: canPlayDash ? videoPlayerElement.data(“mpdUrl”) : videoPlayerElement.data(“hlsUrl”), type: canPlayDash ? RedditVideoPlayer.Types.MPD : RedditVideoPlayer.Types.HLS, autoplay: autoplay, poster: null, loop: false, orientation: videoPlayerElement.data(“orientation”), }; if (isMobile) { videoOptions.enableStorage = false; videoOptions.uiControls = false; if (thing.isGif) { videoOptions.clickAction = RedditVideoPlayer.ClickActions.NONE; } else { videoOptions.controls = true; } } var redditVideoPlayer = new RedditVideoPlayer(videoPlayerElement, videoOptions); videoPlayerElement.data(“video-player-object”, redditVideoPlayer); redditVideoPlayer.setAspectRatio(videoPlayerElement.data(“videoHeight”) / videoPlayerElement.data(“videoWidth”)); if (!isMobile) { var bufferingControlsTree = $.parseHTML( ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” ); var bufferingControlsOptions = { behavior: RedditVideoController.Behaviors.BUFFERING, startVisible: false, fadeInDuration: 0, fadeOutDuration: 0, }; var bufferingControls = new RedditVideoController(bufferingControlsTree, bufferingControlsOptions); redditVideoPlayer.addUiController(bufferingControls); var pinnedHeight = videoPlayerElement.data(“pinnedHeight”); var pinnedWidth = videoPlayerElement.data(“pinnedWidth”); var maxPinnedWidth = videoPlayerElement.data(“maxPinnedWidth”); $(document.body).on(‘pinnable:pinned’, function(event) { videoPlayerElement.css(‘height’, pinnedHeight); videoPlayerElement.css(‘width’, pinnedWidth); videoPlayerElement.closest(‘.thing’).find(‘.top-matter’).css(‘left’, pinnedWidth + 95); }.bind(this)); $(document.body).on(‘pinnable:unpinned’, function(event) { videoPlayerElement.css(‘height’, ”); videoPlayerElement.css(‘width’, ”); }.bind(this)); var pinnedControlMargin = 12 * Math.pow(pinnedWidth / maxPinnedWidth, 2); var pinnedControlsTree = $.parseHTML( ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” ); var pinnedControls = new RedditVideoController(pinnedControlsTree); redditVideoPlayer.addUiController(pinnedControls); var endedControlsTree = $.parseHTML( ” + ” + ” + ” + ” + ‘Replay Video’ + ” + ” ); var endedControlsOptions = { behavior: RedditVideoController.Behaviors.COMPLETED, startVisible: false, fadeInDuration: 400, fadeOutDuration: 0, }; var endedControls = new RedditVideoController(endedControlsTree, endedControlsOptions); redditVideoPlayer.addUiController(endedControls); var playbackControlsTree = $.parseHTML( ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ‘0:00’ + ” + ” + ” + ” + ‘0:00’ + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” ); var playbackControlsOptions = { behavior: RedditVideoController.Behaviors.MOUSE_MOVE, }; var playbackControls = new RedditVideoController(playbackControlsTree, playbackControlsOptions); redditVideoPlayer.addUiController(playbackControls); if (r.config && !r.config.pref_video_autoplay && thing.context === “comments”) { var interstitialControlsTree = $.parseHTML( ” + ” + ” + ” + ” + ” + ” + ” + ” ); var interstitialControlsOptions = { behavior: RedditVideoController.Behaviors.INTERSTITIAL, startVisible: true, fadeInDuration: 0, fadeOutDuration: 400, }; var interstitialControls = new RedditVideoController(interstitialControlsTree, interstitialControlsOptions); redditVideoPlayer.addUiController(interstitialControls); } $(playbackControlsTree).find(‘input.settings’).change(function() { if ($(this).is(‘:checked’)) { firePlayerEvent.call(redditVideoPlayer, null, null, {verb: ‘click’, noun: ‘settings’}); redditVideoPlayer.setClickAction(RedditVideoPlayer.ClickActions.NONE); } else { redditVideoPlayer.setClickAction(RedditVideoPlayer.ClickActions.PLAY_PAUSE); } }); } if (isMobile && thing.isGif) { $(videoPlayerElement).find(“video”).bind(“webkitendfullscreen”, function() { this.play(); }); redditVideoPlayer.mute(); } $(document.body).on(“interstitial:destroy”, function(event) { if (“t3_hvcqqa” == event.expando.id) { redditVideoPlayer.play(); } }); var parent = $(“#media-preview-hvcqqa”).parent(); var hadInterstitial = parent.hasClass(“expando”) && !(parent.hasClass(“expando–with-interstitial”)) && !(parent.hasClass(“expando-uninitialized”)) && “” != “”; if (hadInterstitial && !isMobile) { $(videoPlayerElement).find(“video”)[0].addEventListener(“canplay”, function() { redditVideoPlayer.play(); }) } var playPauseButtons = $(videoPlayerElement).find(“button.play-pause”); var isPlaying = autoplay; redditVideoPlayer.addActionCompletedCallback(function(action, value) { if ((action == RedditVideoPlayer.Actions.PLAY && !isPlaying) || (action == RedditVideoPlayer.Actions.PAUSE && isPlaying)) { playPauseButtons.each(function() { var animation = $(this).find(‘animate’).first(); var to = animation.attr(‘to’); var from = animation.attr(‘from’); animation.attr({ “from”: to, “to”: from }); if (‘beginElement’ in animation[0]) { animation.get(0) .beginElement(); } else { var path = $(this).find(‘path’); path.attr({“d”: from}); } }); isPlaying = !isPlaying; } else if (action == RedditVideoPlayer.Actions.NONE && thing.isGif && isMobile) { redditVideoPlayer.toggleFullScreen(); return; } var settings = $(playbackControlsTree).find(“input.settings”); if (settings.prop(“checked”)) { settings.prop(“checked”, false); redditVideoPlayer.setClickAction(RedditVideoPlayer.ClickActions.PLAY_PAUSE); } }); var postElement = videoPlayerElement.closest(‘.thing.link’)[0]; r.analytics.observeAdVideoPlayer(postElement, videoPlayerElement[0]); redditVideoPlayer.addActionCompletedCallback(function(action, value) { var actions = [ RedditVideoPlayer.Actions.BUFFERING, RedditVideoPlayer.Actions.PAUSE, RedditVideoPlayer.Actions.PLAY, RedditVideoPlayer.Actions.SEEK_JUMP, RedditVideoPlayer.Actions.SET_CURRENT_TIME, RedditVideoPlayer.Actions.FULLSCREEN_REQUEST, RedditVideoPlayer.Actions.UNMUTE, RedditVideoPlayer.Actions.MUTE, RedditVideoPlayer.Actions.SET_VOLUME, ]; if (actions.indexOf(action) >-1) { var targetElement = $(this.root).closest(‘.thing.link’); var playerData = { muted: redditVideoPlayer.muted, volume: redditVideoPlayer.volume, duration: redditVideoPlayer.duration, }; r.analytics.handleVideoAdEvent(action, value, playerData, targetElement); } }); var lastTime = 0; redditVideoPlayer.addTimeUpdateHandler(function(time, duration) { var targetElement = $(this.root).closest(‘.thing.link’); var INTERVAL = 0.5; var timeDiff = time – lastTime; lastTime = time; if (timeDiff >0 && timeDiff< INTERVAL) { r.analytics.handleVideoTimeUpdate(time, timeDiff, duration, targetElement); } }); function firePlayerEvent(action, value, extras) { extras = (typeof extras === 'object') ? extras : {}; var verb = extras.verb || ''; var noun = extras.noun || ''; var source = extras.source || 'videoplayer'; var maxTimestamp = this.maxPlayed * 1000; var durationMs = this.duration * 1000; var timeMs = this.currentTime * 1000; var pinnableElement = $(this.root).closest('.pinnable-content'); var targetElement = $(this.root).closest('.thing.link'); var targetData = targetElement.data(); var videoState = { maxTimestampServed: parseInt(maxTimestamp), percentServed: maxTimestamp / durationMs, duration: parseInt(durationMs), time: parseInt(timeMs), isNsfw: targetElement.hasClass('over18'), isSpoiler: targetElement.hasClass('spoiler'), isPinned: pinnableElement.hasClass('pinned'), isVertical: this.orientation === RedditVideoPlayer.Orientations.PORTRAIT, firstFrameTime: this.firstFrameTime, loadStartTime: this.loadStartTime, }; r.analytics.videoPlayerEvent(source, verb, noun, targetData, videoState); } redditVideoPlayer.addActionCompletedCallback(firePlayerEvent); })();Dismiss this pinned windowvar pinnablePlaceholder = $('#pinnable-placeholder-hvcqqa')[0]; var pinnableContent = $('#pinnable-content-hvcqqa'); var targetElement = pinnableContent.find('.thing.link'); var videoPlayer = pinnableContent.find('#video-hvcqqa').data('video-player-object'); var isPinned = false; var isDisabled = false; var isAnimating = false; function getVisiblePercentageOfElement(element) { var viewportHeight = window.innerHeight; var rect = element.getBoundingClientRect(); var top = rect.top; var bottom = rect.bottom; var height = bottom - top; var hiddenTopPx = Math.min(top, 0); var hiddenBottomPx = Math.min(viewportHeight - bottom, 0); var visibleHeight = Math.max(height + hiddenTopPx + hiddenBottomPx, 0); return visibleHeight / height * 100; } function getVideoState() { var maxTimestamp = videoPlayer.maxPlayed * 1000; var durationMs = videoPlayer.duration * 1000; var timeMs = videoPlayer.currentTime * 1000; return { maxTimestampServed: parseInt(maxTimestamp), percentServed: maxTimestamp / durationMs, duration: parseInt(durationMs), time: parseInt(timeMs), isNsfw: targetElement.hasClass('over18'), isSpoiler: targetElement.hasClass('spoiler'), isPinned: isPinned, isVertical: this.orientation === RedditVideoPlayer.Orientations.PORTRAIT, firstFrameTime: videoPlayer.firstFrameTime, loadStartTime: videoPlayer.loadStartTime, }; } function dismissPinnable() { isDisabled = true; pinnableContent.removeClass('pinned'); var event = $.Event('pinnable:unpinned'); $(document.body).trigger(event); var targetData = targetElement.data(); var videoState = getVideoState(); r.analytics.videoPlayerEvent("pinnedvideoplayer", "click", "close", targetData, videoState); } $(window).scroll(function(e) { var pinConditionElements = pinnableContent.find('[data-pin-condition]').addBack('[data-pin-condition]'); var conditionsSatisfied = true; pinConditionElements.each(function() { var conditionFunction = $(this).data('pin-condition'); if (conditionFunction != undefined) { eval("conditionFunction = " + conditionFunction, conditionFunction); } if (typeof conditionFunction === "function") { conditionsSatisfied &= conditionFunction.call($(this)[0]); } }); if (!isPinned && !isDisabled && !isAnimating && conditionsSatisfied && getVisiblePercentageOfElement(pinnablePlaceholder)< 50) { var pinConditionElements = pinnableContent.find('[data-pin-condition]'); isAnimating = true; pinnablePlaceholder.style.height = pinnablePlaceholder.getBoundingClientRect().height + "px"; setTimeout(function() { isAnimating = false; isPinned = true; }, 200); pinnableContent.addClass('pinned'); var event = $.Event('pinnable:pinned'); $(document.body).trigger(event); var targetData = targetElement.data(); var videoState = getVideoState(); r.analytics.videoPlayerEvent("pinnedvideoplayer", "scroll", "activated", targetData, videoState); } else if (isPinned && !isAnimating && getVisiblePercentageOfElement(pinnablePlaceholder) >= 60) { isAnimating = true; setTimeout(function() { isAnimating = false; pinnablePlaceholder.style.height = “auto”; isPinned = false; }, 200); pinnableContent.removeClass(‘pinned’); var event = $.Event(‘pinnable:unpinned’); $(document.body).trigger(event); } });all 9 commentssorted .: top .bestnewcontroversialoldrandomq&alive (beta)Want to add to the .?Post a comment!Create an account[–]Cryptolexicon 2 .3 .4 . 1 hour . (1 child)


.



Great value proposition. Love this. Good work.

Thanks for your feedback. We are building on more features. Stay in tune.😃

This is Lucas from the Ventureum team in Toronto🍁. I am here to introduce our new product "Chainsfr".

chainsfr.com ➡️

Chainsfr is a non-custodial open-source payment service, integrated with Google, which lets you send cryptocurrency by email to anyone from your favorite crypto wallets — like Ledger, Metamask, Coinbase and more. Our goal is to provide you a similar experience as Venmo or Interac e-Transfer if you live in Canada when sending cryptocurrencies.

A few more highlights of Chainsfr

👋 Send crypto to anyone with ease

With Chainsfr, you can send cryptocurrency to anyone by email. The payee can easily deposit your payment with a Google account. You will be able to cancel any pending payment before it is deposited.

☂️ Design to prevent human errors

No more worrying about sending cryptocurrency to the wrong address. With "Security Answer", Chainsfr can prevent you from loss by accidental mistakes.

✔️ Seamless Integration with Google

  • Login without password
  • Own your assets in Google Drive
  • Sync safely with all your devices

🔒 No compromise on security

  • Open-sourced on Github ➡️
  • Non-custodial architecture
  • Google 2-step authentication
  • SOC2 & SOC3 security compliance
  • Multi-signature smart contract escrow
  • Client-side encryption

We greatly appreciate your feedback💜.

To make it easier for you to try Chainsfr, we have also prepared you with free ETH in our demo.

Simply go to https://chainsfr.com and leave your email address, we will send you 0.1 ETH by email in our testnet demo.

One of our missions is to make cryptocurrency easy to use for everyone. So we are curious that what you want to use ​​ for, such as,

  • sending money internationally
  • buying goods online
  • paying for services, like freelancers
  • online donations
  • sending crypto gifts
  • others

Your feedback is greatly appreciated.

Isn't this more like send ERC20 using your Google Account? It also appears that sign isn't possible when using Firefox.

Yes. Chainsfr does not support Firefox at the moment because Firefox used to lack support for webusb, which is needed for Ledger nano s.

But we are working on it. Firefox will be supported soon.

I can't wait to pay $7.50 in gas to send my buddy $10 for the meal he bought me

Lol, I know you, bro.

Let us wait for Ethereum 2.0 to solve the problem. Before that, let us just wish the MMM scam disappears miraculously. 😂

赞(0) 打赏
部分文章转自网络,侵权联系删除b2bchain区块链学习技术社区 » Send Ethereum & ERC20 . Email. To Anyone. From Any Wallet. (v.redd.it). 1 hour . . 0x00f00f00f9 commentssharesavehidereport(function() { var thing = {“obfuscatedPosterUrl”: null, “context”: “comments”, “isGif”: false}; var autoplay = true; if (thing.obfuscatedPosterUrl){ autoplay = false; } if (r.config && !r.config.pref_video_autoplay && thing.context === “comments”) { autoplay = false; } var play_pause_click_action = autoplay ? “pause” : “play”; var play_pause_click_toggle_action = autoplay ? “play” : “pause”; var play_pause_vector_from = autoplay ? “m5,5l15,7.5l0,15l-15,7.5l0,-30m15,7.5l15,7.5l0,0l-15,7.5l0,-15” : “m5,5l12,0l0,30l-12,0l0,-30m18,0l12,0l0,30l-12,0l0,-30”; var play_pause_vector_to = autoplay ? “m5,5l12,0l0,30l-12,0l0,-30m18,0l12,0l0,30l-12,0l0,-30” : “m5,5l15,7.5l0,15l-15,7.5l0,-30m15,7.5l15,7.5l0,0l-15,7.5l0,-15”; var videoPlayerElement = $(“#video-hvcqqa”); var isMobile = r.utils.isMobile(); var canPlayDash = (typeof (window.MediaSource || window.WebKitMediaSource) === “function”); var videoOptions = { id: videoPlayerElement.data(“id36”), linkUrl: videoPlayerElement.data(“linkUrl”), src: canPlayDash ? videoPlayerElement.data(“mpdUrl”) : videoPlayerElement.data(“hlsUrl”), type: canPlayDash ? RedditVideoPlayer.Types.MPD : RedditVideoPlayer.Types.HLS, autoplay: autoplay, poster: null, loop: false, orientation: videoPlayerElement.data(“orientation”), }; if (isMobile) { videoOptions.enableStorage = false; videoOptions.uiControls = false; if (thing.isGif) { videoOptions.clickAction = RedditVideoPlayer.ClickActions.NONE; } else { videoOptions.controls = true; } } var redditVideoPlayer = new RedditVideoPlayer(videoPlayerElement, videoOptions); videoPlayerElement.data(“video-player-object”, redditVideoPlayer); redditVideoPlayer.setAspectRatio(videoPlayerElement.data(“videoHeight”) / videoPlayerElement.data(“videoWidth”)); if (!isMobile) { var bufferingControlsTree = $.parseHTML( ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” ); var bufferingControlsOptions = { behavior: RedditVideoController.Behaviors.BUFFERING, startVisible: false, fadeInDuration: 0, fadeOutDuration: 0, }; var bufferingControls = new RedditVideoController(bufferingControlsTree, bufferingControlsOptions); redditVideoPlayer.addUiController(bufferingControls); var pinnedHeight = videoPlayerElement.data(“pinnedHeight”); var pinnedWidth = videoPlayerElement.data(“pinnedWidth”); var maxPinnedWidth = videoPlayerElement.data(“maxPinnedWidth”); $(document.body).on(‘pinnable:pinned’, function(event) { videoPlayerElement.css(‘height’, pinnedHeight); videoPlayerElement.css(‘width’, pinnedWidth); videoPlayerElement.closest(‘.thing’).find(‘.top-matter’).css(‘left’, pinnedWidth + 95); }.bind(this)); $(document.body).on(‘pinnable:unpinned’, function(event) { videoPlayerElement.css(‘height’, ”); videoPlayerElement.css(‘width’, ”); }.bind(this)); var pinnedControlMargin = 12 * Math.pow(pinnedWidth / maxPinnedWidth, 2); var pinnedControlsTree = $.parseHTML( ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” ); var pinnedControls = new RedditVideoController(pinnedControlsTree); redditVideoPlayer.addUiController(pinnedControls); var endedControlsTree = $.parseHTML( ” + ” + ” + ” + ” + ‘Replay Video’ + ” + ” ); var endedControlsOptions = { behavior: RedditVideoController.Behaviors.COMPLETED, startVisible: false, fadeInDuration: 400, fadeOutDuration: 0, }; var endedControls = new RedditVideoController(endedControlsTree, endedControlsOptions); redditVideoPlayer.addUiController(endedControls); var playbackControlsTree = $.parseHTML( ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ‘0:00’ + ” + ” + ” + ” + ‘0:00’ + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” + ” ); var playbackControlsOptions = { behavior: RedditVideoController.Behaviors.MOUSE_MOVE, }; var playbackControls = new RedditVideoController(playbackControlsTree, playbackControlsOptions); redditVideoPlayer.addUiController(playbackControls); if (r.config && !r.config.pref_video_autoplay && thing.context === “comments”) { var interstitialControlsTree = $.parseHTML( ” + ” + ” + ” + ” + ” + ” + ” + ” ); var interstitialControlsOptions = { behavior: RedditVideoController.Behaviors.INTERSTITIAL, startVisible: true, fadeInDuration: 0, fadeOutDuration: 400, }; var interstitialControls = new RedditVideoController(interstitialControlsTree, interstitialControlsOptions); redditVideoPlayer.addUiController(interstitialControls); } $(playbackControlsTree).find(‘input.settings’).change(function() { if ($(this).is(‘:checked’)) { firePlayerEvent.call(redditVideoPlayer, null, null, {verb: ‘click’, noun: ‘settings’}); redditVideoPlayer.setClickAction(RedditVideoPlayer.ClickActions.NONE); } else { redditVideoPlayer.setClickAction(RedditVideoPlayer.ClickActions.PLAY_PAUSE); } }); } if (isMobile && thing.isGif) { $(videoPlayerElement).find(“video”).bind(“webkitendfullscreen”, function() { this.play(); }); redditVideoPlayer.mute(); } $(document.body).on(“interstitial:destroy”, function(event) { if (“t3_hvcqqa” == event.expando.id) { redditVideoPlayer.play(); } }); var parent = $(“#media-preview-hvcqqa”).parent(); var hadInterstitial = parent.hasClass(“expando”) && !(parent.hasClass(“expando–with-interstitial”)) && !(parent.hasClass(“expando-uninitialized”)) && “” != “”; if (hadInterstitial && !isMobile) { $(videoPlayerElement).find(“video”)[0].addEventListener(“canplay”, function() { redditVideoPlayer.play(); }) } var playPauseButtons = $(videoPlayerElement).find(“button.play-pause”); var isPlaying = autoplay; redditVideoPlayer.addActionCompletedCallback(function(action, value) { if ((action == RedditVideoPlayer.Actions.PLAY && !isPlaying) || (action == RedditVideoPlayer.Actions.PAUSE && isPlaying)) { playPauseButtons.each(function() { var animation = $(this).find(‘animate’).first(); var to = animation.attr(‘to’); var from = animation.attr(‘from’); animation.attr({ “from”: to, “to”: from }); if (‘beginElement’ in animation[0]) { animation.get(0) .beginElement(); } else { var path = $(this).find(‘path’); path.attr({“d”: from}); } }); isPlaying = !isPlaying; } else if (action == RedditVideoPlayer.Actions.NONE && thing.isGif && isMobile) { redditVideoPlayer.toggleFullScreen(); return; } var settings = $(playbackControlsTree).find(“input.settings”); if (settings.prop(“checked”)) { settings.prop(“checked”, false); redditVideoPlayer.setClickAction(RedditVideoPlayer.ClickActions.PLAY_PAUSE); } }); var postElement = videoPlayerElement.closest(‘.thing.link’)[0]; r.analytics.observeAdVideoPlayer(postElement, videoPlayerElement[0]); redditVideoPlayer.addActionCompletedCallback(function(action, value) { var actions = [ RedditVideoPlayer.Actions.BUFFERING, RedditVideoPlayer.Actions.PAUSE, RedditVideoPlayer.Actions.PLAY, RedditVideoPlayer.Actions.SEEK_JUMP, RedditVideoPlayer.Actions.SET_CURRENT_TIME, RedditVideoPlayer.Actions.FULLSCREEN_REQUEST, RedditVideoPlayer.Actions.UNMUTE, RedditVideoPlayer.Actions.MUTE, RedditVideoPlayer.Actions.SET_VOLUME, ]; if (actions.indexOf(action) >-1) { var targetElement = $(this.root).closest(‘.thing.link’); var playerData = { muted: redditVideoPlayer.muted, volume: redditVideoPlayer.volume, duration: redditVideoPlayer.duration, }; r.analytics.handleVideoAdEvent(action, value, playerData, targetElement); } }); var lastTime = 0; redditVideoPlayer.addTimeUpdateHandler(function(time, duration) { var targetElement = $(this.root).closest(‘.thing.link’); var INTERVAL = 0.5; var timeDiff = time – lastTime; lastTime = time; if (timeDiff >0 && timeDiff< INTERVAL) { r.analytics.handleVideoTimeUpdate(time, timeDiff, duration, targetElement); } }); function firePlayerEvent(action, value, extras) { extras = (typeof extras === 'object') ? extras : {}; var verb = extras.verb || ''; var noun = extras.noun || ''; var source = extras.source || 'videoplayer'; var maxTimestamp = this.maxPlayed * 1000; var durationMs = this.duration * 1000; var timeMs = this.currentTime * 1000; var pinnableElement = $(this.root).closest('.pinnable-content'); var targetElement = $(this.root).closest('.thing.link'); var targetData = targetElement.data(); var videoState = { maxTimestampServed: parseInt(maxTimestamp), percentServed: maxTimestamp / durationMs, duration: parseInt(durationMs), time: parseInt(timeMs), isNsfw: targetElement.hasClass('over18'), isSpoiler: targetElement.hasClass('spoiler'), isPinned: pinnableElement.hasClass('pinned'), isVertical: this.orientation === RedditVideoPlayer.Orientations.PORTRAIT, firstFrameTime: this.firstFrameTime, loadStartTime: this.loadStartTime, }; r.analytics.videoPlayerEvent(source, verb, noun, targetData, videoState); } redditVideoPlayer.addActionCompletedCallback(firePlayerEvent); })();Dismiss this pinned windowvar pinnablePlaceholder = $('#pinnable-placeholder-hvcqqa')[0]; var pinnableContent = $('#pinnable-content-hvcqqa'); var targetElement = pinnableContent.find('.thing.link'); var videoPlayer = pinnableContent.find('#video-hvcqqa').data('video-player-object'); var isPinned = false; var isDisabled = false; var isAnimating = false; function getVisiblePercentageOfElement(element) { var viewportHeight = window.innerHeight; var rect = element.getBoundingClientRect(); var top = rect.top; var bottom = rect.bottom; var height = bottom - top; var hiddenTopPx = Math.min(top, 0); var hiddenBottomPx = Math.min(viewportHeight - bottom, 0); var visibleHeight = Math.max(height + hiddenTopPx + hiddenBottomPx, 0); return visibleHeight / height * 100; } function getVideoState() { var maxTimestamp = videoPlayer.maxPlayed * 1000; var durationMs = videoPlayer.duration * 1000; var timeMs = videoPlayer.currentTime * 1000; return { maxTimestampServed: parseInt(maxTimestamp), percentServed: maxTimestamp / durationMs, duration: parseInt(durationMs), time: parseInt(timeMs), isNsfw: targetElement.hasClass('over18'), isSpoiler: targetElement.hasClass('spoiler'), isPinned: isPinned, isVertical: this.orientation === RedditVideoPlayer.Orientations.PORTRAIT, firstFrameTime: videoPlayer.firstFrameTime, loadStartTime: videoPlayer.loadStartTime, }; } function dismissPinnable() { isDisabled = true; pinnableContent.removeClass('pinned'); var event = $.Event('pinnable:unpinned'); $(document.body).trigger(event); var targetData = targetElement.data(); var videoState = getVideoState(); r.analytics.videoPlayerEvent("pinnedvideoplayer", "click", "close", targetData, videoState); } $(window).scroll(function(e) { var pinConditionElements = pinnableContent.find('[data-pin-condition]').addBack('[data-pin-condition]'); var conditionsSatisfied = true; pinConditionElements.each(function() { var conditionFunction = $(this).data('pin-condition'); if (conditionFunction != undefined) { eval("conditionFunction = " + conditionFunction, conditionFunction); } if (typeof conditionFunction === "function") { conditionsSatisfied &= conditionFunction.call($(this)[0]); } }); if (!isPinned && !isDisabled && !isAnimating && conditionsSatisfied && getVisiblePercentageOfElement(pinnablePlaceholder)< 50) { var pinConditionElements = pinnableContent.find('[data-pin-condition]'); isAnimating = true; pinnablePlaceholder.style.height = pinnablePlaceholder.getBoundingClientRect().height + "px"; setTimeout(function() { isAnimating = false; isPinned = true; }, 200); pinnableContent.addClass('pinned'); var event = $.Event('pinnable:pinned'); $(document.body).trigger(event); var targetData = targetElement.data(); var videoState = getVideoState(); r.analytics.videoPlayerEvent("pinnedvideoplayer", "scroll", "activated", targetData, videoState); } else if (isPinned && !isAnimating && getVisiblePercentageOfElement(pinnablePlaceholder) >= 60) { isAnimating = true; setTimeout(function() { isAnimating = false; pinnablePlaceholder.style.height = “auto”; isPinned = false; }, 200); pinnableContent.removeClass(‘pinned’); var event = $.Event(‘pinnable:unpinned’); $(document.body).trigger(event); } });all 9 commentssorted .: top .bestnewcontroversialoldrandomq&alive (beta)Want to add to the .?Post a comment!Create an account[–]Cryptolexicon 2 .3 .4 . 1 hour . (1 child)
分享到: 更多 (0)

相关推荐

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

b2b链

联系我们联系我们