You Don't Need a Dependency - Clipboard API

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ก.ย. 2024
  • developer.mozi...
    developer.mozi...
    Become a Level Up Pro and take your web skills to the next level!
    www.leveluptut...
    The best web development podcast out there
    Syntax with Wes Bos and Scott Tolinski
    syntax.fm

ความคิดเห็น • 39

  • @NickyTheRook
    @NickyTheRook 2 ปีที่แล้ว +4

    Great series, please do more of this!
    Little addition:
    You can't use the optional chaining syntax on non-declared objects, only undefined ones.
    So the check Scott showed will work on unsupported browsers, but will error if you're doing something like server-side rendering where the navigator doesn't exist.

    • @syntaxfm
      @syntaxfm  2 ปีที่แล้ว

      Good call on the chaining

  • @DevMadeEasy
    @DevMadeEasy 2 ปีที่แล้ว +2

    Hey LevelUpTuts, Great Content as Always.✨
    Thanks for Sharing it!🙏🏻
    You Have Been an Inspiration for My Own 📺TH-cam Channel!!!

  • @idk_just_will
    @idk_just_will 2 ปีที่แล้ว

    i'm a general fan of the little series you've been trying out, but i think this is my favorite so far! Really love this, thanks scott!

  • @rebelmachine88
    @rebelmachine88 2 ปีที่แล้ว +4

    Reminds me of the "don't use jQuery" videos that pop up every once in awhile. I like it! This sounds like a really cool series.

  • @vfshera
    @vfshera 2 ปีที่แล้ว +4

    This series will be great!

  • @FernandoMarte
    @FernandoMarte 2 ปีที่แล้ว +4

    Great idea for a series

  • @liminal_spaces_on_earth
    @liminal_spaces_on_earth ปีที่แล้ว +2

    Anyone know how I can read the clipboard on Firefox? Firefox doesn't support clipboard api

  • @irlshrek
    @irlshrek 2 ปีที่แล้ว

    Definitely excited for this series!

  • @bmehder
    @bmehder 2 ปีที่แล้ว

    Yes, please rock out more videos like these.

  • @marcod.643
    @marcod.643 2 ปีที่แล้ว

    This tips are great, please continue with this series. It will be really appreciated. 👍

  • @MrAhvids
    @MrAhvids 2 ปีที่แล้ว

    Great series idea Scott

  • @ahmedelamine3951
    @ahmedelamine3951 2 ปีที่แล้ว

    Great series, please do more of this!

  • @pushingprimitives
    @pushingprimitives 2 ปีที่แล้ว +1

    Yes,.more vids like these please. Remmeber the leftpad fiasco?

  • @martylouis
    @martylouis 2 ปีที่แล้ว

    Yes please keep these coming, and this is a great start. Noticed you're on MS edge, any reason besides the cool vertical tabs?

    • @syntaxfm
      @syntaxfm  2 ปีที่แล้ว +1

      I like to change somewhat frequently to get a good amount of exp with each. Also helps find browser specific bugs while dog fooding

  • @WhistleFantasy
    @WhistleFantasy 2 ปีที่แล้ว

    Great idea for a series and good video. Maybe Broadcast Channel API would fit this series (extremely simple way for different tabs of same app to message each other).

  • @cristiconstantinescu9848
    @cristiconstantinescu9848 ปีที่แล้ว

    Cool.
    But the problem I have with this and can't seem to find a workaround is the fact that it doesn't preserve the paragraphs and spacing of the original text. I selected two lines of text and copied it with a button, then pasted it into a notepad and the text was on one line.
    Then i went back to the page and reselected the same two lines of text and pressed CTRL+C and then went back to the same notepad, pressed enter a few times and then CTRL+V and it pasted two lines of text, just like I copied.
    I managed to get it somehow. I found that when you select a paragraph on a webpage and THEN you move the mouse on the second paragraph while still holding the left mouse button down, there appears a new space character at the end of the first paragraph. And I manipulated that to be the .split point to the elements in the array. But it's a real patchwork.
    How do I get that? How do I select 2 lines on a website, click a created contextMenu item I made called "Save text" and then save it to a variable so I can store it in a chrome.storage? Even in an array where every line is an element in the array?
    Is there a real way to imitate CTRL+C?
    Thanks so much!

  • @ritankarbhattacharjee7661
    @ritankarbhattacharjee7661 ปีที่แล้ว

    I tried this and it is working perfectly on desktop, but this is not working in my android's chrome.Why is that?

  • @thatsalot3577
    @thatsalot3577 2 ปีที่แล้ว

    for some reason it doesn't works in chrome android while using vanilla html, css, and javascript.

  • @jordanski5421
    @jordanski5421 2 ปีที่แล้ว

    This blew my mind

  • @marcellerich
    @marcellerich 2 ปีที่แล้ว

    go for it, sounds fun!

  • @GalTadmor
    @GalTadmor 2 ปีที่แล้ว

    Great initiative! Loved the concept.
    Can you share your thoughts on libraries like shelljs and execa?
    I've been using them to run shell/bash commands, but I know that under the hood they use spawns and child processes 🤔

  • @precisionchoker
    @precisionchoker 2 ปีที่แล้ว

    Please make a video on "is-even" library

  • @crushfire2004
    @crushfire2004 2 ปีที่แล้ว

    You can make a PR to the library that delete all files with description "just use the built-in API" 😂

    • @syntaxfm
      @syntaxfm  2 ปีที่แล้ว

      Plz don't do this 😅

  • @deepakmalik2422
    @deepakmalik2422 ปีที่แล้ว +1

    It's not working in Safari, seems like safari doesn't support clipboard api

  • @kenridge2
    @kenridge2 2 ปีที่แล้ว

    Now do left-pad 😉

  • @sebastianjulonchamana2987
    @sebastianjulonchamana2987 10 หลายเดือนก่อน

    not working on http

    • @syntaxfm
      @syntaxfm  9 หลายเดือนก่อน

      Yah, you will need a secure context for this regardless. Most hosts do free ssl these days and all sites should really be https.

  • @FrancoisKerisit
    @FrancoisKerisit 2 ปีที่แล้ว

    Someone probably wish it were actually generating $700,000.

  • @ancwhor
    @ancwhor 2 ปีที่แล้ว

    so far ive heard like 10 songs from 2015 albeit they are remixes. so idk whats 2022 about this

    • @syntaxfm
      @syntaxfm  2 ปีที่แล้ว

      Not sure I follow.

    • @ancwhor
      @ancwhor 2 ปีที่แล้ว +2

      @@syntaxfm wait what. I left this comment under a completely different video wtf 😶 how did this happen TH-cam

  • @HappySmileLV
    @HappySmileLV 2 ปีที่แล้ว

    I mean.... after saying "IE 11" is not important... sure, quite a lot of packages become useless... Unfortunately quite a few customers still require product to support it and I don't want to deal with IE 11 shenenigans for each browser API. For IE 11 I would most likely use some package too instead

    • @syntaxfm
      @syntaxfm  2 ปีที่แล้ว

      Yep, the point isn't that you can't use one, but just that most people won't have to. At this point ie11 support is more niche than not.

    • @HappySmileLV
      @HappySmileLV 2 ปีที่แล้ว

      @@syntaxfm Yeah... that is true... I guess we will have a habit of using packages for everything for a while even after IE is completely dead...

    • @DrNoxer
      @DrNoxer 2 ปีที่แล้ว

      @@HappySmileLV I see it as an oportunity to educate your clients to tell them to update their browser. Tell them the development cost will decrese if they update the company's browser, its 2022, not 2013 :) And btw, internet explorer 11's retirement date is: June 15, 2022, so yes. Time to think about safari instead xD

    • @HappySmileLV
      @HappySmileLV 2 ปีที่แล้ว

      @@DrNoxer I guess I am just salty about my current project. One of its parts is Add-in for outlook, that is using IE as web-view. Even if IE will retire soon - older Outlook desktop versions should be supported by our product :D So there are edge cases still