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.
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!
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 🤔
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).
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
@@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
@@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
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.
Good call on the chaining
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!
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.
This series will be great!
Hey LevelUpTuts, Great Content as Always.✨
Thanks for Sharing it!🙏🏻
You Have Been an Inspiration for My Own 📺TH-cam Channel!!!
Great idea for a series
Anyone know how I can read the clipboard on Firefox? Firefox doesn't support clipboard api
Definitely excited for this series!
Yes please keep these coming, and this is a great start. Noticed you're on MS edge, any reason besides the cool vertical tabs?
I like to change somewhat frequently to get a good amount of exp with each. Also helps find browser specific bugs while dog fooding
Yes, please rock out more videos like these.
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!
This tips are great, please continue with this series. It will be really appreciated. 👍
Yes,.more vids like these please. Remmeber the leftpad fiasco?
Great series idea Scott
Great series, please do more of this!
I tried this and it is working perfectly on desktop, but this is not working in my android's chrome.Why is that?
for some reason it doesn't works in chrome android while using vanilla html, css, and javascript.
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 🤔
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).
go for it, sounds fun!
This blew my mind
Please make a video on "is-even" library
You can make a PR to the library that delete all files with description "just use the built-in API" 😂
Plz don't do this 😅
It's not working in Safari, seems like safari doesn't support clipboard api
so far ive heard like 10 songs from 2015 albeit they are remixes. so idk whats 2022 about this
Not sure I follow.
@@syntaxfm wait what. I left this comment under a completely different video wtf 😶 how did this happen TH-cam
not working on http
Yah, you will need a secure context for this regardless. Most hosts do free ssl these days and all sites should really be https.
Now do left-pad 😉
Someone probably wish it were actually generating $700,000.
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
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.
@@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...
@@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
@@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